Vulnerability · Published Dec 4, 2024 · Assigned by GitHub_M
CVE-2024-54132GitHub CLI allows downloading malicious GitHub Actions workflow artifact to result in path traversal vulnerability
Medium 6.3
In plain English
A medium-severity path traversal in cli from cli. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.6% (higher than 50% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | gh | no fix listed | DEBIAN-CVE-2024-54132 |
| Debian:13 | gh | 2.46.0-3 | DEBIAN-CVE-2024-54132 |
| Go | github.com/cli/cli | no fix listed | GHSA-2m9h-r57g-45pj |
| Go | github.com/cli/cli | no fix listed | GO-2024-3310 |
| Go | github.com/cli/cli/v2 | 2.63.1 | GHSA-2m9h-r57g-45pj |
| Go | github.com/cli/cli/v2 | 2.63.1 | GO-2024-3310 |
Affected products (as reported)
Weakness: CWE-22 · Vector: CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/U:Green
References
- https://github.com/cli/cli/security/advisories/GHSA-2m9h-r57g-45pj x_refsource_CONFIRM
- https://github.com/cli/cli/commit/1136764c369aaf0cae4ec2ee09dc35d871076932 x_refsource_MISC