CVE-2024-54132 GitHub CLI allows downloading malicious GitHub Actions workflow artifact to result in path traversal vulnerability
Attackers can overwrite files outside the intended directory by tricking users into downloading malicious GitHub Actions artifacts with specific names.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-54132?
CVE-2024-54132 is a medium-severity path traversal vulnerability in cli, published on 4 Dec 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
The GitHub CLI is GitHub’s official command line tool. A security vulnerability has been identified in GitHub CLI that could create or overwrite files in unintended directories when users download a malicious GitHub Actions workflow artifact through gh run download. This vulnerability stems from a GitHub Actions workflow artifact named .. when downloaded using gh run download. The artifact name and --dir flag are used to determine the artifact’s download path. When the artifact is named .., the resulting files within the artifact are extracted exactly 1 directory higher than the specified --dir flag value. This vulnerability is fixed in 2.63.1.
Weakness: CWE-22
Which versions are affected by CVE-2024-54132?
6 open source packages ship an affected version, including github.com/cli/cli and github.com/cli/cli/v2.
| Package | Affected | Fixed in |
|---|---|---|
github.com/cli/cli Go | All versions | None |
github.com/cli/cli Go | All versions to 1.14.0 | None |
github.com/cli/cli Go | All versions to 1.14.0 | None |
github.com/cli/cli/v2 Go | All versions | 2.63.1 |
github.com/cli/cli/v2 Go | All versions | 2.63.1 |
github.com/cli/cli/v2 Go | All versions | 2.63.1 |
How do I fix CVE-2024-54132?
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-54132 being exploited?
There is no known exploitation of CVE-2024-54132 in the wild and no public exploit code.
Sources
Also known as AZL-53996, AZL-54009, DEBIAN-CVE-2024-54132, GHSA-2m9h-r57g-45pj, GO-2024-3310, UBUNTU-CVE-2024-54132.