{"id":"GHSA-4fjg-2h4q-fwg3","summary":"GitHub CLI allows path traversal through unescaped request URL components","details":"### Summary\n\nA path traversal vulnerability has been identified in the GitHub CLI where some HTTP request URLs, REST API calls in particular, were built without properly escaping their variable path components. A value containing URL path metacharacters can alter the request path and cause `gh` to address a different resource than intended.\n\n### Details\n\nNot all request URLs in the codebase were built with proper escaping of their variable path components. When a component is interpolated into the path without percent encoding, and that component contains URL path metacharacters, it breaks out of its intended segment and changes the effective request path.\n\nIn `2.97.0`, request URLs are constructed in a safe manner, so a variable component can no longer escape its intended segment.\n\n### Impact\n\nAn attacker who can control a value that flows into a request path can cause `gh` to send the request to a different API endpoint than intended. This can lead the CLI to read or act on a resource other than the one the user meant to target.\n\n### Remediation and Mitigation\n\n1. Upgrade `gh` to `2.97.0`.\n2. Be cautious when running `gh` against untrusted repositories or inputs whose names you do not control.","aliases":["CVE-2026-64653"],"modified":"2026-10-15T18:15:03.460995060Z","published":"2026-10-15T18:07:14Z","database_specific":{"nvd_published_at":"2026-08-06T22:18:13Z","cwe_ids":["CWE-22"],"severity":"LOW","github_reviewed":true,"github_reviewed_at":"2026-10-15T18:07:14Z"},"references":[{"type":"WEB","url":"https://github.com/cli/cli/security/advisories/GHSA-4fjg-2h4q-fwg3"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-64653"},{"type":"WEB","url":"https://github.com/cli/cli/commit/0c2eea6338a2323cfff000160b9b5a56a38d2a06"},{"type":"PACKAGE","url":"https://github.com/cli/cli"},{"type":"WEB","url":"https://github.com/cli/cli/releases/tag/v2.97.0"}],"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.97.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-4fjg-2h4q-fwg3/GHSA-4fjg-2h4q-fwg3.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:N/SA:N"}]}