{"id":"GHSA-2m9h-r57g-45pj","summary":"Downloading malicious GitHub Actions workflow artifact results in path traversal vulnerability","details":"### Summary\n\nA 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`. \n\n### Details\n\nThis 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.\n\nIn `2.63.1`, `gh run download` will not download artifacts named `..` and `.` and instead exit with the following error message:\n\n```\nerror downloading ..: would result in path traversal\n```\n\n### Impact\n\nSuccessful exploitation heightens the risk of local path traversal attack vectors exactly 1 directory higher than intended.\n\n### Remediation and Mitigation\n\n1. Upgrade `gh` to `2.63.1`\n2. Implement additional validation to ensure artifact filenames do not contain potentially dangerous patterns, such as `..`, to prevent path traversal risks.","aliases":["CVE-2024-54132","GO-2024-3310"],"modified":"2026-07-17T21:10:51.013968198Z","published":"2024-12-04T15:32:45Z","database_specific":{"cwe_ids":["CWE-22"],"severity":"MODERATE","github_reviewed":true,"github_reviewed_at":"2024-12-04T15:32:45Z","nvd_published_at":"2024-12-04T16:15:26Z"},"references":[{"type":"WEB","url":"https://github.com/cli/cli/security/advisories/GHSA-2m9h-r57g-45pj"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-54132"},{"type":"WEB","url":"https://github.com/cli/cli/commit/1136764c369aaf0cae4ec2ee09dc35d871076932"},{"type":"PACKAGE","url":"https://github.com/cli/cli"}],"affected":[{"package":{"name":"github.com/cli/cli/v2","ecosystem":"Go","purl":"pkg:golang/github.com/cli/cli/v2"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.63.1"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/12/GHSA-2m9h-r57g-45pj/GHSA-2m9h-r57g-45pj.json"}},{"package":{"name":"github.com/cli/cli","ecosystem":"Go","purl":"pkg:golang/github.com/cli/cli"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"1.14.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/12/GHSA-2m9h-r57g-45pj/GHSA-2m9h-r57g-45pj.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"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"}]}