CVE-2024-52308: The GitHub CLI version 2.6.1 and earlier are vulnerable to remote code execution through a malicious codespace
CVE-2024-52308 is a high-severity flaw (CVSS 8.0) affecting cli. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
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-pro
Why this priority
- High severity
A fixed release or distro patch exists.
Risk facts
| CVSS score | 8.0 (High) |
| Attack vector | Network (remote) |
| Attack complexity | High |
| Privileges needed | Low |
| User interaction | Required |
| EPSS exploit chance | 0.9% (top 40%) |
| CISA exploited list | No |
| Weakness | CWE-77 |
| Published | 2024-11-14 |
| Last modified | 2026-06-17 |
Last updated 2026-06-17 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2024-52308?
cli: upgrade to 2.62.0. Exact commands for each OS are on this page.
Is CVE-2024-52308 being exploited?
CVE-2024-52308 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2024-52308 affect?
CVE-2024-52308 affects cli. Severity is high (CVSS 8.0). 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 c
How urgent is CVE-2024-52308?
Priority 43/100. High severity
Software pages
Related CVEs
- CVE-2026-42994 CRITICAL 9.8 DOWNGRADE Bitwarden CLI 2026.4.0 from 2026-04-22T21:57Z to 2026-04-22T23:30Z, when obtained from npm, had embedded malic
- CVE-2026-47671 MEDIUM 5.4 UPGRADE Nhost is an open source Firebase alternative with GraphQL
- CVE-2026-48501 HIGH 7.4 UPGRADE GitHub CLI (gh) is GitHub’s official command line tool
- CVE-2026-45803 LOW 3.5 UPGRADE `gh` is GitHub’s official command line tool
- CVE-2016-10538 LOW 3.5 UPGRADE MITIGATE The package `node-cli` before 1.0.0 insecurely uses the lock_file and log_file