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).
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | gh | no fix listed | DEBIAN-CVE-2026-59831 |
| Debian:13 | gh | no fix listed | DEBIAN-CVE-2026-59831 |
| Ubuntu:22.04:LTS | gh | no fix listed | UBUNTU-CVE-2026-59831 |
| Ubuntu:26.10 | gh | no fix listed | UBUNTU-CVE-2026-59831 |
Affected products (as reported)
Weakness: CWE-829 · Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N
References
- https://github.com/cli/cli/security/advisories/GHSA-8cg3-r6g9-fpg2 x_refsource_CONFIRM
- https://github.com/cli/cli/commit/b300f2ec7ec9dc9addc39b2ad88c54097ded7ca0 x_refsource_MISC
- https://github.com/cli/cli/releases/tag/v2.96.0 x_refsource_MISC