GitHub CLI gh codespace jupyter may allow code execution via unvalidated URLs from malicious Codespaces
Published 24 Nov 2026 · Updated 24 Nov 2026
Is your project on an affected github.com/cli/cli/v2?
Look after several Go apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected package
- Affected
- >=2.10.0 <2.96.0
- Fixed in
- 2.96.0
go get github.com/cli/cli/v2@v2.96.0Details
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. 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.
Is GHSA-8cg3-r6g9-fpg2 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected github.com/cli/cli/v2, and gives you the command that fixes it.
More advisories for github.com/cli/cli/v2
- LowCVE-2026-64653GitHub CLI allows path traversal through unescaped request URL components in github.com/cli/cli · 19 Oct 2026
- LowCVE-2026-64652GitHub CLI partially discloses authentication tokens in `gh auth status` output in github.com/cli/cli · 19 Oct 2026
- LowCVE-2026-64655GitHub CLI allows attestation verification bypass through unescaped regex metacharacters in github.com/cli/cli · 19 Oct 2026
- LowCVE-2026-64655GitHub CLI allows attestation verification bypass through unescaped regex metacharacters · 15 Oct 2026
- LowCVE-2026-64653GitHub CLI allows path traversal through unescaped request URL components · 15 Oct 2026
- LowCVE-2026-64652GitHub CLI partially discloses authentication tokens in `gh auth status` output · 15 Oct 2026
References
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.