Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐹 Go
Not in CISA KEV

GitHub CLI allows path traversal through unescaped request URL componentsGHSA-4fjg-2h4q-fwg3

Fix: cli/cli@0c2eea6

GHSA-4fjg-2h4q-fwg3 is a Path Traversal vulnerability in github.com/cli/cli/v2. A fix is available for github.com/cli/cli/v2 — see the affected versions and patch details below.

Also known asCVE-2026-64653GO-2026-6765
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Oct 22, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for GHSA-4fjg-2h4q-fwg3.

EPSS Exploitation Probability

via FIRST.org ↗
0.5%probability of exploitation in next 30 days
Lower Risk-0.02%
Lower risk than most CVEs43th percentile — riskier than 43% of all scored CVEsHighest risk
0.01%0.35%0.69%1.03%0.5%0.5%0.5%Sep 26Oct 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

Real-World Exposure

1 pkg affected
🐹github.com/cli/cli/v2

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.

Description

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.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐹Gogithub.com/cli/cli/v2all versions2.97.0go get github.com/cli/cli/v2@v2.97.0

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/cli/cli/v2, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update github.com/cli/cli/v2 to 2.97.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-4fjg-2h4q-fwg3 is resolved across your whole dependency graph.

  3. Workarounds

    Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatModerate

A flaw was found in GitHub CLI (gh). The tool fails to properly percent-encode variable path components in HTTP request URLs, allowing URL path metacharacters in attacker-controlled repository or resource values to redirect the CLI to a different API endpoint than intended. This could result in unintended actions or…

Workaround published by Red Hat
- Upgrade `gh` to version 2.97.0 or later. - Be cautious when running `gh` against untrusted repositories or inputs whose names you do not control.
Source: Red Hat security advisory for GHSA-4fjg-2h4q-fwg3 (CC BY 4.0)

Frequently Asked Questions

### 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
O3 Security · Impact-Aware SCA

Is GHSA-4fjg-2h4q-fwg3 in your dependencies?

Find it across Go, including transitive dependencies.

GitHub CLI allows path traversal through unescaped…