libgit2: Uncontrolled Resource Consumption
CVE-2024-24575 is a high-severity uncontrolled resource consumption vulnerability in libgit2, with a CVSS 3.1 base score of 7.5 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. Affected libgit2 versions: >= 1.4.0, < 1.6.5; >= 1.7.0, < 1.7.2. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 1.44% chance of exploitation within 30 days, higher than 74% of scored CVEs.
High severity with no evidence of exploitation so far.
What to do
- Check which version of libgit2 you run against the affected versions below, and install the vendor's latest release.
- Read the advisory on github.com for workarounds and exact fixed builds.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- NoneNo data is disclosed.
- Integrity
- NoneNothing can be modified.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 7.5 | High | CNA (github.com) |
| CVSS 3.1 | 7.5 | High | NVD |
Official 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.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Uncontrolled Resource Consumption
The product does not properly control the allocation and maintenance of a limited resource.
How developers prevent this class of flaw
- Ensure that protocols have specific limits of scale placed on them.
- Ensure that all failures in resource allocation place the system into a safe posture.
More Uncontrolled Resource Consumption vulnerabilities (CWE-400)
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: partial).
- Record last changed materially (score, affected products, status or references).
References
Advisories
- github.com/libgit2/libgit2/security/advisories/GHSA-54mf-x2rh-hq9vThird Party Advisory
Patches and release notes
Other references
- lists.fedoraproject.org/archives/list/[email protected]/message/4M3P7WIEPXNRLBINQRJFXU…
- lists.fedoraproject.org/archives/list/[email protected]/message/7CNDW3PF6NHO7OXNM5GN6W…
- lists.fedoraproject.org/archives/list/[email protected]/message/S635BGHHZUMRPI7QOXOJ45…
- lists.fedoraproject.org/archives/list/[email protected]/message/Z6MXOX7I43OWNN7R6M54XL…
- lists.fedoraproject.org/archives/list/[email protected]/message/ZGNHOEE2RBLH7KCJUPUNYG…
Other vulnerabilities in libgit2
- 7.5 High severity
- 8.8 High severity
- 9.8 Critical severity
Recent Uncontrolled Resource Consumption vulnerabilities
- 7.5 High severity
- 7.5 High severity
- 7.5 High severity
- 7.5 High severity
- 7.5 High severity
- 7.5 High severity
Spotted an error? Tell us.