CVE-2024-24575: libgit2 is vulnerable to a denial of service attack in `git_revparse_single`
Noroxi assessment
Priority: Monitor (action score 30/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Probability of exploitation in the next 30 days: 1.4% (FIRST EPSS); higher than 73.2% of all records.
- Anyone who can reach it over the internet can trigger it. No account or password is required. No user action is required. No special conditions are required; it is repeatable.
- Fixed version: libgit2 libgit2 1.6.5.
Low priority for now. Upgrade to libgit2 libgit2 1.6.5 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
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.
- Published
- Feb 6, 2024
- Updated
- Jun 17, 2026
- EPSS
- 1.4% · 73th percentile
- CWE
- CWE-400
Report tools
Action score
30
Monitor
Low priority for now.
- CVSS
- 30 / 40 · 7.5 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 1.4%
CISA SSVC decision
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
Vulnrichment: CISA's decision-tree inputs.
CNA vs NVD score
- NVD
- 7.5
- CNA · GitHub_M
- 7.5
- agree
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Running WordPress? Scan your site free with WP Lens
Noroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| libgit2 | libgit2 | cpe:2.3:a:libgit2:libgit2 |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- libgit2 libgit21.4.0 and later · before 1.6.5
- libgit2 libgit21.7.0 and later · before 1.7.2
Versions reported by the vendor
Affected version ranges reported by the assigning authority (GitHub_M). Independent of NVD's CPE analysis and usually ahead of it.
libgit2 libgit2
- >= 1.4.0, < 1.6.5, >= 1.7.0, < 1.7.2affected
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Alpine:v3.19 | libgit2 | from 1.4.0 · before 1.7.2-r0 | 1.7.2-r0 |
| crates.io | libgit2-sys | from 0.0.0-0 · before 0.16.2 | 0.16.2 |
| Debian:12 | libgit2 | before 1.5.1+ds-1+deb12u1 | 1.5.1+ds-1+deb12u1 |
| Debian:13 | libgit2 | before 1.7.2+ds-1 | 1.7.2+ds-1 |
| openSUSE:Leap 15.6 | libgit2 | before 1.7.2-150600.3.3.1 | 1.7.2-150600.3.3.1 |
| openSUSE:Tumbleweed | libgit2 | before 1.7.2-2.1 | 1.7.2-2.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP6 | libgit2 | before 1.7.2-150600.3.3.1 | 1.7.2-150600.3.3.1 |
Same product
libgit2: all recordsOther highest-scoring records for the same primary product.
- CVE-2020-12279An issue was discovered in libgit2 before 0.28.4 and 0.9x before 0.99.0.41Plan
- CVE-2020-12278An issue was discovered in libgit2 before 0.28.4 and 0.9x before 0.99.0.41Plan
- CVE-2024-24577libgit2 is vulnerable to arbitrary code execution due to heap corruption in `git_index_add`39Monitor
Published before and after this one in the same product
- ← EarlierCVE-2018-15501Aug 17, 2018 · In ng_pkt in transports/smart_pkt.c in libgit2 before 0.26.6 and 0.27.x before 0.27.4, a remote attacker can send a crafted smart-protocol "31Monitor
- ← EarlierCVE-2023-22742Jan 20, 2023 · libgit2 fails to verify SSH keys by default23Monitor
- Later →CVE-2026-5917Aug 11, 2026 · libgit2 Shell Command Injection via ssh_libssh2 Backend34Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| libgit2 libgit2 | 1.6.5 · description | Vendor (CNA) |
| alpine:libgit2 | 1.7.2-r0 · Alpine:v3.19 | Package registry (OSV) |
| crates.io:libgit2-sys | 0.16.2 | Package registry (OSV) |
| debian:libgit2 | 1.5.1+ds-1+deb12u1 · Debian:12 | Package registry (OSV) |
| opensuse:libgit2 | 1.7.2-150600.3.3.1 · openSUSE:Leap 15.6 | Package registry (OSV) |
| suse:libgit2 | 1.7.2-150600.3.3.1 · SUSE:Linux Enterprise Module for Development Tools 15 SP6 | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
No history yet (it accumulates with the daily EPSS job).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
No nightly-computed relations.
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- No account or password is required.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- none
- Integrity
- none
- Availability
- high · the service can be disrupted
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- None
- Integrity impact
- None
- Availability impact
- High
Weakness class (CWE)
CWE-400 · Uncontrolled Resource ConsumptionCVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
nvd-primary
Root cause
Code that parses nested structures sets no depth or size limit. A small input can turn into a disproportionate processing load.
The bug in code
The whole CWE-400 classA representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.
Vulnerable
function expand(node) {
return node.children.map(expand);
}Fixed
const MAX_DEPTH = 32;
function expand(node, depth = 0) {
if (depth > MAX_DEPTH) throw new Error("too deep");
return node.children.map((c) => expand(c, depth + 1));
}Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Change log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (8 more)Show less
- github.com/libgit2/libgit2/releases/tag/v1.6.5
- github.com/libgit2/libgit2/releases/tag/v1.7.2
- github.com/libgit2/libgit2/security/advisories/GHSA-54mf-x2rh-hq9v
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4M3P7WIEPXNRLBINQRJFXUSTNKBCHYC7/
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/7CNDW3PF6NHO7OXNM5GN6WSSGAMA7MZE/
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/S635BGHHZUMRPI7QOXOJ45QHDD5FFZ3S/
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/Z6MXOX7I43OWNN7R6M54XLG6U5RXY244/
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZGNHOEE2RBLH7KCJUPUNYG4CDTW4HTBT/
Vendor advisories and official records. Exploit/PoC links are deliberately left out.