6.5

CVE-2024-53858: Recursive repository cloning can leak authentication tokens to non-GitHub submodule hosts in the gh cli

Deferred
AliasesUBUNTU-CVE-2024-53858DEBIAN-CVE-2024-53858CGA-r3j3-f5mf-4c2g
Published 27-11-2024Last modified 03-12-2024

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.

Priority
Routine

Not severe (CVSS 6.5, local access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
6.5/10
010
Medium · v3.1 (CVE.org)
EPSS score
0.28%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 2 · Related 3

Timeline

  1. 27-11-2024
    PublishedVulnerability first disclosed.
  2. 03-12-2024
    Last 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

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

04-11-202604-12-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Version check

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
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