{"id":"GHSA-8cg3-r6g9-fpg2","revision":null,"records":[{"revision":"9eb0ab0ac3b140da9e2b7c573133df04","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-59831","aliases":[],"title":"GitHub CLI `gh codespace jupyter` could allow remote code execution when connecting to a malicious Codespace","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.","state":0,"publishedAt":"2026-07-09T22:11:05.418+00:00","modifiedAt":"2026-07-14T01:20:59.985+00:00","affected":[{"ecosystem":"Vendor product","name":"cli","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"cli\",\n                    \"product\": \"cli\",\n                    \"versions\": [\n                        {\n                            \"version\": \">= 2.10.0, < 2.96.0\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N","score":4.4,"severity":"MEDIUM"}],"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"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-59831","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-59831","identifiers":["CVE-2026-59831"]},"retained":false,"historicalAffected":[]},{"revision":"23372b23e26541699796ccf2d0b39127","observedAt":"2026-11-24T23:12:59.651+00:00","statement":{"source":"euvd","id":"EUVD-2026-42741","aliases":["CVE-2026-59831"],"title":"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 i…","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.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N","score":4.4,"severity":null}],"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"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-42741","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Jul 9, 2026, 10:11:05 PM","dateUpdated":"Jul 14, 2026, 1:20:59 AM"},"relatedAdvisories":[{"id":"openSUSE-SU-2026:22134-1","title":"Security update for gh","vulnerabilityIds":["CVE-2026-41178","CVE-2026-59831","CVE-2026-63209","CVE-2026-72924","CVE-2026-78669","CVE-2026-84303","CVE-2026-84304","CVE-2026-84445"]},{"id":"openSUSE-SU-2026:12163-1","title":"gh-2.102.0-1.1 on GA media","vulnerabilityIds":["CVE-2026-41178","CVE-2026-59831","CVE-2026-63209","CVE-2026-72924","CVE-2026-78669","CVE-2026-84304","CVE-2026-84445"]},{"id":"msrc_CVE-2026-59831","title":"GitHub CLI `gh codespace jupyter` could allow remote code execution when connecting to a malicious Codespace","vulnerabilityIds":["CVE-2026-59831"]}],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2026-42741","identifiers":["EUVD-2026-42741","CVE-2026-59831"]},"retained":false,"historicalAffected":[]},{"revision":"232e70f9c8154b75b8fdbaa63db0fa11","observedAt":"2026-11-24T23:11:12.398+00:00","statement":{"source":"nvd","id":"CVE-2026-59831","aliases":[],"title":"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 i…","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.","state":0,"publishedAt":"2026-07-09T23:17:05.483+00:00","modifiedAt":"2026-07-14T02:16:57.493+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N","score":4.4,"severity":"MEDIUM"}],"references":["https://github.com/cli/cli/commit/b300f2ec7ec9dc9addc39b2ad88c54097ded7ca0","https://github.com/cli/cli/releases/tag/v2.96.0","https://github.com/cli/cli/security/advisories/GHSA-8cg3-r6g9-fpg2"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-59831","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Awaiting Analysis","weaknesses":["CWE-829"],"productCriteria":[],"sourceDates":{"published":"2026-07-09T23:17:05.483","lastModified":"2026-07-14T02:16:57.493"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-59831","identifiers":["CVE-2026-59831"]},"retained":false,"historicalAffected":[]},{"revision":"6c01750011e849d4ac88b4e5f8f3cbc7","observedAt":"2026-11-24T23:10:59.414+00:00","statement":{"source":"osv","id":"GHSA-8cg3-r6g9-fpg2","aliases":["CVE-2026-59831"],"title":"GitHub CLI gh codespace jupyter may allow code execution via unvalidated URLs from malicious Codespaces","description":"### Summary\n\nA security vulnerability has been identified in GitHub CLI that could allow remote code execution when users connect to a malicious Codespace using the `gh codespace jupyter` command. The command opens JupyterLab by launching a URL in the user's browser, but that URL is supplied by a process running inside the Codespace and the CLI opens it without validating it.\n\nThe browser launcher accepts `vscode://` and `vscode-insiders://` links, so a malicious Codespace can return a crafted `vscode://` URL. The CLI opens the link, the operating system hands it to VS Code, and VS Code acts on it, which can lead to code execution on the user's workstation.\n\nThis is a variant of [CVE-2024-52308](https://github.com/advisories/GHSA-p2h2-3vg9-4p87). That remediation validated the SSH connection details for `gh codespace ssh` and `gh codespace logs`, but did not cover the equivalent Jupyter code path.\n\n### Details\n\nThe vulnerability stems from the way GitHub CLI handles the server URL returned when starting a remote JupyterLab server:\n\n1. A user runs `gh codespace jupyter -c <name>`, expecting a normal `https://` JupyterLab page.\n2. The CLI retrieves a server URL from a process inside the Codespace and opens it in the user's browser without confirming that it is a web address.\n3. A malicious Codespace returns a `vscode://` link in place of the expected JupyterLab address. The operating system passes the link to VS Code.\n4. VS Code acts on the link. With a single trust prompt, this can result in code execution on the user's workstation.\n\nThe CLI trusts the URL provided by the Codespace and opens it as-is, without confirming that it is a loopback JupyterLab web address. The equivalent SSH commands received this validation in the CVE-2024-52308 fix, but the Jupyter command was not covered.\n\nIn `v2.96.0`, the GitHub CLI validates the Jupyter server URL before opening it, accepting only loopback `http` and `https` addresses.\n\n### Impact\n\nAny user who runs `gh codespace jupyter` against an untrusted Codespace.\n\nSuccessful exploitation requires the victim to accept one VS Code \"open URL\" or Workspace Trust prompt.\n\n## Remediation and Mitigation\n\n1. Upgrade `gh` to `v2.96.0`.\n2. Exercise caution when using `gh codespace jupyter` with untrusted Codespaces. Prefer Codespaces created from trusted sources, and prefer default or pre-built devcontainers.","state":0,"publishedAt":"2026-11-24T22:26:25+00:00","modifiedAt":"2026-11-24T22:45:04.1815268+00:00","affected":[{"ecosystem":"Go","name":"github.com/cli/cli/v2","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"2.10.0"},{"kind":"fixed","version":"2.96.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/cli/cli/security/advisories/GHSA-8cg3-r6g9-fpg2","https://nvd.nist.gov/vuln/detail/CVE-2026-59831","https://github.com/cli/cli/commit/b300f2ec7ec9dc9addc39b2ad88c54097ded7ca0","https://github.com/cli/cli","https://github.com/cli/cli/releases/tag/v2.96.0"],"sourceUrl":"https://github.com/advisories/GHSA-8cg3-r6g9-fpg2","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-8cg3-r6g9-fpg2","identifiers":["GHSA-8cg3-r6g9-fpg2","CVE-2026-59831"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-25T01:18:30.5290389+00:00","complete":true,"records":1795,"lastAttemptAt":"2026-11-25T01:18:30.5290389+00:00","lastSuccessAt":"2026-11-25T01:18:30.6705522+00:00","error":null,"lastVerifiedAt":"2026-11-25T01:18:30.6705537+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-8d356adab43082cb10bb7c033ed58312cf2ad2f0fb10e0afdf27fc89fa361f3b-8739c76e681f900923b900c9df0ef75cf421d39cabb54650c4b9ad19b6a76d85","complete":true,"records":431850,"lastAttemptAt":"2026-11-25T01:16:34.841515+00:00","lastSuccessAt":"2026-11-25T01:16:34.8333088+00:00","error":null,"lastVerifiedAt":"2026-11-25T01:16:34.841515+00:00","snapshotPublishedAt":"2026-11-25T00:34:35+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-e1d1f494fbcb4a27a8ca80fa6b80d42f","complete":false,"records":13938,"lastAttemptAt":"2026-11-25T01:19:38.338737+00:00","lastSuccessAt":"2026-11-25T01:19:38.332+00:00","error":"65 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-25T01:19:38.332+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13910,"expectedIdentifiers":13986,"failedIdentifiers":65},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-25T01:18:30.5290389+00:00","complete":true,"records":1131,"lastAttemptAt":"2026-11-25T01:18:30.5290389+00:00","lastSuccessAt":"2026-11-25T01:18:30.671369+00:00","error":null,"lastVerifiedAt":"2026-11-25T01:18:30.6713693+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-01e95ac6b13c4e638f57827fb0c076bb","complete":false,"records":13950,"lastAttemptAt":"2026-11-25T01:18:56.2337678+00:00","lastSuccessAt":"2026-11-25T01:18:56.229+00:00","error":"25 identifier lookups failed; latest failures include request timeout. Other identifiers were checked independently.","lastVerifiedAt":"2026-11-25T01:18:56.229+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13961,"expectedIdentifiers":13986,"failedIdentifiers":25},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-e743412268199d418c20ac5ea5d5eefbef4a1c78fcbacada525fcf2201b41d4a","complete":true,"records":10077,"lastAttemptAt":"2026-11-25T01:18:30.034104+00:00","lastSuccessAt":"2026-11-24T23:11:09.9983084+00:00","error":null,"lastVerifiedAt":"2026-11-25T01:18:30.034104+00:00","snapshotPublishedAt":"2026-11-24T22:48:13+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-6ba2352decd0c95d34a1b50f642582aa34659ce946f552488f0a5cea4e0cc09a","complete":true,"records":2020,"lastAttemptAt":"2026-11-25T01:16:34.9953425+00:00","lastSuccessAt":"2026-11-20T15:46:15.4249619+00:00","error":null,"lastVerifiedAt":"2026-11-25T01:16:34.9953425+00:00","snapshotPublishedAt":"2026-11-20T14:48:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-40938cbac3e2265a24e0d129a60138a855ec8a44cbd619ad6c0de0b22c0e253f","complete":true,"records":3221,"lastAttemptAt":"2026-11-25T01:18:30.4764058+00:00","lastSuccessAt":"2026-11-24T22:27:06.1844325+00:00","error":null,"lastVerifiedAt":"2026-11-25T01:18:30.4764058+00:00","snapshotPublishedAt":"2026-11-24T22:03:27+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-9c9951438d6c717a698ba55ff3f940cbec4dcd9513985b5620a301383384f82e","complete":true,"records":233046,"lastAttemptAt":"2026-11-25T01:18:29.899066+00:00","lastSuccessAt":"2026-11-25T01:18:28.6314102+00:00","error":null,"lastVerifiedAt":"2026-11-25T01:18:29.899066+00:00","snapshotPublishedAt":"2026-11-25T00:48:33+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}