{"id":"CVE-2026-64653","aliases":["CVE-2026-64653","GHSA-4fjg-2h4q-fwg3","GO-2026-6765"],"related":[],"kind":"vulnerability","state":"published","title":"GitHub CLI: Unescaped variable components in request URLs could allow path traversal","summary":"GitHub CLI (gh) is GitHub’s official command line tool. Prior to 2.97.0, some HTTP request URLs interpolate variable path components without percent encoding, allowing URL path metacharacters in attacker-controlled repository or resource values to make gh address a different API endpoint or resource than the user intended. This issue is fixed in version 2.97.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"GitHub CLI (gh) is GitHub’s official command line tool. Prior to 2.97.0, some HTTP request URLs interpolate variable path components without percent encoding, allowing URL path metacharacters in attacker-controlled repository or resource values to make gh address a different API endpoint or resource than the user intended. This issue is fixed in version 2.97.0.","source":"cvelist"},{"lang":"en","text":"### 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.","format":"markdown","source":"ghsa"},{"lang":"en","text":"GitHub CLI allows path traversal through unescaped request URL components in github.com/cli/cli","format":"markdown","source":"go"}],"published":"2026-08-06T17:51:54.344Z","modified":"2026-10-19T21:40:57.702Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","score":5.1,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","score":5.1,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"LOW"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"version":"< 2.97.0","status":"affected"}],"vendor":"cli","product":"cli","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.97.0"}],"ecosystem":"Go","package":"github.com/cli/cli/v2","purl":"pkg:golang/github.com/cli/cli/v2","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"github.com/cli/cli","purl":"pkg:golang/github.com/cli/cli","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.97.0"}],"ecosystem":"Go","package":"github.com/cli/cli/v2","purl":"pkg:golang/github.com/cli/cli/v2","source":"go"}],"references":[{"url":"https://github.com/cli/cli/security/advisories/GHSA-4fjg-2h4q-fwg3","tags":["advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/cli/cli/commit/0c2eea6338a2323cfff000160b9b5a56a38d2a06","tags":["fix","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/cli/cli/releases/tag/v2.97.0","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-64653","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/cli/cli","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-08-07T14:54:02.803Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-64653","url":"https://www.cve.org/CVERecord?id=CVE-2026-64653","licence":"CVE Terms of Use","modified":"2026-08-07T14:54:13.120Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-4fjg-2h4q-fwg3","url":"https://github.com/advisories/GHSA-4fjg-2h4q-fwg3","licence":"CC-BY-4.0","modified":"2026-10-19T21:40:57.702Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-6765","url":"https://pkg.go.dev/vuln/GO-2026-6765","licence":"CC-BY-4.0","modified":"2026-10-19T21:31:53.420Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-64653","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-64653","licence":"Public domain","modified":"2026-09-10T20:36:14.340Z"}],"updatedAt":"2026-11-25T22:59:31.394Z","epss":{"score":0.00511,"percentile":0.45101,"date":"2026-12-01T12:00:22.000Z"}}