CVE-2020-29529 Unsafe tar unpacking in HashiCorp go-slug
Attackers can bypass directory traversal protections in go-slug using multiple symlinks to read or modify files outside the intended directory.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2020-29529?
CVE-2020-29529 is a high-severity path traversal vulnerability in n/a, published on 3 Dec 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
HashiCorp go-slug up to 0.4.3 did not fully protect against directory traversal while unpacking tar archives, and protections could be bypassed with specific constructions of multiple symlinks. Fixed in 0.5.0.
Which versions are affected by CVE-2020-29529?
3 open source packages ship an affected version, including github.com/hashicorp/go-slug. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
github.com/hashicorp/go-slug Go | All versions | 0.5.0 |
github.com/hashicorp/go-slug Go | All versions | 0.5.0 |
github.com/hashicorp/go-slug Go | All versions | 0.5.0 |
Products include Hashicorp Go-Slug.
How do I fix CVE-2020-29529?
Upgrade github.com/hashicorp/go-slug to 0.5.0 or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2020-29529 being exploited?
There is no known exploitation of CVE-2020-29529 in the wild and no public exploit code.
Other vulnerabilities in n/a
Sources
Also known as DEBIAN-CVE-2020-29529, GHSA-2g5j-5x95-r6hr, GO-2021-0094.