Recursive repository cloning can leak authentication tokens to non-GitHub submodule hosts
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, gh pr checkout. These GitHub CLI commands invoke git with instructions to retrieve authentication tokens using the [credential.helper](https://git-scm.com/docs/gitcredentials) configuration variable for any host encountered.
Prior to 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:
GITHUB_ENTERPRISE_TOKENGH_ENTERPRISE_TOKENGITHUB_TOKEN _when CODESPACES environment variable is set_The result being git sending authentication tokens when cloning submodules.
In 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.
Successful exploitation could lead to a third-party using leaked authentication tokens to access privileged resources.
1. Upgrade gh to 2.63.0
2. Revoke authentication tokens used with the GitHub CLI:
3. Review your personal [security log](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/reviewing-your-security-log) and any relevant [audit logs](https://docs.github.com/en/enterprise-cloud@latest/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/identifying-audit-log-events-performed-by-an-access-token) for actions associated with your account or enterprise
This issue can be reached with local access to the system, attack complexity is high, an attacker needs no privileges on the target. A user must be tricked into taking some action. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality high, integrity high, availability low.
The score comes from this vector: CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L
CVE-2024-53858 is recorded against 3 packages.
Published on 2 December 2024 and last revised on 4 February 2026. No public exploit is currently recorded for this entry. Record sourced from NVD.
github.com (Advisory)
nvd.nist.gov (Advisory)
git-scm.com (Web)
github.com/cli/cli has other advisories on record. If you are patching this one, these are worth checking on the same host:
Each distribution ships its own build and its own fixed version. Pick the one you run:
Details
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| github.com/cli/cli | — | — |
| github.com/cli/cli/v2 | — | — |
| unknown | — | — |
References
Similar Threats
Vulnerability Monitoring
CVE-2024-53858 is rated CVSS 6.5 Medium. BotEraser monitors your WordPress installation and notifies you when software you use appears in our vulnerability database.
Set Up Free Alerts →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.
Stay up to date with the latest from Boteraser.
We use cookies to improve your experience on our site. By using our site, you consent to cookies.
Manage your cookie preferences below:
Essential cookies enable basic functions and are necessary for the proper function of the website.
CloudFlare provides web performance and security solutions, enhancing site speed and protecting against threats.
Service URL: developers.cloudflare.com (opens in a new window)
These cookies are needed for adding comments on this website.
These cookies are used for managing login functionality on this website.
Statistics cookies collect information anonymously. This information helps us understand how visitors use our website.
Google Analytics is a powerful tool that tracks and analyzes website traffic for informed marketing decisions.
Service URL: policies.google.com (opens in a new window)
You can find more information in our Cookie Policy and Privacy Policy.