GitHub CLI CVE-2026-59831
MEDIUMAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAttacker creates or compromises GitHub Codespace
-
DeliveryVictim authenticates and runs gh codespace jupyter
-
ExploitCodespace process returns crafted vscode:// URI instead of loopback URL
-
ExecutionCLI dispatches URI to OS without validation
-
PersistOS invokes VS Code protocol handler
-
ImpactVS Code executes attacker-controlled command on developer machine
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A08:2025 - Software or Data Integrity Failures
ASVS 5.0
V15 - Secure Coding and Architecture Trusted source inclusion only
|
| Exploitation Conditions | The victim must be an authenticated GitHub user (PR:L) and must actively run |
| Impact | The CVSS base score of 4.4 (Medium) with vector CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N accurately captures the constrained but real threat. High attack complexity (AC:H) reflects that the attacker must control or have compromised a Codespace environment and entice the victim to connect specifically via the jupyter subcommand. Low privilege (PR:L) confirms the victim must be an authenticated GitHub user - unauthenticated exploitation is not possible. User interaction (UI:R) means passive or drive-by exploitation is ruled out. The scope change (S:C) is the most significant risk amplifier: while direct CLI impact is limited (C:L/I:L), the VS Code URI handler can produce higher-impact outcomes through extension execution, making C:L/I:L a floor rather than a ceiling for real-world impact. No EPSS data was provided in the input, KEV status is absent, and no public exploit code has been identified - this is not currently a high-urgency patching priority for most organizations, but developers who connect to untrusted Codespaces are meaningfully exposed. The 'Information Disclosure' tag in the source data undersells the potential integrity impact; command execution through VS Code URIs is a more accurate characterization. |
| Exploit ScenarioDerived | An attacker creates a public or shared GitHub Codespace and configures a background process to intercept or replace the JupyterLab startup URL with a crafted |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 09, 2026
Command execution via URI injection in GitHub CLI's gh codespace jupyter subcommand (versions 2.10.0-2.95.0) allows an attacker who controls a Codespace to redirect a connecting developer's VS Code instance into executing arbitrary protocol handler actions. The CLI passes a JupyterLab URL sourced from a process inside the Codespace directly to the OS without validating that the URL is a loopback HTTP or HTTPS address, enabling substitution with a crafted vscode:// or vscode-insiders:// URI. No public exploit has been identified at time of analysis and this CVE is not listed in CISA's Known Exploited Vulnerabilities catalog, but the scope-change characteristic (S:C) means local VS Code extension execution is a realistic downstream impact.
RemediationAI
Upgrade GitHub CLI to version 2.96.0 or later, which introduces loopback URL validation before dispatching JupyterLab URLs to the OS. The patch commit is at https://github.com/cli/cli/commit/b300f2ec7ec9dc9addc39b2ad88c54097ded7ca0 and the official release is at https://github.com/cli/cli/releases/tag/v2.96.0. If an immediate upgrade is not feasible, avoid using gh codespace jupyter to connect to any Codespace not created and fully controlled by your own organization. As a compensating control, disabling the vscode:// and vscode-insiders:// URI protocol handlers at the OS level will prevent VS Code from processing injected URIs; note that this trade-off breaks legitimate VS Code deep-link workflows including some extension install flows. Restricting outbound connections from developer workstations to known Codespace endpoints does not mitigate this issue, as the malicious URL is returned over an already-established connection.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
CWE-829 (Inclusion of Functionality from Untrusted Control Sphere) describes the root cause: the gh codespace jupyter command trusts a URL returned by an arbitrary process running inside the remote Codespace environment - a trust boundary violation. The fix requires validating that the returned URL resolves to a loopback address (127.0.0.1 or ::1) over HTTP or HTTPS before dispatching it to the OS. Without this check, a Codespace-internal process can substitute a vscode:// or vscode-insiders:// protocol handler URI, which the OS hands to VS Code. VS Code's URI handler is capable of invoking extension commands, opening workspaces, or performing file operations on the developer's local machine. The CPE cpe:2.3:a:cli:cli:*:*:*:*:*:*:*:* covers the GitHub CLI (gh) binary across all platforms where it is installed.
Know when Cli gets its next vulnerability
- 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
AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N
Requires authenticated GitHub user (PR:L) to actively connect to a malicious Codespace (AC:H, UI:R); scope changes as VS Code handles the injected URI on the local machine (S:C).
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
DescriptionCVE.org
GitHub CLI (gh) is GitHub’s official command line tool. From 2.10.0 through 2.95.0, connecting to a malicious Codespace with gh codespace jupyter can allow command execution because the command opens a JupyterLab URL supplied by a process inside the Codespace without validating that it is a loopback HTTP or HTTPS address, allowing a crafted vscode:// or vscode-insiders:// URL to be handed to VS Code. This issue is fixed in version 2.96.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
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Affected Products (CPE)CVE.org
Snyk CLI before 1.996.0 allows arbitrary command execution, affecting Snyk IDE plugins and the snyk npm package. Rated h
The GitHub CLI version 2.6.1 and earlier are vulnerable to remote code execution through a malicious codespace SSH serve
Insecure file permissions in Quasar's development TLS certificate utility (@quasar/ssl-certificate before 2.1.0, shipped
Code injection in @tinacms/cli versions up to and including 2.7.0 lets a crafted Git branch name break out of the string
go-gh is a Go module for interacting with the `gh` utility and the GitHub API from the command line. Rated high severity
Symlink-following vulnerabilities in Capgo CLI before version 12.128.2 (npm @capgo/cli < 7.84.6) allow an attacker who c
Path traversal in Entire CLI 0.7.6 and earlier lets a collaborator who can push to the shared `entire/checkpoints/v1` br
Capgo CLI's Android onboarding flow silently grants the Google Play service account it generates the account-wide Play C
The CLI in Cisco IOS XR allows remote authenticated users to obtain sensitive information via unspecified commands, aka
Terminal escape sequence injection in GitHub CLI 1.6.0 through 2.91.x allows authenticated attackers with pull request c
go-gh is a collection of Go modules to make authoring GitHub CLI extensions easier. Rated low severity (CVSS 2.6), this
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB