CVE-2024-53858

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

CVE-2024-53858 is fixed in 2 products on 2 platforms, first by GitHub CLI 2.63.0, released November 27, 2024. It is not reported as exploited. Patch Radar priority: Routine.

RoutineFixed on 2 platforms
CVSS
6.5
medium
Exploitation
None reported
No vendor assessment
CISA KEV
Not listed
Not in the Known Exploited Vulnerabilities catalog
EPSS
0.0028
20th percentile

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

Where it's fixed

ProductFixed inFixReleased
Windows apps
GitHub CLI 2.63.0 GitHub CLI 2.63.0 Nov 27, 2024
Linux
gh · Debian 13.5 (trixie) 2.46.0-3 DEBIAN-CVE-2024-53858 Nov 27, 2024
gh · Ubuntu 24.04.5 LTS (noble) 2.45.0-1ubuntu0.3+esm2 gh 2.45.0-1ubuntu0.3+esm2 Dec 4, 2024

Patch Radar data is free to use with attribution. Terms and how to credit it.

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.