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

- Severity: Medium 4.4 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.26%, higher than 18% of CVEs (2026-12-01)
- Published: 2026-07-09T22:11:05.418Z
- Modified: 2026-11-24T22:45:04.181Z
- Also known as: GHSA-8cg3-r6g9-fpg2
- Weaknesses: CWE-20, CWE-829
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- cli cli: >= 2.10.0, < 2.96.0
- github.com/cli/cli/v2 (Go): from 2.10.0 before 2.96.0

## Every score

- GitHub_M: CVSS:3.1 4.4 Medium `CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:3.1 4.4 Medium `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> (web)
- <https://github.com/cli/cli/commit/b300f2ec7ec9dc9addc39b2ad88c54097ded7ca0> (web)
- <https://github.com/cli/cli/releases/tag/v2.96.0> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-59831> (advisory)
- <https://github.com/cli/cli> (package)

## Sources

- CVE List: [CVE-2026-59831](https://www.cve.org/CVERecord?id=CVE-2026-59831), CVE Terms of Use, modified 2026-07-14
- GitHub Advisory Database: [GHSA-8cg3-r6g9-fpg2](https://github.com/advisories/GHSA-8cg3-r6g9-fpg2), CC-BY-4.0, modified 2026-11-24
- NVD: [CVE-2026-59831](https://nvd.nist.gov/vuln/detail/CVE-2026-59831), Public domain, modified 2026-07-14

---

Page: https://cve.day/CVE-2026-59831 · Whole record: https://cve.day/CVE-2026-59831.json · Rebuilt by cve.day 2026-11-25T22:59:27.576Z
