Executive brief
GitHub CLI is a command-line tool used by developers to interact with GitHub services, including managing cloud-hosted development environments called Codespaces. A security flaw in the tool's JupyterLab integration allows a malicious environment to send a specially crafted link to a user's computer. If a user connects to a compromised environment and accepts a prompt, an attacker could execute unauthorized commands on the user's local workstation, potentially leading to data theft or further system compromise.
Technical details
A vulnerability exists in GitHub CLI (gh) versions 2.10.0 through 2.95.0 within the 'gh codespace jupyter' command. The tool retrieves a JupyterLab server URL from a process inside the Codespace and opens it in the user's browser without validating that the address is a loopback HTTP/HTTPS URL. An attacker controlling a malicious Codespace can return a crafted 'vscode://' or 'vscode-insiders://' URL. When the CLI opens this link, the operating system passes it to VS Code, which may execute commands on the host machine if the user accepts a trust prompt. This is a variant of CVE-2024-52308 that missed the Jupyter code path. The issue is fixed in version 2.96.0 by enforcing loopback address validation.
Affected products
- GitHub cli >= 2.10.0, < 2.96.0
Timeline
- 2026-07-02: patched: Version 2.96.0 released
- 2026-07-02: advisory: GitHub Security Advisory GHSA-8cg3-r6g9-fpg2 published
- 2026-07-09: disclosed: CVE-2026-59831 published to NVD