Loading advisory.
Loading advisory.
Connecting to a malicious Codespaces via GH CLI could allow command execution on the user's computer
A security vulnerability has been identified in GitHub CLI that could allow remote code execution (RCE) when users connect to a malicious Codespace SSH server and use the gh codespace ssh or gh codespace logs commands.
Published 2024-11-14 17:39 UTC · Modified 2026-09-10 03:50 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score. How tiers work
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| github.com/cli/cli/v2 | Go | < 2.62.0 | 2.62.0 | go get github.com/cli/cli/v2@v2.62.0 |
| github.com/cli/cli | Go | < 2.62.0 all versions | 2.62.0 | go get github.com/cli/cli@v2.62.0 |
A security vulnerability has been identified in GitHub CLI that could allow remote code execution (RCE) when users connect to a malicious Codespace SSH server and use the gh codespace ssh or gh codespace logs commands.
The vulnerability stems from the way GitHub CLI handles SSH connection details when executing commands. When developers connect to remote Codespaces, they typically use a SSH server running within a devcontainer, often provided through the default devcontainer image. GitHub CLI retrieves SSH connection details, such as remote username, which is used in executing ssh commands for gh codespace ssh or gh codespace logs commands.
This exploit occurs when a malicious third-party devcontainer contains a modified SSH server that injects ssh arguments within the SSH connection details. gh codespace ssh and gh codespace logs commands could execute arbitrary code on the user's workstation if the remote username contains something like -oProxyCommand="echo hacked" #. The -oProxyCommand flag causes ssh to execute the provided command while # shell comment causes any other ssh arguments to be ignored.
In 2.62.0, the remote username information is being validated before being used.
Successful exploitation could lead to arbitrary code execution on the user's workstation, potentially compromising the user's data and system.
Upgrade gh to 2.62.0
Exercise caution when using custom devcontainer images, prefer default or pre-built devcontainers from trusted sources.
No public exploit code known to Helm's sources (Nuclei templates, Metasploit, Exploit-DB and PoC-in-GitHub). That does not mean none exists.
EPSS went from 0.009 on 2026-11-24 to 0.014 on 2026-11-26, over 2 recorded scores.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.009 | first score | v2026.06.15 |
| 2026-11-26 | 0.014 | 0.009 | v2026.06.15 |