Skip to main content

GitHub CLI CVE-2026-64653

| EUVDEUVD-2026-54213 MEDIUM
Path Traversal (CWE-22)
2026-08-06 security-advisories@github.com GHSA-4fjg-2h4q-fwg3
5.1
CVSS 4.0 · Vendor: github
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Attacker creates repository with URL path metacharacters in name
  2. Delivery
    Victim runs gh CLI command targeting attacker repository
  3. Exploit
    CLI interpolates unencoded repository name into API URL path via fmt.Sprintf
  4. Execution
    HTTP request resolves to unintended GitHub API endpoint
  5. Persist
    GitHub API responds with data from unintended resource
  6. Impact
    Attacker-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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

cli < 2.97.0

Affected Packages

go github.com/cli/cli no fix
go github.com/cli/cli/v2 fix: 2.97.0
euvd cli fix: 2.97.0

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

Vendor (github) PRIMARY 5.1 MEDIUM
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
vuln.today AI 6.1 MEDIUM

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.

3.1 AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
SUSE MEDIUM
Red Hat 5.4 MEDIUM

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Active
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
Low
Subsequent system: Integrity
Low
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Aug 06, 2026 - 23:03 EUVD
CVE Published
Aug 06, 2026 - 22:18 cve.org
MEDIUM 5.1

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

EPSS Score
0.5%
Top 60% exploitable
Prevalence
High
default developer tool in GitHub-centric CI/CD environments globally
Threat Intel
1
1 sources
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA MSRC Vendor GitHub VulDB

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

Priority Score

27
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +26
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
openSUSE Tumbleweed Fixed

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy