home / blog
2026-11-25 · medium
CVE-2026-59831: Command execution vulnerability in GitHub CLI
GitHub CLI versions 2.10.0 to 2.95.0 vulnerable to command execution via malicious Codespaces.

CVE-2026-59831 is a vulnerability in GitHub CLI (gh) from version 2.10.0 through 2.95.0. When using the 'gh codespace jupyter' command to connect to a Codespace, the tool opens a JupyterLab URL supplied by the process inside the Codespace without validating that it is a loopback HTTP or HTTPS address. This lack of validation allows a crafted vscode:// or vscode-insiders:// URL to be passed to VS Code, potentially leading to code execution.
The vulnerability is classified as medium with a CVSS score of 4.4. It was officially published on July 9, 2026 in the NVD and is already reported on GitHub as having available exploits. There are public repositories that claim to contain exploit code for this vulnerability, though it is not confirmed if it is actively exploited in real campaigns.
For defense, it is recommended to immediately update GitHub CLI to version 2.96.0 or later, which fixes the issue. It is also advisable to implement strict access controls for Codespaces and limit the use of the 'gh codespace jupyter' command only to trusted environments. Monitor any suspicious activity related to GitHub CLI usage.
At a glance
- What
- Vulnerability allowing command execution when connecting to a malicious Codespace via 'gh codespace jupyter'
- Severity
- Medium (CVSS 4.4)
- Affected versions
- From 2.10.0 to 2.95.0
- Fix
- Version 2.96.0
- Status
- Confirmed vulnerability
- Action
- Update to version 2.96.0 or later
Sources: NVD, CVE-2026-59831