
CVE catalog
CVE-2024-52308
GitHub CLI vulnerability
- Severity
- Critical · CVSS 9.6
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H - Published
- Source
- [NVD] · [CVE record]
- EPSS
- 0.91% · Oct 25, 2026
The GitHub CLI version 2.6.1 and earlier are vulnerable to remote code execution through a malicious codespace SSH server when using `gh codespace ssh` or `gh codespace logs` commands. This has been patched in the cli v2.62.0. Developers connect to remote codespaces through an SSH server running within the devcontainer, which is generally provided through the [default devcontainer image]( https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-... https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/introduction-to-dev-containers#using-the-default-dev-container-configuration) . GitHub CLI [retrieves SSH connection details]( https://github.com/cli/cli/blob/30066b0042d0c5928d959e288144300cb28196c9/internal/codespaces/rpc/inv... https://github.com/cli/cli/blob/30066b0042d0c5928d959e288144300cb28196c9/internal/codespaces/rpc/invoker.go#L230-L244 ), such as remote username, which is used in [executing `ssh` commands]( https://github.com/cli/cli/blob/e356c69a6f0125cfaac782c35acf77314f18908d/pkg/cmd/codespace/ssh.go#L2... https://github.com/cli/cli/blob/e356c69a6f0125cfaac782c35acf77314f18908d/pkg/cmd/codespace/ssh.go#L263 ) 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.
Vulnerable and fixed packages
Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.
| Distribution | Package | Release | Version | Status |
|---|---|---|---|---|
| Debian | gh | sid | 2.46.0-4 | fixed |
| Debian | gh | trixie | 2.46.0-3 | fixed |
| Debian | gh | bookworm | 2.23.0+dfsg1-1 | vulnerable |
| Ubuntu | gh | noble | Not reported | vulnerable |
| Ubuntu | gh | noble | 2.45.0-1ubuntu0.2+esm1 | fixed |
| Opensuse | gh | leap 16.0 | 2.96.0-bp160.1.1 | fixed |
| Ubuntu | gh | pro | 2.27.0+dfsg1-1build1 | vulnerable |
| Ubuntu | gh | pro | 2.30.0-2 | vulnerable |
| Ubuntu | gh | pro | 2.35.0-1 | vulnerable |
| Ubuntu | gh | pro | 2.40.1+dfsg1-1 | vulnerable |
| Ubuntu | gh | pro | 2.42.1-1 | vulnerable |
| Ubuntu | gh | pro | 2.43.1-1 | vulnerable |
| Ubuntu | gh | pro | 2.44.1-1 | vulnerable |
| Ubuntu | gh | pro | 2.44.1-2 | vulnerable |
| Ubuntu | gh | pro | 2.45.0-1 | vulnerable |
| Ubuntu | gh | pro | 2.45.0-1build1 | vulnerable |
| Ubuntu | gh | pro | 2.45.0-1ubuntu0.1 | vulnerable |
| Ubuntu | gh | pro | 2.45.0-1ubuntu0.2 | vulnerable |
| Ubuntu | gh | pro | 2.45.0-1ubuntu0.2+esm1 | fixed |
| Ubuntu | gh | pro | 2.27.0+dfsg1-1build1 | vulnerable |
| Ubuntu | gh | pro | 2.30.0-2 | vulnerable |
| Ubuntu | gh | pro | 2.35.0-1 | vulnerable |
| Ubuntu | gh | pro | 2.40.1+dfsg1-1 | vulnerable |
| Ubuntu | gh | pro | 2.42.1-1 | vulnerable |
| Ubuntu | gh | pro | 2.43.1-1 | vulnerable |
| Ubuntu | gh | pro | 2.44.1-1 | vulnerable |
| Ubuntu | gh | pro | 2.44.1-2 | vulnerable |
| Ubuntu | gh | pro | 2.45.0-1 | vulnerable |
| Ubuntu | gh | pro | 2.45.0-1build1 | vulnerable |
| Ubuntu | gh | pro | 2.45.0-1ubuntu0.1 | vulnerable |
| Ubuntu | gh | pro | 2.45.0-1ubuntu0.2 | vulnerable |
| Ubuntu | gh | pro | 2.45.0-1ubuntu0.2+esm1 | fixed |
| Opensuse | gh | tumbleweed | 2.62.0-1.1 | fixed |
| Suse | gh | package hub 15 sp6 | 2.65.0-bp156.2.17.1 | fixed |
| Opensuse | gh | leap 15.6 | 2.65.0-bp156.2.17.1 | fixed |
Fixed-version evidence
| Distribution | Package | Type | Release | Fixed version | Urgency | Origin | Bugs |
|---|---|---|---|---|---|---|---|
| Debian | gh | source | sid | 2.46.0-2 | not yet assigned | Not reported | [1087883] |
| Debian | gh | source | trixie | 2.46.0-2 | not yet assigned | Not reported | [1087883] |
| Debian | gh | source | bookworm | (unfixed) | not yet assigned | Not reported | [1087883] |
| Ubuntu | gh | deb | noble | 2.45.0-1ubuntu0.2+esm1 | Not reported | Not reported | Not reported |
| Opensuse | gh | rpm | leap 16.0 | 2.96.0-bp160.1.1 | Not reported | OPENSUSE-SU-2026:21310-1 | Not reported |
| Ubuntu | gh | deb | pro | 2.45.0-1ubuntu0.2+esm1 | Not reported | USN-7130-1 | Not reported |
| Ubuntu | gh | deb | pro | 2.45.0-1ubuntu0.2+esm1 | Not reported | UBUNTU-CVE-2024-52308 | Not reported |
| Opensuse | gh | rpm | tumbleweed | 2.62.0-1.1 | Not reported | OPENSUSE-SU-2024:14509-1 | Not reported |
| Suse | gh | rpm | package hub 15 sp6 | 2.65.0-bp156.2.17.1 | Not reported | OPENSUSE-SU-2025:0021-1 | Not reported |
| Opensuse | gh | rpm | leap 15.6 | 2.65.0-bp156.2.17.1 | Not reported | OPENSUSE-SU-2025:0021-1 | Not reported |
OpenFactory catalog packages
[Debian 12 (Bookworm)]
- [gh]Affected
Details (2)
2.23.0+dfsg1-1· amd64 · bookwormAffected
usn · gh · debian · bookworm; usn · gh · debian · 12
2.23.0+dfsg1-1· arm64 · bookwormAffected
usn · gh · debian · bookworm; usn · gh · debian · 12
[openSUSE Tumbleweed]
- [gh-bash-completion]Unknown
Source package: [gh]
Details (1)
2.98.0-1.1· noarch · tumbleweedUnknown · Fixed:
2.62.0-1.1Version impact unknown
usn · gh · opensuse · tumbleweed
- [gh-fish-completion]Unknown
Source package: [gh]
Details (1)
2.98.0-1.1· noarch · tumbleweedUnknown · Fixed:
2.62.0-1.1Version impact unknown
usn · gh · opensuse · tumbleweed
- [gh-zsh-completion]Unknown
Source package: [gh]
Details (1)
2.98.0-1.1· noarch · tumbleweedUnknown · Fixed:
2.62.0-1.1Version impact unknown
usn · gh · opensuse · tumbleweed
- [gh]Fixed
Source package: [gh]
Details (1)
2.98.0-1.1· x86_64 · tumbleweedFixed · Fixed:
2.62.0-1.1usn · gh · opensuse · tumbleweed
[Debian 13 (Trixie)]
- [gh]Fixed
Details (2)
2.46.0-3· amd64 · trixieFixed · Fixed:
2.46.0-2usn · gh · debian · 13
2.46.0-3· arm64 · trixieFixed · Fixed:
2.46.0-2usn · gh · debian · 13
Observed:
References
- [https://ftp.suse.com/pub/projects/security/csaf/opensuse-su-2026_21310-1.json]
- [https://osv.dev/vulnerability/DEBIAN-CVE-2024-52308]
- [https://osv.dev/vulnerability/UBUNTU-CVE-2024-52308]
- [https://osv.dev/vulnerability/USN-7130-1]
- [https://osv.dev/vulnerability/openSUSE-SU-2024:14509-1]
- [https://osv.dev/vulnerability/openSUSE-SU-2025:0021-1]
- [https://osv.dev/vulnerability/openSUSE-SU-2026:21310-1]
- [https://security-tracker.debian.org/tracker/CVE-2024-52308]
- [https://ubuntu.com/security/notices/USN-7130-1]
[Debian Security Tracker] · [FIRST EPSS] · [OSV Package Vulnerability Database] · [SUSE security advisories and VEX] · [Ubuntu Security Notices (USN)]