{"schema":"/api/v1/schema/cve.json","api_version":"1","id":"CVE-2024-52308","published":"2024-11-14T23:15:05.727000Z","last_modified":"2026-06-17T08:06:59.113000Z","status":"Analyzed","cvss":{"version":"3.1","score":9.6,"severity":"CRITICAL","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","source":"nvd@nist.gov","primary":true},"auth":false,"cwes":["CWE-77"],"cpes":[{"criteria":"cpe:2.3:a:github:cli:*:*:*:*:*:*:*:*","part":"a","vendor":"github","product":"cli","version_end_excluding":"2.62.0"}],"cpes_truncated":false,"vendors":["github"],"products":["github/cli"],"ssvc":{"exploitation":"none","automatable":"no","technical_impact":"total"},"epss":{"score":0.01362,"percentile":0.71952,"date":"2026-11-30","model_version":"v2026.06.15"},"cat":"app","platform":"multi","eol":false,"packages":[{"advisory":"GHSA-p2h2-3vg9-4p87","ecosystem":"Go","name":"github.com/cli/cli","purl":"pkg:golang/github.com/cli/cli","ranges":[{"introduced":"0","fixed":"2.62.0"}],"versions":[],"versions_truncated":false},{"advisory":"GO-2024-3269","ecosystem":"Go","name":"github.com/cli/cli","purl":"pkg:golang/github.com/cli/cli","ranges":[{"introduced":"0"}],"versions":[],"versions_truncated":false},{"advisory":"GHSA-p2h2-3vg9-4p87","ecosystem":"Go","name":"github.com/cli/cli/v2","purl":"pkg:golang/github.com/cli/cli/v2","ranges":[{"introduced":"0","fixed":"2.62.0"}],"versions":[],"versions_truncated":false},{"advisory":"GO-2024-3269","ecosystem":"Go","name":"github.com/cli/cli/v2","purl":"pkg:golang/github.com/cli/cli/v2","ranges":[{"introduced":"0","fixed":"2.62.0"}],"versions":[],"versions_truncated":false}],"severity":"critical","priority_score":73,"links":{"html_es":"/es/cve/CVE-2024-52308/","html_en":"/en/cve/CVE-2024-52308/","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2024-52308","cve_org":"https://www.cve.org/CVERecord?id=CVE-2024-52308"},"untrusted":{"vendor_name":"Github","product_name":"Cli","desc_en":"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.\n\nDevelopers 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.\n\nThis 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.\n\nIn `2.62.0`, the remote username information is being validated before being used.","affected":[{"untrusted_vendor":"cli","untrusted_product":"cli","versions":[]},{"untrusted_vendor":"github","untrusted_product":"cli","versions":[]}],"references":[{"url":"https://github.com/cli/cli/security/advisories/GHSA-p2h2-3vg9-4p87","tags":["Vendor Advisory"]}]},"bulletins":[{"source":"suse","id":"openSUSE-SU-2026:21310-1","url":"https://www.suse.com/support/update/","published":"2026-07-10T08:47:45+00:00","severity":"critical","exploited":false,"untrusted":{"title":"Security update for gh"}}]}