VDB
Sign up
—

GO-2021-0094

Directory traversal in github.com/hashicorp/go-slug

Quick fix

GO-2021-0094 — github.com/hashicorp/go-slug: upgrade to the fixed version with the command below.

go get github.com/hashicorp/go-slug@v0.5.0

Details

Protections against directory traversal during archive extraction can be bypassed by chaining multiple symbolic links within the archive. This allows a malicious attacker to cause files to be created outside of the target directory. Additionally if the attacker is able to read extracted files they may create symbolic links to arbitrary files on the system which the unpacker has permissions to read.

Are you affected?

Enter the version of the package you're using.

Affected packages

Go/github.com/hashicorp/go-slug
Introduced in: 0Fixed in: 0.5.0
Fixgo get github.com/hashicorp/go-slug@v0.5.0

References