CVE-2024-52308: Connecting to a malicious Codespaces via GH CLI could allow command execution on the user's computer
Noroxi assessment
Priority: Monitor (action score 38/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Probability of exploitation in the next 30 days: 0.90% (FIRST EPSS); higher than 59.6% of all records.
- Anyone who can reach it over the internet can trigger it. No account or password is required. A user must open a link or visit a page. No special conditions are required; it is repeatable.
- Fixed version: azl3 gh 2.43.1-2 on Azure Linux 3.0 2.62.0-1; azl3 gh 2.62.0-1 on Azure Linux 3.0 2.62.0-1.
Low priority for now. Upgrade to azl3 gh 2.43.1-2 on Azure Linux 3.0 2.62.0-1; azl3 gh 2.62.0-1 on Azure Linux 3.0 2.62.0-1 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
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.
- Published
- Nov 14, 2024
- Updated
- Jun 17, 2026
- EPSS
- 0.9% · 59th percentile
- CWE
- CWE-77
Report tools
Action score
38
Monitor
Low priority for now.
- CVSS
- 38 / 40 · 9.6 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 0.9%
CISA SSVC decision
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
Vulnrichment: CISA's decision-tree inputs.
CNA vs NVD score
- NVD
- 9.6
- CNA · GitHub_M
- 8.0
- 1.6 point gap
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Running WordPress? Scan your site free with WP Lens
Noroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| github | cli | cpe:2.3:a:github:cli |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- github clibefore 2.62.0
Versions reported by the vendor
Affected version ranges reported by the assigning authority (GitHub_M). Independent of NVD's CPE analysis and usually ahead of it.
cli cli
- <= 2.61.0affected
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Debian:12 | gh | from 0 | — |
| Debian:13 | gh | before 2.46.0-2 | 2.46.0-2 |
| Go | github.com/cli/cli | from 0 | — |
| Go | github.com/cli/cli | before 2.62.0 | 2.62.0 |
| Go | github.com/cli/cli/v2 | before 2.62.0 | 2.62.0 |
| openSUSE:Leap 15.6 | gh | before 2.65.0-bp156.2.17.1 | 2.65.0-bp156.2.17.1 |
| openSUSE:Leap 16.0 | gh | before 2.96.0-bp160.1.1 | 2.96.0-bp160.1.1 |
| openSUSE:Tumbleweed | gh | before 2.62.0-1.1 | 2.62.0-1.1 |
| openSUSE:Tumbleweed | govulncheck-vulndb | before 0.0.20241119T173509-1.1 | 0.0.20241119T173509-1.1 |
| SUSE:Package Hub 15 SP6 | gh | before 2.65.0-bp156.2.17.1 | 2.65.0-bp156.2.17.1 |
Same product
github: all recordsOther highest-scoring records for the same primary product.
- CVE-2026-48501GitHub CLI tokens leak via `gh attestation` commands36Monitor
- CVE-2026-45803gh: GitHub Actions log output in `gh run view` allows terminal escape sequence injection14Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| azl3 gh 2.43.1-2 on Azure Linux 3.0 | 2.62.0-1 · CBL-Mariner Releases | Microsoft (MSRC) |
| azl3 gh 2.62.0-1 on Azure Linux 3.0 | 2.62.0-1 · CBL-Mariner Releases | Microsoft (MSRC) |
| debian:gh | 2.46.0-2 · Debian:13 | Package registry (OSV) |
| Go:github.com/cli/cli | 2.62.0 | Package registry (OSV) |
| Go:github.com/cli/cli/v2 | 2.62.0 | Package registry (OSV) |
| opensuse:gh | 2.62.0-1.1 · openSUSE:Tumbleweed | Package registry (OSV) |
| opensuse:gh | 2.65.0-bp156.2.17.1 · openSUSE:Leap 15.6 | Package registry (OSV) |
| opensuse:govulncheck-vulndb | 0.0.20241119T173509-1.1 · openSUSE:Tumbleweed | Package registry (OSV) |
| suse:gh | 2.65.0-bp156.2.17.1 · SUSE:Package Hub 15 SP6 | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
No commit or PR link among the references.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
- RyotaKFlatt Security Inc.finder
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
No nightly-computed relations.
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
The product’s vendor appears in a public program. Matched by name; verify the scope text in the program.
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- No account or password is required.
- A user must open a link or visit a page.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- high · data can be read
- Integrity
- high · data or configuration can be modified
- Availability
- high · the service can be disrupted
Impact can extend beyond the vulnerable component (scope changes).
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- Required
- Scope
- Changed
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- High
Weakness class (CWE)
CWE-77 · Improper Neutralization of Special Elements used in a Command ('Command Injection')CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
nvd-primary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
- LDAP InjectionCAPEC-136likelihood: High · High
- Command DelimitersCAPEC-15likelihood: High · High
- IMAP/SMTP Command InjectionCAPEC-183Medium
- Command InjectionCAPEC-248likelihood: Medium · High
- Manipulating Writeable Terminal DevicesCAPEC-40likelihood: High · Very High
- Exploiting Multiple Input Interpretation LayersCAPEC-43likelihood: Medium · High
- Manipulating Writeable Configuration FilesCAPEC-75likelihood: High · Very High
- Manipulating Web Input to File System CallsCAPEC-76likelihood: High · Very High
ATT&CK techniques
—
Change log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Vendor advisories and official records. Exploit/PoC links are deliberately left out.