CVE-2024-24575

libgit2 is vulnerable to a denial of service attack in `git_revparse_single`

HIGH
7.5
CVSS Score
Published: February 6, 2024 at 09:27 PM UTC
Updated: June 17, 2026 at 07:14 AM UTC
1 product affected across 1 vendorLIBGIT2

Using libgit2 by libgit2?

Get instant alerts when new vulnerabilities affect libgit2 - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.5
Exploit prediction
EPSS 1%
SSVC
No known exploit

Description

libgit2 is a portable C implementation of the Git core methods provided as a linkable library with a solid API, allowing to build Git functionality into your application. Using well-crafted inputs to `git_revparse_single` can cause the function to enter an infinite loop, potentially causing a Denial of Service attack in the calling application. The revparse function in `src/libgit2/revparse.c` uses a loop to parse the user-provided spec string. There is an edge-case during parsing that allows a bad actor to force the loop conditions to access arbitrary memory. Potentially, this could also leak memory if the extracted rev spec is reflected back to the attacker. As such, libgit2 versions before 1.4.0 are not affected. Users should upgrade to version 1.6.5 or 1.7.2.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 1.6.5v < 1.7.21.4.0 ≤ v < 1.6.51.7.0 ≤ v < 1.7.2
Affected range stops below 1.6.5, so it looks safe — our inference, not a vendor statement
Affected range stops below 1.7.2, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

7.5HIGHGitHub_M
Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-400

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card