Vulnerability · Published Jul 9, 2026 · Assigned by GitHub_M

CVE-2026-59831GitHub CLI `gh codespace jupyter` could allow remote code execution when connecting to a malicious Codespace

Medium 4.4

In plain English

A medium-severity security flaw in cli from cli. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 26% of all known vulnerabilities).

Severity (CVSS 3.1)4.4Medium
Exploit odds (30 days)0.3%top 74.1% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12ghno fix listedDEBIAN-CVE-2026-59831
Debian:13ghno fix listedDEBIAN-CVE-2026-59831
Ubuntu:22.04:LTSghno fix listedUBUNTU-CVE-2026-59831
Ubuntu:26.10ghno fix listedUBUNTU-CVE-2026-59831

Affected products (as reported)

VendorProductVersions
cli cli >= 2.10.0, < 2.96.0

Weakness: CWE-829 · Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N

References