CVE-2024-53858
published medium CVSS 3.1 · 6.5Recursive repository cloning can leak authentication tokens to non-GitHub submodule hosts in the gh cli
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| cli | — | cli< 2.63.0 | Affected | Not stated | GitHub_M |
| github | — | cli0 to < 2.63.0 · Other versions: unknown | Affected | Not stated | CISA-ADP |
| SUSE / openSUSE | openSUSE-Tumbleweed | govulncheck-vulndbaarch64 | Advisory build | 0.0.20241209T183251-1.1 | OPENSUSE-SU-2024:14567-1 |
| Ubuntu | noble | gh | Advisory build | 2.45.0-1ubuntu0.3+esm2 | USN-8012-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | govulncheck-vulndbppc64le | Advisory build | 0.0.20241209T183251-1.1 | OPENSUSE-SU-2024:14567-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | govulncheck-vulndbs390x | Advisory build | 0.0.20241209T183251-1.1 | OPENSUSE-SU-2024:14567-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | govulncheck-vulndbx86_64 | Advisory build | 0.0.20241209T183251-1.1 | OPENSUSE-SU-2024:14567-1 |
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
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 6.5 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| cli | cli | < 2.63.0 (affected) | GitHub_M · cna |
| github | cli | 0 to < 2.63.0 (affected · custom)Default: unknown | CISA-ADP · adp |
Weaknesses
1- CWE-200 CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
References
2Provider assertions
2GitHub_M · cna
Recursive repository cloning can leak authentication tokens to non-GitHub submodule hosts in the gh cli
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 9d654b97c75a4ecb6663ea0f254a62d281f5e1293c419a28a94f04f041b40251
- Ingested
- 23 Sep 2026, 08:31:11 UTC
- Source record
- Official CVE record