Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAttacker creates repository with URL path metacharacters in name
-
DeliveryVictim runs gh CLI command targeting attacker repository
-
ExploitCLI interpolates unencoded repository name into API URL path via fmt.Sprintf
-
ExecutionHTTP request resolves to unintended GitHub API endpoint
-
PersistGitHub API responds with data from unintended resource
-
ImpactAttacker-influenced API response processed by gh
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | The victim must actively invoke gh CLI against an attacker-controlled repository or resource whose name or metadata contains URL path metacharacters (forward slashes, dots used for traversal, or percent-encoded equivalents). The CVSS 4.0 vector's UI:A confirms that passive exploitation without user action is not possible - the victim must deliberately run a gh command targeting the malicious repository. Exploitation is further constrained by the GitHub API itself, which enforces its own access controls on traversed endpoints; the attacker can redirect the victim's API session but cannot escalate beyond the victim's existing GitHub permissions. The vulnerability does not affect local file access or system integrity. Risk is highest in automated CI/CD environments that accept third-party repository names as input to gh commands without sanitization. |
| Impact | The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N) scores 5.1 Medium, reflecting that active user interaction (UI:A) is required and that impact is limited to the subsequent system - the GitHub API - at a low severity (SC:L/SI:L). The vulnerable system itself (the local gh binary and host) shows no confidentiality, integrity, or availability impact (VC:N/VI:N/VA:N), meaning the flaw cannot be used for local code execution or credential theft. No CISA KEV listing is present and no EPSS data was provided, so exploitation prevalence is unknown. Real-world risk is highest in automated CI/CD pipelines that invoke gh against third-party or user-submitted repository names, where metacharacter-crafted names could redirect API calls without operator awareness. For interactive users, the UI:A requirement and the limited, low-severity API misdirection represent a genuine but bounded risk. This is not a priority comparable to RCE or credential-exposure CVEs, but CI/CD consumers of untrusted repository inputs should treat this as elevated. |
| Exploit ScenarioDerived | An attacker creates a public GitHub repository whose name contains URL path metacharacters - for example, a name crafted to resolve as '../../orgs/victim-org/members' when interpolated into an API path. When a developer or CI pipeline runs a gh command targeting this repository (such as gh pr list --repo attacker/crafted-name), the CLI builds the REST API URL without encoding the name, causing the HTTP request to resolve a different GitHub API endpoint than intended, potentially exposing or manipulating resources in the victim's session context. No public exploit code has been identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 06, 2026
URL path injection in GitHub CLI (gh) prior to version 2.97.0 allows attacker-controlled repository names or resource values containing URL path metacharacters to redirect the tool's REST API requests to unintended GitHub API endpoints. The root cause is that HTTP request paths are assembled via Go's fmt.Sprintf by interpolating untrusted values - such as repository owner, name, or branch - without percent-encoding, enabling path traversal through the API surface. No public exploit has been identified at time of analysis, and the vulnerability requires active user interaction with an attacker-controlled repository.
RemediationAI
Upgrade GitHub CLI to version 2.97.0 or later; this is the vendor-released patch confirmed by the official release at https://github.com/cli/cli/releases/tag/v2.97.0 and the fix commit at https://github.com/cli/cli/commit/0c2eea6338a2323cfff000160b9b5a56a38d2a06. No workaround is documented by the vendor. As a compensating control, CI/CD pipelines that pass user-supplied or third-party repository names to gh commands should validate that those names conform to GitHub's allowed repository name characters (alphanumeric, hyphens, underscores, dots) and reject inputs containing '/', '%', or other URL metacharacters before passing them to the CLI - note this adds input-validation overhead and may require updates if GitHub ever permits additional characters.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 3 packages in go, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
GitHub CLI (cli/cli) is written in Go and constructs GitHub REST API request URLs by interpolating repository metadata (owner, name, branch) directly into path strings. The underlying flaw is CWE-22 (Improper Limitation of a Pathname to a Restricted Directory) expressed as URL path traversal: values containing metacharacters such as '/', '..', or their percent-encoded forms are embedded in API paths without sanitization, causing the resulting HTTP request to resolve a different endpoint than intended. The fix, confirmed by commit 0c2eea6, introduces an internal safeurl package enforcing that all HTTP requests route through safeurl.JoinPath for proper component encoding; a new ImmutableSafeURL type is restricted to pre-formed trusted URLs only, and two new CodeQL queries (ImmutableSafeURLConstruction.ql and SafeURLPathConstruction.ql) statically enforce these construction patterns across the codebase going forward. Affected versions are cli < 2.97.0 per EUVD-2026-54213.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Attacker requires no privileges (public repo); victim must actively run gh (UI:R); impact is scoped to the GitHub API (S:C) at low C/I with no local system impact.
Primary rating from Vendor (github).
CVSS VectorVendor: github
Lifecycle Timeline
2DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
Same weakness CWE-22 – Path Traversal
View allSame technique Path Traversal
View allVendor StatusVendor
SUSE
Severity: Moderate| Product | Status |
|---|---|
| openSUSE Tumbleweed | Fixed |
EUVD-2026-54213
GHSA-4fjg-2h4q-fwg3
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB