CVE-2024-53858: Recursive repository cloning can leak authentication tokens to non-GitHub submodule hosts in the gh cli
Vulnerability summary
CVE-2024-53858 is a medium (CVSS 6.5) vulnerability in cli. EPSS estimates a 0.28% chance of exploitation in the next 30 days, higher than 21.8% of scored vulnerabilities.
Not severe (CVSS 6.5, local access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 2 · Related 3Timeline
- 27-11-2024PublishedVulnerability first disclosed.
- 03-12-2024Last modifiedVulnerability information updated.
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
CVSS metrics
7 scores · 7 sources · 1 version- OSV · UbuntuEcosystem advisory · calculated6.5MediumCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L
- OSV · DebianEcosystem advisory · calculated6.5MediumCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L
- OSV · WolfiEcosystem advisory · calculated6.5MediumCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L
- OSV · GoEcosystem advisory · calculated6.5MediumCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L
- NVDNIST6.5MediumCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L
- OSV · ChainguardEcosystem advisory · calculated6.5MediumCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L
EPSS trend
Probability
0.28%
Chance of exploitation in the next 30 days
Percentile
22%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.28% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: local access, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.
Chainguard1 product
- gh< 2.63.0-r0
Cli1 product
- cli< 2.63.0
Debian1 product
- ghAll versions (No fix recorded) | < 2.46.0-3
Github.com/cli1 product
- cliAll versions (No fix recorded)
Github.com/cli/cli1 product
- v2< 2.63.0
Ubuntu1 product
- gh< 2.45.0-1ubuntu0.3+esm2
Wolfi1 product
- gh< 2.63.0-r0
7 vendors · 7 products
References
9 links- github.com/cli/cliPACKAGE