ADVISORIES

Go Vulnerability Database

GO-2021-0094

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

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.

Affected packages

EcosystemPackageAffected versions
Gogithub.com/hashicorp/go-slug
All versions before 0.5.0 (fixed in 0.5.0)

References