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

Medium 4.4 Published Updated

GitHub CLI allows remote code execution when connecting to a malicious Codespace due to insufficient validation of JupyterLab URLs.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-59831?

CVE-2026-59831 is a medium-severity code injection vulnerability in cli, published on 9 Jul 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

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

Weakness: CWE-829

Which versions are affected by CVE-2026-59831?

How do I fix CVE-2026-59831?

Upgrade to a fixed version.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2026-59831 being exploited?

There is no known exploitation of CVE-2026-59831 in the wild and no public exploit code.

Sources

Also known as AZL-92328, DEBIAN-CVE-2026-59831, GHSA-8cg3-r6g9-fpg2, UBUNTU-CVE-2026-59831.

Is CVE-2026-59831 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free