Description
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.
Published: 2026-07-09
Score: 4.4 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

This vulnerability allows an attacker to execute arbitrary commands on a user’s machine by leveraging the GitHub CLI when connecting to a malicious Codespace. The mechanism involves the CLI opening a JupyterLab URL supplied from within the Codespace; because no validation is performed on the URL, a crafted vscode:// or vscode‑insiders:// link can be handed off to Visual Studio Code, resulting in command execution.

Affected Systems

GitHub CLI versions 2.10.0 through 2.95.0 are affected. The issue is resolved in version 2.96.0 and later.

Risk and Exploitability

The CVSS score of 4.4 indicates a medium severity, and the EPSS score indicates a very low probability of exploitation, less than 1%. The vulnerability is not listed in the CISA KEV catalog. An attacker can exploit this by creating a malicious Codespace that supplies a non‑loopback JupyterLab URL containing a vscode protocol scheme; when a user runs "gh codespace jupyter" the URL is executed, giving the attacker remote command execution capability. This exploitation requires the user to run the GitHub CLI against a Codespace controlled by the attacker, so the attack vector is inferred from the description.

Generated by OpenCVE AI on July 29, 2026 at 11:43 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the GitHub CLI to version 2.96.0 or later. This patch removes the validation flaw.
  • Restrict your organization’s codespace creation or review JupyterLab URLs before connecting to prevent malicious URLs from being used.
  • Configure your environment to block or monitor the vscode:// protocol in command‑line executions to mitigate accidental invocation of untrusted code.

Generated by OpenCVE AI on July 29, 2026 at 11:43 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 14 Jul 2026 02:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Thu, 09 Jul 2026 23:45:00 +0000

Type Values Removed Values Added
First Time appeared Cli
Cli cli
Vendors & Products Cli
Cli cli

Thu, 09 Jul 2026 22:45:00 +0000

Type Values Removed Values Added
Description 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.
Title GitHub CLI `gh codespace jupyter` could allow remote code execution when connecting to a malicious Codespace
Weaknesses CWE-829
References
Metrics cvssV3_1

{'score': 4.4, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-14T01:20:59.985Z

Reserved: 2026-07-07T15:00:50.979Z

Link: CVE-2026-59831

cve-icon Vulnrichment

Updated: 2026-07-14T01:20:55.417Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-29T11:45:03Z

Weaknesses
  • CWE-829

    Inclusion of Functionality from Untrusted Control Sphere