Skip to main content

GitHub CLI CVE-2026-59831

MEDIUM
Inclusion of Functionality from Untrusted Control Sphere (CWE-829)
2026-07-09 GitHub_M
4.4
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Attacker creates or compromises GitHub Codespace
  2. Delivery
    Victim authenticates and runs gh codespace jupyter
  3. Exploit
    Codespace process returns crafted vscode:// URI instead of loopback URL
  4. Execution
    CLI dispatches URI to OS without validation
  5. Persist
    OS invokes VS Code protocol handler
  6. Impact
    VS 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 gh codespace jupyter targeting an attacker-controlled or compromised Codespace - passive exploitation is not possible (UI:R). The attacker must control a process inside the target Codespace capable of serving a spoofed JupyterLab URL in place of a legitimate loopback address; this requires either owning the Codespace or compromising a process within one the victim trusts. VS Code or VS Code Insiders must be installed on the victim's local machine for the vscode:// URI to resolve to a meaningful action - without VS Code, the OS may silently drop or error on the unhandled scheme, limiting impact. Exploitation is further constrained by AC:H: the attacker must create a convincing Codespace environment that motivates the victim to use the jupyter subcommand specifically, rather than standard shell access.

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 vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=attacker-server URI. When a developer runs gh codespace jupyter to work in that Codespace, the CLI receives the spoofed URI and dispatches it to the OS without validation, causing VS Code to process the protocol handler and potentially clone a malicious repository or invoke a VS Code extension command on the developer's local machine. 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).
No patch listed yet 0.2% exploitation probability (EPSS)

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

Alert me

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

Vendor (GitHub_M) PRIMARY 4.4 MEDIUM
AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N
vuln.today AI 4.4 MEDIUM

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

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

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
High
Privileges Required
Low
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

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

EPSS Score
0.2%
Top 90% exploitable
Prevalence
Medium
popular developer CLI, not universally deployed outside engineering orgs
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment MSRC Vendor CIRCL 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.2%
Patch available No
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
Medium
Technical Impact
Partial

Priority Score

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

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

cpe:2.3:a:cli:cli:*:*:*:*:*:*:*:*

More in Cli

View all
CVE-2022-40764 HIGH POC
7.8 Oct 03

Snyk CLI before 1.996.0 allows arbitrary command execution, affecting Snyk IDE plugins and the snyk npm package. Rated h

CVE-2024-52308 CRITICAL
9.6 Nov 14

The GitHub CLI version 2.6.1 and earlier are vulnerable to remote code execution through a malicious codespace SSH serve

CVE-2026-106105 HIGH
8.4 Oct 06

Insecure file permissions in Quasar's development TLS certificate utility (@quasar/ssl-certificate before 2.1.0, shipped

CVE-2026-108259 HIGH
8.2 Oct 09

Code injection in @tinacms/cli versions up to and including 2.7.0 lets a crafted Git branch name break out of the string

CVE-2024-53859 HIGH
7.5 Nov 27

go-gh is a Go module for interacting with the `gh` utility and the GitHub API from the command line. Rated high severity

CVE-2026-56236 MEDIUM
6.8 Jun 21

Symlink-following vulnerabilities in Capgo CLI before version 12.128.2 (npm @capgo/cli < 7.84.6) allow an attacker who c

CVE-2026-57208 MEDIUM
6.2 Oct 23

Path traversal in Entire CLI 0.7.6 and earlier lets a collaborator who can push to the shared `entire/checkpoints/v1` br

CVE-2026-100620 MEDIUM
5.1 Sep 26

Capgo CLI's Android onboarding flow silently grants the Google Play service account it generates the account-wide Play C

CVE-2014-3342 MEDIUM
4.0 Sep 12

The CLI in Cisco IOS XR allows remote authenticated users to obtain sensitive information via unspecified commands, aka

CVE-2026-45803 LOW
3.5 May 15

Terminal escape sequence injection in GitHub CLI 1.6.0 through 2.91.x allows authenticated attackers with pull request c

CVE-2025-48938 LOW
2.6 May 30

go-gh is a collection of Go modules to make authoring GitHub CLI extensions easier. Rated low severity (CVSS 2.6), this

Vendor StatusVendor

SUSE

Severity: Moderate

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