MEDIUMCVSS 4.4Vulnerability

CVE-2026-59831

### 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, this can result in code execution on the user's workstation. The CLI trusts the URL provided by the Codespace and opens it as-is, without confirming that it is a loopback JupyterLab web address. The equivalent SSH commands received this validation in the CVE-2024-52308 fix, but the Jupyter command was not covered. In `v2.96.0`, the GitHub CLI validates the Jupyter server URL before opening it, accepting only loopback `http` and `https` addresses. ### Impact Any user who runs `gh codespace jupyt

Properties

Severity
medium
Summary
GitHub CLI gh codespace jupyter may allow code execution via unvalidated URLs from malicious Codespaces
Cvss score
4.4
Retrieved at
2026-11-25T01:13:14+00:00
Ghsa published
2026-11-24T22:26:25Z
Source url
https://github.com/advisories/GHSA-8cg3-r6g9-fpg2
Ghsa updated
2026-11-24T22:26:26Z
Ghsa id
GHSA-8cg3-r6g9-fpg2
Last source
GitHub Advisory Database
Cve id
CVE-2026-59831
Cvss vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N
First seen by Signal
2026-11-25T01:13:14+00:00
Is ghsa only
false

Related Entities (4)

AFFECTS (1)

VULNERABLE_TO (1)

Related research

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-59831 (CVSS 4.4) — Ninja Signal Threat Intelligence | Ninja Signal