Skip to main content

GitHub CLI CVE-2026-64653

| EUVDEUVD-2026-54213 MEDIUM
Path Traversal (CWE-22)
2026-08-06 security-advisories@github.com
5.1
CVSS 4.0 · Vendor: github
Share

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/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
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
qualitative
Red Hat
5.4 MEDIUM
qualitative

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
A
Scope
X

Lifecycle Timeline

4
Source Code Evidence Fetched
Aug 06, 2026 - 23:23 vuln.today
Analysis Generated
Aug 06, 2026 - 23:23 vuln.today
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.

AnalysisAI

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.

Technical ContextAI

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.

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.

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
openSUSE Tumbleweed Fixed

Share

CVE-2026-64653 vulnerability details – vuln.today

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