{"answers":{"affected":"4 open source packages ship an affected version, including github.com/cli/cli/v2 and github.com/cli/cli.","exploited":"There is no known exploitation of CVE-2024-53858 in the wild and no public exploit code.","fix":"Upgrade github.com/cli/cli/v2 to 2.63.0 or later.","what":"CVE-2024-53858 is a medium-severity vulnerability in cli, published on 27 Nov 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2024-53858 and fix it if it is affected.\n\nWhat it is: CVE-2024-53858 is a medium-severity vulnerability in cli, published on 27 Nov 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2024-53858 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/cli/cli/v2 (Go): affected all versions; fixed in 2.63.0\n- github.com/cli/cli/v2 (Go): affected all versions; fixed in 2.63.0\n- github.com/cli/cli/v2 (Go): affected all versions; fixed in 2.63.0\n- github.com/cli/cli (Go): affected all versions; no fix listed\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-53858/ (Markdown: https://insights.sbomify.com/CVE-2024-53858/index.md)","id":"CVE-2024-53858","markdown":"https://insights.sbomify.com/CVE-2024-53858/index.md","name":"CVE-2024-53858","record":{"aliases":["AZL-53477","AZL-53759","DEBIAN-CVE-2024-53858","GHSA-jwcm-9g39-pmcw","GO-2024-3296","UBUNTU-CVE-2024-53858"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["data_read","account_takeover"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"GitHub CLI","requires_auth":"none","summary":"The GitHub CLI leaks authentication tokens to non-GitHub submodule hosts during recursive cloning, potentially allowing attackers to steal credentials.","user_interaction":"required","vuln_class":"information_disclosure"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":6.5,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L","version":"3.1"},"cwes":[{"id":"CWE-200","name":"Exposure of Sensitive Information to an Unauthorized Actor"}],"description":"The gh cli is GitHub’s official command line tool. A security vulnerability has been identified in the GitHub CLI that could leak authentication tokens when cloning repositories containing `git` submodules hosted outside of GitHub.com and ghe.com. This vulnerability stems from several `gh` commands used to clone a repository with submodules from a non-GitHub host including `gh repo clone`, `gh repo fork`, and `gh pr checkout`. These GitHub CLI commands invoke git with instructions to retrieve authentication tokens using the `credential.helper` configuration variable for any host encountered. Prior to version `2.63.0`, hosts other than GitHub.com and ghe.com are treated as GitHub Enterprise Server hosts and have tokens sourced from the following environment variables before falling back to host-specific tokens stored within system-specific secured storage: 1. `GITHUB_ENTERPRISE_TOKEN`, 2. `GH_ENTERPRISE_TOKEN` and 3. `GITHUB_TOKEN` when the `CODESPACES` environment variable is set. The result being `git` sending authentication tokens when cloning submodules. In version `2.63.0`, these GitHub CLI commands will limit the hosts for which `gh` acts as a credential helper to source authentication tokens. Additionally, `GITHUB_TOKEN` will only be used for GitHub.com and ghe.com. Users are advised to upgrade. Additionally users are advised to revoke authentication tokens used with the GitHub CLI and to review their personal security log and any relevant audit logs for actions associated with their account or enterprise","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Recursive repository cloning can leak authentication tokens to non-GitHub submodule hosts in the gh cli","id":"CVE-2024-53858","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"information_disclosure","year":"2024"},"n_packages":4,"n_references":2,"next":{"headline":"go-gh `auth.TokenForHost` violates GitHub host security boundary within a codespace","id":"CVE-2024-53859"},"packages":[{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":[],"package":"github.com/cli/cli","purl":"pkg:golang/github.com/cli/cli","source":"GO-2024-3296"},{"ecosystem":"Go","fixed":["2.63.0"],"introduced":["0"],"last_affected":[],"package":"github.com/cli/cli/v2","purl":null,"source":"GHSA-jwcm-9g39-pmcw"},{"ecosystem":"Go","fixed":["2.63.0"],"introduced":["0"],"last_affected":[],"package":"github.com/cli/cli/v2","purl":"pkg:golang/github.com/cli/cli/v2","source":"GHSA-jwcm-9g39-pmcw"},{"ecosystem":"Go","fixed":["2.63.0"],"introduced":["0"],"last_affected":[],"package":"github.com/cli/cli/v2","purl":"pkg:golang/github.com/cli/cli/v2","source":"GO-2024-3296"}],"prev":{"headline":"rPGP Potential Resource Exhaustion when handling Untrusted Messages","id":"CVE-2024-53857"},"products":["cli"],"published":"2024-11-27","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2024-12-03","vendors":["cli"]},"summary":"The GitHub CLI leaks authentication tokens to non-GitHub submodule hosts during recursive cloning, potentially allowing attackers to steal credentials.","url":"https://insights.sbomify.com/CVE-2024-53858/"}