GitHub CLI `gh codespace jupyter` could allow remote code execution when connecting to a malicious Codespace
cve-program · CVE-2026-59831
PublishedGitHub 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.
Read the publisher's advisoryeuvd · EUVD-2026-42741
PublishedGitHub 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.
Read the publisher's advisorynvd · CVE-2026-59831
PublishedGitHub 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.
Read the publisher's advisoryosv · GHSA-8cg3-r6g9-fpg2
Published### 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 jupyter` against an untrusted Codespace. Successful exploitation requires the victim to accept one VS Code "open URL" or Workspace Trust prompt. ## Remediation and Mitigation 1. Upgrade `gh` to `v2.96.0`. 2. Exercise caution when using `gh codespace jupyter` with untrusted Codespaces. Prefer Codespaces created from trusted sources, and prefer default or pre-built devcontainers.
Read the publisher's advisoryAffected versions, risk and source history
Exploitation and risk
Source statusCISA KEV lists vulnerabilities known to be exploited. FIRST EPSS estimates the likelihood of exploitation in the next 30 days. An unavailable score does not mean zero risk.
Which CVEs have scores here?
This view includes predictions for CVE identifiers explicitly listed in public NuGet advisories. Microsoft release pages have their own prediction coverage. Check source status for the scope and latest checks.
No exploitation or prediction data is available here for these CVEs. This does not mean they are safe or unlikely to be exploited.
cve-program · CVE-2026-59831
PublishedGitHub CLI `gh codespace jupyter` could allow remote code execution when connecting to a malicious Codespace
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.
- Source published
- 9 Jul 2026 22:11:05 UTC
- Source modified
- 14 Jul 2026 01:20:59 UTC
- Saved here
- 23 Oct 2026 15:48:27 UTC
- Source terms
- CVE Program Terms of Use
Original source record · Cite this exact observation · Complete original publisher JSON
Source: cve-program · CVE Program Terms of Use. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
CVSS 3.1 · 4.4 CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N
euvd · EUVD-2026-42741
PublishedGitHub 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 i…
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.
Additional publisher context
EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON.
Original publisher date fields
datePublished: Jul 9, 2026, 10:11:05 PM
dateUpdated: Jul 14, 2026, 1:20:59 AM
3 related source bulletins · separate from aliases
openSUSE-SU-2026:22134-1: Security update for gh
CVE-2026-41178 · CVE-2026-59831 · CVE-2026-63209 · CVE-2026-72924 · CVE-2026-78669 · CVE-2026-84303 · CVE-2026-84304 · CVE-2026-84445
openSUSE-SU-2026:12163-1: gh-2.102.0-1.1 on GA media
CVE-2026-41178 · CVE-2026-59831 · CVE-2026-63209 · CVE-2026-72924 · CVE-2026-78669 · CVE-2026-84304 · CVE-2026-84445
msrc_CVE-2026-59831: GitHub CLI `gh codespace jupyter` could allow remote code execution when connecting to a malicious Codespace
CVE-2026-59831
- Source published
- Jul 9, 2026, 10:11:05 PM (timezone not stated)
- Source modified
- Jul 14, 2026, 1:20:59 AM (timezone not stated)
- Saved here
- 24 Nov 2026 23:12:59 UTC
- Source terms
- ENISA EUVD · source terms and attribution apply
Original source record · Cite this exact observation · Complete original publisher JSON
Source: euvd · ENISA EUVD · source terms and attribution apply. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
EUVD CVSS 3.1 · 4.4 CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N
nvd · CVE-2026-59831
PublishedGitHub 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 i…
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.
Additional publisher context
NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.
Source analysis status: Awaiting Analysis
Weakness classifications: CWE-829
Original publisher date fields
published: 2026-07-09T23:17:05.483
lastModified: 2026-07-14T02:16:57.493
- Source published
- 9 Jul 2026 23:17:05 UTC
- Source modified
- 14 Jul 2026 02:16:57 UTC
- Saved here
- 24 Nov 2026 23:11:12 UTC
- Source terms
- NIST NVD usage terms; underlying source attribution retained
Original source record · Cite this exact observation · Complete original publisher JSON
Source: nvd · NIST NVD usage terms; underlying source attribution retained. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
CVSS 3.1 · [email protected] · Secondary · 4.4 CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N
osv · GHSA-8cg3-r6g9-fpg2
PublishedGitHub CLI gh codespace jupyter may allow code execution via unvalidated URLs from malicious Codespaces
### 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 jupyter` against an untrusted Codespace. Successful exploitation requires the victim to accept one VS Code "open URL" or Workspace Trust prompt. ## Remediation and Mitigation 1. Upgrade `gh` to `v2.96.0`. 2. Exercise caution when using `gh codespace jupyter` with untrusted Codespaces. Prefer Codespaces created from trusted sources, and prefer default or pre-built devcontainers.
- Source published
- 24 Nov 2026 22:26:25 UTC
- Source modified
- 24 Nov 2026 22:45:04 UTC
- Saved here
- 24 Nov 2026 23:10:59 UTC
- Source terms
- GitHub Advisory Database · CC-BY-4.0
Original source record · Cite this exact observation · Complete original publisher JSON
Source: osv · GitHub Advisory Database · CC-BY-4.0. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
CVSS_V3 · CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N
Publisher rating · MODERATE