CVE-2024-0406 Mholt/archiver: path traversal vulnerability
Attackers can exploit a path traversal flaw in the Go archiver library to read or overwrite restricted files via crafted tar archives.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2024-0406?
CVE-2024-0406 is a medium-severity path traversal vulnerability in Redhat Openshift Container Platform, published on 6 Apr 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official description
A flaw was discovered in the mholt/archiver package. This flaw allows an attacker to create a specially crafted tar file, which, when unpacked, may allow access to restricted files or directories. This issue can allow the creation or overwriting of files with the user's or application's privileges using the library.
Weakness: CWE-22
Which versions are affected by CVE-2024-0406?
6 open source packages ship an affected version, including github.com/mholt/archiver and github.com/mholt/archiver/v3. It affects 3 products.
| Package | Affected | Fixed in |
|---|---|---|
github.com/mholt/archiver Go | All versions | None |
github.com/mholt/archiver Go | From 3.0.0 to 3.5.1 | None |
github.com/mholt/archiver Go | From 3.0.0 to 3.5.1 | None |
github.com/mholt/archiver/v3 Go | All versions | None |
github.com/mholt/archiver/v3 Go | From 3.0.0 to 3.5.1 | None |
github.com/mholt/archiver/v3 Go | From 3.0.0 to 3.5.1 | None |
Linux distribution packages (2)
hauler openSUSE:Tumbleweed | All versions | 1.2.2-1.1 |
subfinder openSUSE:Tumbleweed | All versions | 2.7.0-2.1 |
Products include Mholt Archiver, Redhat Advanced Cluster Security, Redhat Openshift Container Platform.
How do I fix CVE-2024-0406?
Upgrade to a fixed version.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2024-0406 being exploited?
There is no known exploitation of CVE-2024-0406 in the wild and no public exploit code.
Public exploit code: 2 proofs of concept on GitHub.
Sources
Also known as GHSA-rhh4-rh7c-7r5v, GO-2024-2698, MINI-2c7v-j2m5-vrmf, MINI-36h7-cmxx-2jfc, MINI-7995-wxrw-p2j7, MINI-7qh4-69f5-98g2 and 4 more.