CVE-2022-24975
Git vulnerability analysis and mitigation

Overview

The vulnerability known as 'GitBleed' (CVE-2022-24975) affects Git through version 2.35.1. The issue relates to the --mirror documentation not mentioning the availability of deleted content when cloning repositories. This could present a security risk if information-disclosure auditing processes rely on a clone operation without the --mirror option (Debian Tracker, NightWatch).

Technical details

The vulnerability stems from a discrepancy in Git behavior where partial parts of a source code repository are visible when making copies via the 'git clone' command, while additional parts of the repository only become visible when using the '--mirror' option. This means that secrets and sensitive data might remain accessible in the mirrored portion of repositories even after they appear to be removed from the regular clone. The issue has been disputed by multiple third parties who believe this is an intended feature of the git binary and does not pose a security risk (NightWatch, Debian Tracker).

Impact

The vulnerability could lead to exposure of secrets and sensitive data in public repositories when not properly removed. Organizations scanning repositories for secrets against a cloned, non-mirrored copy may have a false sense of security, as approximately 18% of potential secrets might be missed by conventional scanning methods. This has led to the exposure of significant secrets, including credentials to cloud environments, internal infrastructures, and telemetry platforms (Aqua Blog).

Mitigation and workarounds

Organizations can mitigate this issue by analyzing their repositories using the '--mirror' option and removing sensitive data using tools like BFG or git-filter-repo. Regular garbage collection and pruning in git is also recommended. Organizations should not rely solely on analyzing regular cloned copies without the '--mirror' option, as this may provide a false sense of security (NightWatch).

Community reactions

The Git security team and multiple third parties have disputed the severity of this issue, stating that it is working as intended. Junio C Hamano, the Git maintainer, confirmed that this is intended functionality, stating 'A repository can have more than what branch heads and tags can reach, and the --mirror option is a way to copy all the things that are reachable from other refs. It is 100% working as intended.' (Git ML).

Additional resources


SourceThis report was generated using AI

Related Git vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2024-32465HIGH7.8
  • GitGit
  • emacs-git
NoYesMay 14, 2024
CVE-2024-52005HIGH7.5
  • GitGit
  • git-svn
NoYesJan 15, 2025
CVE-2024-52006LOW2.1
  • GitGit
  • gitk
NoYesJan 14, 2025
CVE-2024-50349LOW2.1
  • GitGit
  • emacs-git-el
NoYesJan 14, 2025
ELSA-2025-11534HIGHN/A
  • GitGit
  • git
NoYesJul 22, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management