CVEBrief

Home / cli / cli / CVE-2024-52308

CVE-2024-52308: is it exploited, and which versions of cli are affected and fixed?

CVE-2024-52308 is a command injection vulnerability in cli. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 12:08 UTC). Affected: github.com/cli/cli/v2 before 2.62.0 and github.com/cli/cli before 2.62.0 (GitHub advisory GHSA-p2h2-3vg9-4p87). Fixed in 2.62.0 (GitHub advisory GHSA-p2h2-3vg9-4p87). Severity: High (8.0, CVSS 3.1, from GitHub_M).

Data checked December 3, 2026: last read CISA KEV December 3, 2026, 12:08 UTC, CVE record November 19, 2026, 07:10 UTC and NVD November 19, 2026, 07:25 UTC.

Exploited in the wild
Not in CISA KEV
KEV read December 3, 2026, 12:08 UTC
Affected
github.com/cli/cli/v2 before 2.62.0 and github.com/cli/cli before 2.62.0
GitHub advisory GHSA-p2h2-3vg9-4p87
Fixed in
2.62.0
GitHub advisory GHSA-p2h2-3vg9-4p87
Severity
High 8.0
CVSS 3.1 from GitHub_M
Exploit odds (EPSS)
0.91% in 30 days
higher than 61% of CVEs; FIRST, December 2, 2026

What is CVE-2024-52308?

Connecting to a malicious Codespaces via GH CLI could allow command execution on the user's computer

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.

From the CVE record by GitHub_M, last updated November 15, 2024, 19:33 UTC.

Which versions are affected, and which fix it?

VendorProductAffectedFixed or not affected from
clicli<= 2.61.0

As the CVE record by GitHub_M states it, last updated November 15, 2024. Version ranges are the CNA's; a version the record calls not affected is usually the fix.

Which packages are affected, and in which version is each fixed?

EcosystemPackageAffectedFixed inAdvisory
Gogithub.com/cli/cli/v2< 2.62.02.62.0GHSA-p2h2-3vg9-4p87
Gogithub.com/cli/cli< 2.62.02.62.0GHSA-p2h2-3vg9-4p87

GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated November 19, 2024. Summary: Connecting to a malicious Codespaces via GH CLI could allow command execution on the user's computer.

Which products and versions does the NVD list as affected?

VendorProductVersionsType
githubclibefore 2.62.0application

NVD analysis (status Analyzed), last modified June 17, 2026, 08:06 UTC.

How severe is CVE-2024-52308?

ScoreVersionVectorSource
High 8.0CVSS 3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:HGitHub_M
Critical 9.6CVSS 3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:HNVD

Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.

What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.

Is CVE-2024-52308 exploited in the wild?

CISA KEV
Not listed (catalog 2026.11.30)
CISA SSVC
Exploitation: none; automatable: no; technical impact: total (CISA ADP, November 15, 2024)
EPSS
0.91% probability of exploitation activity in the next 30 days, percentile 61.0 (FIRST EPSS, scores of December 2, 2026)

What kind of flaw is it?

Where are the vendor advisories and references?

Who found and reported it?

As published in the CVE record; contact details are removed.

When was it published, and where is the official record?

Reserved
November 6, 2024
Published
November 14, 2024, 22:55 UTC
CVE record updated
November 15, 2024, 19:33 UTC by GitHub_M
NVD
Analyzed, last modified June 17, 2026, 08:06 UTC
Last checked
CVE list November 19, 2026, 07:10 UTC; NVD November 19, 2026, 07:25 UTC; KEV December 3, 2026, 12:08 UTC; EPSS December 2, 2026
Official record
cve.org · NVD

What other CVEs affect cli?

Every CVE in cli

Questions about CVE-2024-52308

Is CVE-2024-52308 exploited in the wild?

Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 12:08 UTC. FIRST's EPSS gives it a 0.91% chance of exploitation activity in the next 30 days (scores of December 2, 2026).

Which versions of cli are affected by CVE-2024-52308?

github.com/cli/cli/v2 before 2.62.0 and github.com/cli/cli before 2.62.0, per the GitHub advisory GHSA-p2h2-3vg9-4p87. The tables above give every range the sources list.

Which version fixes CVE-2024-52308?

2.62.0, per the GitHub advisory GHSA-p2h2-3vg9-4p87. Check the vendor's advisory before you rely on it.

How severe is CVE-2024-52308?

High (8.0, CVSS 3.1, from GitHub_M). The severity table above shows each score with its source.

Where is the official record of CVE-2024-52308?

The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.