Skip to content
Fencer Vulns
high 7.5

CVE-2024-24575 json

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

published 2024-02-06 2 y ago modified 2026-07-18 3 mo ago also EUVD-2024-21980 , JLSEC-2025-185

cvss
7.5
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
1.4%
EPSS 1.4% chance of exploitation in 30 days, percentile 73%
public exploits
0
none known

Summary

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.

Patch / fix

  • julia LibGit2_jll 1.7.2+0
  • libgit2 libgit2 1.6.5, 1.7.2
  • libgit2 Debian 12 1.5.1+ds-1+deb12u1
  • libgit2 Debian 14, Debian 13 1.7.2+ds-1

debian advisories DEBIAN-CVE-2024-24575

  • libgit2 SLE Module for Development Tools 15 SP6, openSUSE Leap 15.6 1.7.2-150600.3.3.1

suse advisories SUSE-SU-2024:2584-1

  • libgit2 openSUSE Tumbleweed 1.7.2-2.1

opensuse advisories openSUSE-SU-2024:13675-1

  • libgit2 Alpine 3.24, Alpine 3.23, Alpine 3.22 +3 more 1.7.2-r0

alpine advisories ALPINE-CVE-2024-24575

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • libgit2 CBL-Mariner 2.0 1.6.5-1

azure linux advisories AZL-34331

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2024-24575 updated cvss 7.5

libgit2: potential infiniate loop condition in git_revparse_single

  • Red Hat Enterprise Linux 7 libgit2 Red Hat Enterprise Linux 8 rls, rust, cargo, clippy, libgit2, rustfmt, +9 more Red Hat Enterprise Linux 9 rust, cargo, clippy, rustfmt, rust-gdb, rust-src, +8 more
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
partial
Assessed
2 y ago

Exploit prediction

1.44% chance of exploitation in the next 30 days, higher than 73% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD 3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
OSV 3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected packages

ecosystem package affected fixed in
julia LibGit2_jll
>=1.4.3+0, <1.7.2+0
1.7.2+0

Affected products

  • libgit2 libgit2

Classification

Weakness
  • CWE-400 Uncontrolled Resource Consumption

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.