Every CVE Search/ Get API key

CVE-2026-64653

GitHub CLI: Unescaped variable components in request URLs could allow path traversal

5.1 MediumFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
Active

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
None

Exploit likelihood

0.51%Unchanged since Aug 7, 2026
90%50%10%1%

What each source reports

CVE List Score used 5.1

GitHub CLI: Unescaped variable components in request URLs could allow path traversal

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.

Record
CVE-2026-64653
CVSS 4.0
5.1 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Weakness
CWE-22
Updated
2026-11-02
EUVDEUVD-2026-54213 5.1

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.

Record
EUVD-2026-54213
CVSS 4.0
5.1 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Updated
2026-11-02
GitHub AdvisoriesGHSA-4fjg-2h4q-fwg3 2.1

GitHub CLI allows path traversal through unescaped request URL components

Summary

A 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.

Details

Not 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.

In 2.97.0, request URLs are constructed in a safe manner, so a variable component can no longer escape its intended segment.

Impact

An 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.

Remediation and Mitigation

  1. Upgrade gh to 2.97.0.
  2. Be cautious when running gh against untrusted repositories or inputs whose names you do not control.
Record
GHSA-4fjg-2h4q-fwg3
CVSS 4.0
2.1 LowCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:N/SA:N
Weakness
CWE-22
Updated
2026-11-02
NVD 5.1

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.

Record
CVE-2026-64653
CVSS 4.0
5.1 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Weakness
CWE-22
Updated
2026-11-02
OSV 5.1

GitHub CLI: Unescaped variable components in request URLs could allow path traversal

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.

Record
CVE-2026-64653
CVSS 4.0
5.1 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Weakness
CWE-22
Updated
2026-11-02
OSVDEBIAN-CVE-2026-64653 5.1

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.

Record
DEBIAN-CVE-2026-64653
CVSS 4.0
5.1 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Updated
2026-11-02
Show 6 moreShow less
OSVGHSA-4fjg-2h4q-fwg3 2.1

GitHub CLI allows path traversal through unescaped request URL components

Summary

A 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.

Details

Not 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.

In 2.97.0, request URLs are constructed in a safe manner, so a variable component can no longer escape its intended segment.

Impact

An 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.

Remediation and Mitigation

  1. Upgrade gh to 2.97.0.
  2. Be cautious when running gh against untrusted repositories or inputs whose names you do not control.
Record
GHSA-4fjg-2h4q-fwg3
CVSS 4.0
2.1 LowCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:N/SA:N
Weakness
CWE-22
Updated
2026-11-02
OSVUBUNTU-CVE-2026-64653 5.1

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.

Record
UBUNTU-CVE-2026-64653
CVSS 4.0
5.1 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Updated
2026-11-02
OSVAZL-95465 No score

CVE-2026-64653 affecting package gh for versions less than 2.97.0-1

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.

Record
AZL-95465
Updated
2026-11-02
OSVGO-2026-6765 No score

GitHub CLI allows path traversal through unescaped request URL components in github.com/cli/cli

GitHub CLI allows path traversal through unescaped request URL components in github.com/cli/cli

Record
GO-2026-6765
Updated
2026-11-02
OSVopenSUSE-SU-2026:11530-1 No score

gh-2.97.0-1.1 on GA media

These are all security issues fixed in the gh-2.97.0-1.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2026:11530-1
Updated
2026-11-02
OSVopenSUSE-SU-2026:21663-1 No score

Security update for gh

This update for gh fixes the following issues:

