{"id":"EUVD-2024-3287","revision":null,"records":[{"revision":"81984f6d37494c5b8e0c654728ff77cc","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2024-52308","aliases":[],"title":"Connecting to a malicious Codespaces via GH CLI could allow command execution on the user's computer","description":"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.","state":0,"publishedAt":"2024-11-14T22:55:38.693+00:00","modifiedAt":"2024-11-15T19:33:42.842+00:00","affected":[{"ecosystem":"Vendor product","name":"cli","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"defaultStatus\": \"unaffected\",\n                    \"product\": \"cli\",\n                    \"vendor\": \"cli\",\n                    \"versions\": [\n                        {\n                            \"status\": \"affected\",\n                            \"version\": \"<= 2.61.0\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H","score":8,"severity":"HIGH"}],"references":["https://github.com/cli/cli/security/advisories/GHSA-p2h2-3vg9-4p87"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2024-52308","license":"CVE Program Terms of Use","key":"cve-program:CVE-2024-52308","identifiers":["CVE-2024-52308"]},"retained":false,"historicalAffected":[]},{"revision":"f211043b23fa4511b62d544e83f871e7","observedAt":"2026-11-15T02:36:36.706+00:00","statement":{"source":"euvd","id":"EUVD-2024-3287","aliases":["CVE-2024-52308","GHSA-p2h2-3vg9-4p87"],"title":"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.","description":"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.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H","score":8,"severity":null}],"references":["https://github.com/cli/cli/security/advisories/GHSA-p2h2-3vg9-4p87"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2024-3287","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Nov 14, 2024, 10:55:38 PM","dateUpdated":"Nov 15, 2024, 7:33:42 PM"},"relatedAdvisories":[{"id":"NCSC-2024-0454","title":"Kwetsbaarheid verholpen in GitHub CLI","vulnerabilityIds":["CVE-2024-52308"]},{"id":"openSUSE-SU-2024:14509-1","title":"gh-2.62.0-1.1 on GA media","vulnerabilityIds":["CVE-2024-52308"]},{"id":"openSUSE-SU-2025:0021-1","title":"Security update for gh","vulnerabilityIds":["CVE-2024-52308"]},{"id":"openSUSE-SU-2026:21310-1","title":"Security update for gh","vulnerabilityIds":["CVE-2024-52308","CVE-2025-27144"]},{"id":"openSUSE-SU-2024:14513-1","title":"govulncheck-vulndb-0.0.20241119T173509-1.1 on GA media","vulnerabilityIds":["CVE-2020-8911","CVE-2023-0109","CVE-2024-0793","CVE-2024-24425","CVE-2024-24426","CVE-2024-44625","CVE-2024-52010","CVE-2024-52308","CVE-2024-52522","CVE-2024-9526"]},{"id":"msrc_CVE-2024-52308","title":"Connecting to a malicious Codespaces via GH CLI could allow command execution on the user's computer","vulnerabilityIds":["CVE-2024-52308"]}],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2024-3287","identifiers":["EUVD-2024-3287","CVE-2024-52308","GHSA-p2h2-3vg9-4p87"]},"retained":false,"historicalAffected":[]},{"revision":"f2b9f51df1cc4fbdafc0ea1b4ac6c8ea","observedAt":"2026-10-25T01:17:12.119+00:00","statement":{"source":"nvd","id":"CVE-2024-52308","aliases":[],"title":"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.","description":"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.","state":0,"publishedAt":"2024-11-14T23:15:05.727+00:00","modifiedAt":"2026-06-17T08:06:59.113+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H","score":8,"severity":"HIGH"},{"system":"CVSS 3.1 · nvd@nist.gov · Primary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","score":9.6,"severity":"CRITICAL"}],"references":["https://github.com/cli/cli/security/advisories/GHSA-p2h2-3vg9-4p87"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2024-52308","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Analyzed","weaknesses":["CWE-77"],"productCriteria":["cpe:2.3:a:github:cli:*:*:*:*:*:*:*:*"],"sourceDates":{"published":"2024-11-14T23:15:05.727","lastModified":"2026-06-17T08:06:59.113"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2024-52308","identifiers":["CVE-2024-52308"]},"retained":false,"historicalAffected":[]},{"revision":"2663801ffb0a43119b88eb33bce61e96","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-p2h2-3vg9-4p87","aliases":["CVE-2024-52308","GO-2024-3269"],"title":"Connecting to a malicious Codespaces via GH CLI could allow command execution on the user's computer","description":"### Summary\n\nA security vulnerability has been identified in GitHub CLI that could allow remote code execution (RCE) when users connect to a malicious Codespace SSH server and use the `gh codespace ssh` or `gh codespace logs` commands.\n\n### Details\n\nThe vulnerability stems from the way GitHub CLI handles SSH connection details when executing commands. When developers connect to remote Codespaces, they typically use a SSH server running within a devcontainer, often provided through the [default devcontainer image](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/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#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.\n\n### Impact\n\nSuccessful exploitation could lead to arbitrary code execution on the user's workstation, potentially compromising the user's data and system.\n\n### Remediation and Mitigation\n\n1. Upgrade `gh` to `2.62.0`\n2. Exercise caution when using custom devcontainer images, prefer default or pre-built devcontainers from trusted sources.","state":0,"publishedAt":"2024-11-14T17:39:01+00:00","modifiedAt":"2026-09-10T03:50:20.9534918+00:00","affected":[{"ecosystem":"Go","name":"github.com/cli/cli/v2","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"2.62.0"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"Go","name":"github.com/cli/cli","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"2.62.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/cli/cli/security/advisories/GHSA-p2h2-3vg9-4p87","https://nvd.nist.gov/vuln/detail/CVE-2024-52308","https://github.com/cli/cli","https://pkg.go.dev/vuln/GO-2024-3269"],"sourceUrl":"https://github.com/advisories/GHSA-p2h2-3vg9-4p87","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-p2h2-3vg9-4p87","identifiers":["GHSA-p2h2-3vg9-4p87","CVE-2024-52308","GO-2024-3269"]},"retained":false,"historicalAffected":[]},{"revision":"b0252c447e534b63a414b3ae686dbf6b","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GO-2024-3269","aliases":["CVE-2024-52308","GHSA-p2h2-3vg9-4p87"],"title":"Connecting to a malicious Codespaces via GH CLI could allow command execution on the user's computer in github.com/cli/cli","description":"Connecting to a malicious Codespaces via GH CLI could allow command execution on the user's computer in github.com/cli/cli","state":0,"publishedAt":"2024-11-19T17:20:31+00:00","modifiedAt":"2026-02-04T04:11:55.504706+00:00","affected":[{"ecosystem":"Go","name":"github.com/cli/cli","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"Go","name":"github.com/cli/cli/v2","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"2.62.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://github.com/cli/cli/security/advisories/GHSA-p2h2-3vg9-4p87","https://nvd.nist.gov/vuln/detail/CVE-2024-52308"],"sourceUrl":"https://osv.dev/vulnerability/GO-2024-3269","license":"OSV · upstream source license applies","key":"osv:GO-2024-3269","identifiers":["GO-2024-3269","CVE-2024-52308","GHSA-p2h2-3vg9-4p87"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-16T12:44:53.7069159+00:00","complete":true,"records":1781,"lastAttemptAt":"2026-11-16T12:44:53.7069159+00:00","lastSuccessAt":"2026-11-16T12:44:53.850219+00:00","error":null,"lastVerifiedAt":"2026-11-16T12:44:53.8502206+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-6be044d0e08779dadd136f949a536de4047af96f5d7bceb7e190ecffbb8f18ca-237c53704f95a87effe0a1147a1bcf3cd93376e65fa4303e1b86b3915f8b7c7a","complete":true,"records":425970,"lastAttemptAt":"2026-11-16T12:44:53.412921+00:00","lastSuccessAt":"2026-11-16T12:44:53.3189092+00:00","error":null,"lastVerifiedAt":"2026-11-16T12:44:53.412921+00:00","snapshotPublishedAt":"2026-11-16T12:28:00+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-ea8954ba9b8a4f759f7e51e8bc4698ca","complete":false,"records":13821,"lastAttemptAt":"2026-11-16T12:46:28.5866342+00:00","lastSuccessAt":"2026-11-16T12:46:28.582+00:00","error":"5 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-16T12:46:28.582+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13869,"expectedIdentifiers":13874,"failedIdentifiers":5},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-16T12:44:53.7069159+00:00","complete":true,"records":1125,"lastAttemptAt":"2026-11-16T12:44:53.7069159+00:00","lastSuccessAt":"2026-11-16T12:44:53.8509796+00:00","error":null,"lastVerifiedAt":"2026-11-16T12:44:53.85098+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-1ca26f249fe448ada48a3a7b82aa64d9","complete":false,"records":13833,"lastAttemptAt":"2026-11-16T12:45:56.1167563+00:00","lastSuccessAt":"2026-11-16T12:45:56.113+00:00","error":"400 identifier lookups failed; latest failures include HttpError (HTTP 503). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-16T12:45:56.113+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13474,"expectedIdentifiers":13874,"failedIdentifiers":400},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-64eea06dbd27de8464d5dbce1b78cc794cc59e2d901516ae0d3ea76e624cdae0","complete":true,"records":9955,"lastAttemptAt":"2026-11-16T12:44:53.6598825+00:00","lastSuccessAt":"2026-11-14T13:57:23.1208135+00:00","error":null,"lastVerifiedAt":"2026-11-16T12:44:53.6598825+00:00","snapshotPublishedAt":"2026-11-14T13:17:57+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-f4424d7d4861b1af1404bd15abcb83f295dcd003412a9340ca99dc8200aa148a","complete":true,"records":2014,"lastAttemptAt":"2026-11-16T12:44:53.4548081+00:00","lastSuccessAt":"2026-11-13T19:57:08.2864435+00:00","error":null,"lastVerifiedAt":"2026-11-16T12:44:53.4548081+00:00","snapshotPublishedAt":"2026-11-13T19:33:10+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-6086d649bcb454cdf302d7d9275177bda73550e1b6e446b3520e9b6266d3582c","complete":true,"records":3148,"lastAttemptAt":"2026-11-16T12:44:53.6730048+00:00","lastSuccessAt":"2026-11-15T11:05:17.1034234+00:00","error":null,"lastVerifiedAt":"2026-11-16T12:44:53.6730048+00:00","snapshotPublishedAt":"2026-11-15T10:03:04+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-263d9c8d63997345727b11314d9b9377eba9fd4146f04497c069a15e332b60cb","complete":true,"records":232482,"lastAttemptAt":"2026-11-16T12:44:53.5565665+00:00","lastSuccessAt":"2026-11-16T07:32:30.5701252+00:00","error":null,"lastVerifiedAt":"2026-11-16T12:44:53.5565665+00:00","snapshotPublishedAt":"2026-11-16T06:48:00+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}