CVE Professor
/
All CVEs
CVE-2026-59831

CVE-2026-59831 — Github.com/cli/cli/v2 — CWE-20 · CWE-829

MEDIUM CVSS 4.4 ⚡ EPSS 0.3% GitHub

### Summary A security vulnerability has been identified in GitHub CLI that could allow remote code execution when users connect to a malicious Codespace using the `gh codespace jupyter` command. The command opens JupyterLab by launching a URL in the user's browser, but that URL is supplied by a process running inside the Codespace and the CLI opens it without validating it. The browser launcher accepts `vscode://` and `vscode-insiders://` links, so a malicious Codespace can return a crafted `vscode://` URL. The CLI opens the link, the operating system hands it to VS Code, and VS Code acts on it, which can lead to code execution on the user's workstation. This is a variant of [CVE-2024-52308](https://github.com/advisories/GHSA-p2h2-3vg9-4p87). That remediation validated the SSH connection details for `gh codespace ssh` and `gh codespace logs`, but did not cover the equivalent Jupyter code path. ### Details The vulnerability stems from the way GitHub CLI handles the server URL returned when starting a remote JupyterLab server: 1. A user runs `gh codespace jupyter -c <name>`, expecting a normal `https://` JupyterLab page. 2. The CLI retrieves a server URL from a process inside the Codespace and opens it in the user's browser without confirming that it is a web address. 3. A malicious Codespace returns a `vscode://` link in place of the expected JupyterLab address. The operating system passes the link to VS Code. 4. VS Code acts on the link. With a single trust prompt, thi

### Summary A security vulnerability has been identified in GitHub CLI that could allow remote code execution when users connect to a malicious Codespace using the `gh codespace jupyter` command. The command opens JupyterLab by launching a URL in the user's browser, but that URL is supplied by a process running inside the Codespace and the CLI opens it without validating it. The browser launcher accepts `vscode://` and `vscode-insiders://` links, so a malicious Codespace can return a crafted `vscode://` URL. The CLI opens the link, the operating system hands it to VS Code, and VS Code acts on it, which can lead to code execution on the user's workstation. This is a variant of [CVE-2024-52308](https://github.com/advisories/GHSA-p2h2-3vg9-4p87). That remediation validated the SSH connection details for `gh codespace ssh` and `gh codespace logs`, but did not cover the equivalent Jupyter code path. ### Details The vulnerability stems from the way GitHub CLI handles the server URL returned when starting a remote JupyterLab server: 1. A user runs `gh codespace jupyter -c <name>`, expecting a normal `https://` JupyterLab page. 2. The CLI retrieves a server URL from a process inside the Codespace and opens it in the user's browser without confirming that it is a web address. 3. A malicious Codespace returns a `vscode://` link in place of the expected JupyterLab address. The operating system passes the link to VS Code. 4. VS Code acts on the link. With a single trust prompt, thi

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N
Attack Vector Network AV:N
Attack Complexity High AC:H
Privileges Req. Low PR:L
User Interaction Required UI:R
Scope Changed S:C
Confidentiality Low C:L
Integrity Low I:L
Availability None A:N
EPSS — Exploit Prediction Scoring System
0.3%
30-day probability
In the 26. percentile of all CVEs — higher exploitation probability than most vulnerabilities.
AI Security Analysis & Remediation

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CVE-2026-59831
CVSS 4.4/10 · MEDIUM · 24.11.2026
CWE: CWE-20, CWE-829
Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🎯 WHAT IS THIS VULNERABILITY?
OS Command Injection
Summary: ### Summary

A security vulnerability has been identified in GitHub CLI that could allow remote code execution when users connect to a malicious Codespace using the gh codespace jupyter command. The command opens JupyterLab by launching a URL in the user's browser, but that URL is supplied by a process running inside the Codespace and the CLI opens it without validating it. The browser launch…
Affected: github.com/cli/cli/v2

⚡ ATTACK VECTOR
Network / Remote (AV:N) · low-privilege account (PR:L) · user interaction required (UI:R).
⚠️ Scope changes (S:C) — impact can cross security boundaries.

🌍 REAL WORLD IMPACT
All confidential data readable/stealable; limited integrity modification (I:L); pivot to other systems possible.

🛡️ REMEDIATION
→ Apply vendor security update for github.com/cli/cli/v2.
→ Never pass user input to shell commands.
→ Add WAF rule, create IDS alert for anomalous traffic.

⚠️ URGENCY
📋 Routine update cycle (30 days)

────────────────────────────────────────
[Automated Technical Vulnerability & CVSS Vector Analysis]

Target Reconnaissance Queries (FOFA & Shodan)
CVSS Score
4.4 / 10 · CVSS MEDIUM
Weakness Types (CWE)
CWE-20 CWE-829
Affected Products (1)
github.com/cli/cli/v2
References & Advisories (4)
Related CVEs
9.4
CVE-2026-68548
## Summary Algernon's URL-prefix authorization gate matches its protected prefixes (`/admin`, `/repo`, `/data`
8.2
CVE-2026-145366
### Summary A URI SAN is a context-specific, primitive GeneralName with tag number 6 (identifier octet `0x86`
7.7
CVE-2026-145367
### Summary In ambient mode, `istiod` does not correctly convert the `trustDomains` and `notTrustDomains` sou
5.6
CVE-2026-145239
### Summary `AuthorizationPolicy` `source.ipBlocks`, `source.notIpBlocks` and the `source.ip` condition on am
9.2
CVE-2026-115991
Exposure of sensitive information in the content lock-check endpoints (PUT /api/content/canLock and GET /api/v
8.5
CVE-2026-144576
PDM through 2.29.8 contains a code execution vulnerability that allows malicious repositories to run scripts b
8.2
CVE-2026-144623
Micronaut core HTTP client 4.10.24 through 4.10.37 and 5.0.1 through 5.3.0 contains a credential leak vulnerab