CVE-2024-24577
Git vulnerability analysis and mitigation

Overview

CVE-2024-24577 affects libgit2, a portable C implementation of the Git core methods provided as a linkable library. The vulnerability was discovered by researchers at Amazon AWS and disclosed in February 2024. The affected versions include libgit2 versions prior to 1.6.5 and 1.7.2 (GitHub Release 1.6.5, GitHub Release 1.7.2).

Technical details

The vulnerability exists in the has_dir_name function in src/libgit2/index.c, which incorrectly frees an entry that should not be freed. The freed entry is later used and overwritten with potentially bad actor-controlled data, leading to controlled heap corruption. The issue is triggered when two consecutive calls to git_index_add are made with a filename that starts with a '/' character. To control the heap corruption, an attacker must be able to control the ctime field of the git_index_entry data structure (GitHub Advisory).

Impact

The vulnerability has been assigned a CVSS 3.1 base score of 9.8 (Critical), with high impacts on confidentiality, integrity, and availability. Depending on the application that uses libgit2, successful exploitation could lead to arbitrary code execution (Ubuntu Security).

Mitigation and workarounds

The vulnerability has been patched in libgit2 versions 1.6.5 and 1.7.2. Users are strongly recommended to upgrade to these versions. As a workaround, users can prevent paths beginning with '/' from being provided to git_index_add (GitHub Advisory).

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
  • git-debugsource
NoYesMay 14, 2024
CVE-2024-52005HIGH7.5
  • GitGit
  • git-credential-libsecret-debuginfo
NoYesJan 15, 2025
CVE-2024-52006LOW2.1
  • GitGit
  • git-core-debuginfo
NoYesJan 14, 2025
CVE-2024-50349LOW2.1
  • GitGit
  • cpe:2.3:a:git:git
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