Changes in gh:

  • Update to version 2.98.0:
    • chore: fix extra whitespace
    • Default Codespaces port forwarding to loopback
    • Bump gh-aw-actions to v0.87.1 and recompile workflows
    • Fix issue triage action compatibility
    • chore(deps): bump golang.org/x/crypto from 0.54.0 to 0.55.0
    • chore: bump go to 1.26.7 (#14205)
    • chore(deps): bump the codeql-actions group across 1 directory with 3 updates
    • chore(deps): bump github.com/stretchr/testify from 1.11.1 to 1.12.1
    • Revert "ci: add temporary step to verify Linux repo signing keys"
    • ci: add temporary step to verify Linux repo signing keys
    • Accept pre-release tags in deployment validation (#14193)
    • chore: sign APT repositories with both keys
    • chore(deps): bump charm.land/lipgloss/v2 from 2.0.5 to 2.0.6
    • chore(deps): bump the aw-actions group with 2 updates
    • chore(deps): bump github.com/klauspost/compress from 1.19.1 to 1.19.2
    • Bump Go to 1.26.6
    • Upgrade gh-aw workflows to v0.85.4
    • chore(deps): bump github.com/google/go-containerregistry
    • chore(deps): bump google.golang.org/protobuf from 1.36.11 to 1.36.12
    • Address review: drop cleanup markers, document search-type in skill
    • Reconcile feature detection cleanup comment rules in AGENTS.md
    • Update AGENTS.md with cleanup comment guidance
    • Address review feedback
    • Add --search-type flag for semantic and hybrid issue search
    • Rename config mock constructors to match repo convention
    • Document when to use the config mock or the isolated config
    • Accept config content in NewIsolatedTestConfig
    • Clear auth environment variables in isolated test config
    • Isolate git config in tests that shell out to git
    • Rename config stub file to test.go
    • chore(deps): bump the aw-actions group with 2 updates
    • Add aw-actions group to dependabot configuration
    • Rename cli-code-reviewer skill to code-review (#14116)
    • chore(deps): bump github/gh-aw-actions/setup-cli from 0.83.4 to 0.85.4
    • Reduce item-add test diff
    • Isolate item-add test mocks
    • Test item-add output through command path
    • Run lint workflow when the lint workflow changes
    • Bump golangci-lint in CI to v2.12.2
    • Clarify PR testing section expectations
    • chore(deps): bump the codeql-actions group across 1 directory with 3 updates
    • chore(deps): bump azure/login from 3.0.0 to 3.0.1
    • chore(deps): bump actions/attest from 4.2.1 to 4.2.2
    • Use reflect.Pointer instead of deprecated reflect.Ptr
    • Add a scheduled tech debt burndown skill (#14095)
    • Restore automatic spam issue closure (#14088)
    • Give Dependabot triage a real reachability check (#14087)
    • Route release deletions through api.Client (#14077)
    • chore(deps): bump google.golang.org/grpc from 1.82.1 to 1.83.0
    • chore(deps): bump github.com/google/go-containerregistry
    • Grant the gate the scopes its CI read needs
    • Keep pre-flight dedup out of the integrity proxy
    • Key direct/indirect off the // indirect comment
    • Gate triager confidence on required evidence
    • Gate Dependabot triage on deterministic pre-flight check
    • Set GH_EXTENSION=1 when gh invokes an extension
    • Tell agents to use the PR template in AGENTS.md
    • Merge pull request #14062 from cli/williammartin-wp-08-release-create
    • Route extension requests through api.Client (#14059)
    • Route autolink requests through api.Client (#14013)
    • chore(deps): bump the codeql-actions group across 1 directory with 3 updates
    • fix(release create): trim spaces when parsing X-Oauth-Scopes
    • Match worktree rev-parse stub against absolute path on Windows
    • fix(pr/checkout): pass -- before worktree path so dash paths work
    • docs(pr/checkout): add worktree usage example to help text
    • docs(skills): mention pr checkout worktree support
    • chore(pr checkout): polish worktree related tests
    • Route gpg key requests through api.Client (#13997)
    • Use generated key in ssh-key acceptance test
    • Route ssh key…
Record
openSUSE-SU-2026:21663-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
github.com/cli/cli/v2
Go
before 2.97.0
2.97.0
gh
Azure Linux:3
before 2.97.0-1
2.97.0-1
gh
Debian:12
All versions, plus listed versions
2.23.0+dfsg1-12.24.3+dfsg1-12.27.0+dfsg1-12.30.0-12.30.0-2
Show 11 moreShow less
2.35.0-12.40.1+dfsg1-12.42.1-12.43.1-12.44.1-12.44.1-22.45.0-12.46.0-12.46.0-22.46.0-32.46.0-4
None known
gh
Debian:13
All versions, plus listed versions
2.46.0-32.46.0-4
None known
github.com/cli/cli
Go
All versions None known
gh
Ubuntu:22.04:LTS
All versions, plus listed versions
2.4.0+dfsg1-12.4.0+dfsg1-2
None known
gh
Ubuntu:Pro:24.04:LTS
All versions, plus listed versions
2.27.0+dfsg1-1build12.30.0-22.35.0-12.40.1+dfsg1-12.42.1-1
Show 13 moreShow less
2.43.1-12.44.1-12.44.1-22.45.0-12.45.0-1build12.45.0-1ubuntu0.12.45.0-1ubuntu0.22.45.0-1ubuntu0.2+esm12.45.0-1ubuntu0.2+esm22.45.0-1ubuntu0.32.45.0-1ubuntu0.3+esm12.45.0-1ubuntu0.3+esm22.45.0-1ubuntu0.3+esm3
None known
gh
Ubuntu:26.10
All versions, plus listed versions
2.46.0-4
None known
gh
Ubuntu:Pro:26.04:LTS
All versions, plus listed versions
2.46.0-32.46.0-42.46.0-4ubuntu0.26.04.1~esm1
None known
gh
openSUSE:Tumbleweed
From an advisory covering 4 CVEs
before 2.97.0-1.1
2.97.0-1.1
gh
openSUSE:Leap 16.0
From an advisory covering 5 CVEs
before 2.98.0-bp160.1.1
2.98.0-bp160.1.1

History

History
RecordedChangedSources
affected, facts
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2026-64653 is a medium vulnerability (CVSS 5.1) in Cli, published August 6, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.51%, the 43rd percentile. Fixed in github.com/cli/cli/v2 2.97.0.

References

Show 14 moreShow less
This page doesn't list everything

Left out here: the rest of 1 source description. The JSON record has them.

MoveEnter Open