CVE-2024-24575
published high CVSS 3.1 · 7.5libgit2 is vulnerable to a denial of service attack in `git_revparse_single`
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| libgit2 | — | libgit2>= 1.4.0, < 1.6.5 · >= 1.7.0, < 1.7.2 | Affected | Not stated | GitHub_M |
| Amazon Linux | AL2 | Release evaluation | No Fix Planned | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2 | Release evaluationALAS2-2024-2496 | Fixed | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluationALAS2023-2024-541 | Fixed | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluationALAS2023-2024-566 | Fixed | Not stated | Amazon Linux assessment |
| Alpine Linux | edge | libgit2 | Fixed | 1.7.2-r0 | Package fix record |
| SUSE / openSUSE | SLE-15-SP6 | libgit2-1_7aarch64 | Advisory build | 1.7.2-150600.3.3.1 | SUSE-SU-2024:2584-1 |
| Amazon Linux | AL2023 | libgit2aarch64 | Listed in advisory | Not stated | ALAS2023-2024-541 |
Show 51 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Alpine Linux | v3.19 | libgit2 | Fixed | 1.7.2-r0 | Package fix record |
| Alpine Linux | v3.20 | libgit2 | Fixed | 1.7.2-r0 | Package fix record |
| Alpine Linux | v3.21 | libgit2 | Fixed | 1.7.2-r0 | Package fix record |
| Alpine Linux | v3.22 | libgit2 | Fixed | 1.7.2-r0 | Package fix record |
| Alpine Linux | v3.23 | libgit2 | Fixed | 1.7.2-r0 | Package fix record |
| Alpine Linux | v3.24 | libgit2 | Fixed | 1.7.2-r0 | Package fix record |
| SUSE / openSUSE | SLE-15-SP6 | libgit2-1_7ppc64le | Advisory build | 1.7.2-150600.3.3.1 | SUSE-SU-2024:2584-1 |
| SUSE / openSUSE | SLE-15-SP6 | libgit2-1_7s390x | Advisory build | 1.7.2-150600.3.3.1 | SUSE-SU-2024:2584-1 |
| SUSE / openSUSE | SLE-15-SP6 | libgit2-1_7x86_64 | Advisory build | 1.7.2-150600.3.3.1 | SUSE-SU-2024:2584-1 |
| SUSE / openSUSE | SLE-15-SP6 | libgit2-develaarch64 | Advisory build | 1.7.2-150600.3.3.1 | SUSE-SU-2024:2584-1 |
| SUSE / openSUSE | SLE-15-SP6 | libgit2-develppc64le | Advisory build | 1.7.2-150600.3.3.1 | SUSE-SU-2024:2584-1 |
| SUSE / openSUSE | SLE-15-SP6 | libgit2-devels390x | Advisory build | 1.7.2-150600.3.3.1 | SUSE-SU-2024:2584-1 |
| SUSE / openSUSE | SLE-15-SP6 | libgit2-develx86_64 | Advisory build | 1.7.2-150600.3.3.1 | SUSE-SU-2024:2584-1 |
| SUSE / openSUSE | SLE-15-SP6 | libgit2-toolsaarch64 | Advisory build | 1.7.2-150600.3.3.1 | SUSE-SU-2024:2584-1 |
| SUSE / openSUSE | SLE-15-SP6 | libgit2-toolsppc64le | Advisory build | 1.7.2-150600.3.3.1 | SUSE-SU-2024:2584-1 |
| SUSE / openSUSE | SLE-15-SP6 | libgit2-toolss390x | Advisory build | 1.7.2-150600.3.3.1 | SUSE-SU-2024:2584-1 |
| SUSE / openSUSE | SLE-15-SP6 | libgit2-toolsx86_64 | Advisory build | 1.7.2-150600.3.3.1 | SUSE-SU-2024:2584-1 |
| SUSE / openSUSE | openSUSE-Leap-15.6 | libgit2-1_7aarch64 | Advisory build | 1.7.2-150600.3.3.1 | SUSE-SU-2024:2584-1 |
| SUSE / openSUSE | openSUSE-Leap-15.6 | libgit2-1_7ppc64le | Advisory build | 1.7.2-150600.3.3.1 | SUSE-SU-2024:2584-1 |
| SUSE / openSUSE | openSUSE-Leap-15.6 | libgit2-1_7s390x | Advisory build | 1.7.2-150600.3.3.1 | SUSE-SU-2024:2584-1 |
| SUSE / openSUSE | openSUSE-Leap-15.6 | libgit2-1_7x86_64 | Advisory build | 1.7.2-150600.3.3.1 | SUSE-SU-2024:2584-1 |
| SUSE / openSUSE | openSUSE-Leap-15.6 | libgit2-develaarch64 | Advisory build | 1.7.2-150600.3.3.1 | SUSE-SU-2024:2584-1 |
| SUSE / openSUSE | openSUSE-Leap-15.6 | libgit2-develppc64le | Advisory build | 1.7.2-150600.3.3.1 | SUSE-SU-2024:2584-1 |
| SUSE / openSUSE | openSUSE-Leap-15.6 | libgit2-devels390x | Advisory build | 1.7.2-150600.3.3.1 | SUSE-SU-2024:2584-1 |
| SUSE / openSUSE | openSUSE-Leap-15.6 | libgit2-develx86_64 | Advisory build | 1.7.2-150600.3.3.1 | SUSE-SU-2024:2584-1 |
| SUSE / openSUSE | openSUSE-Leap-15.6 | libgit2-toolsaarch64 | Advisory build | 1.7.2-150600.3.3.1 | SUSE-SU-2024:2584-1 |
| SUSE / openSUSE | openSUSE-Leap-15.6 | libgit2-toolsppc64le | Advisory build | 1.7.2-150600.3.3.1 | SUSE-SU-2024:2584-1 |
| SUSE / openSUSE | openSUSE-Leap-15.6 | libgit2-toolss390x | Advisory build | 1.7.2-150600.3.3.1 | SUSE-SU-2024:2584-1 |
| SUSE / openSUSE | openSUSE-Leap-15.6 | libgit2-toolsx86_64 | Advisory build | 1.7.2-150600.3.3.1 | SUSE-SU-2024:2584-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2-1_7aarch64 | Advisory build | 1.7.2-2.1 | OPENSUSE-SU-2024:13675-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2-1_7ppc64le | Advisory build | 1.7.2-2.1 | OPENSUSE-SU-2024:13675-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2-1_7s390x | Advisory build | 1.7.2-2.1 | OPENSUSE-SU-2024:13675-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2-1_7x86_64 | Advisory build | 1.7.2-2.1 | OPENSUSE-SU-2024:13675-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2-develaarch64 | Advisory build | 1.7.2-2.1 | OPENSUSE-SU-2024:13675-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2-develppc64le | Advisory build | 1.7.2-2.1 | OPENSUSE-SU-2024:13675-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2-devels390x | Advisory build | 1.7.2-2.1 | OPENSUSE-SU-2024:13675-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2-develx86_64 | Advisory build | 1.7.2-2.1 | OPENSUSE-SU-2024:13675-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2-toolsaarch64 | Advisory build | 1.7.2-2.1 | OPENSUSE-SU-2024:13675-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2-toolsppc64le | Advisory build | 1.7.2-2.1 | OPENSUSE-SU-2024:13675-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2-toolss390x | Advisory build | 1.7.2-2.1 | OPENSUSE-SU-2024:13675-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2-toolsx86_64 | Advisory build | 1.7.2-2.1 | OPENSUSE-SU-2024:13675-1 |
| Amazon Linux | AL2023 | libgit2src | Listed in advisory | Not stated | ALAS2023-2024-541 |
| Amazon Linux | AL2023 | libgit2x86_64 | Listed in advisory | Not stated | ALAS2023-2024-541 |
| Amazon Linux | AL2 | rustaarch64 | Listed in advisory | Not stated | ALAS2-2024-2496 |
| Amazon Linux | AL2 | rustnoarch | Listed in advisory | Not stated | ALAS2-2024-2496 |
| Amazon Linux | AL2 | rustsrc | Listed in advisory | Not stated | ALAS2-2024-2496 |
| Amazon Linux | AL2 | rustx86_64 | Listed in advisory | Not stated | ALAS2-2024-2496 |
| Amazon Linux | AL2023 | rustaarch64 | Listed in advisory | Not stated | ALAS2023-2024-566 |
| Amazon Linux | AL2023 | rustnoarch | Listed in advisory | Not stated | ALAS2023-2024-566 |
| Amazon Linux | AL2023 | rustsrc | Listed in advisory | Not stated | ALAS2023-2024-566 |
| Amazon Linux | AL2023 | rustx86_64 | Listed in advisory | Not stated | ALAS2023-2024-566 |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.5 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| libgit2 | libgit2 | >= 1.4.0, < 1.6.5 (affected)>= 1.7.0, < 1.7.2 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-400 CWE-400: Uncontrolled Resource Consumption
References
9- https://github.com/libgit2/libgit2/commit/add2dabb3c16aa49b33904dcdc07cd915efc12fa
- https://github.com/libgit2/libgit2/releases/tag/v1.6.5
- https://github.com/libgit2/libgit2/releases/tag/v1.7.2
- https://github.com/libgit2/libgit2/security/advisories/GHSA-54mf-x2rh-hq9v
- https://lists.fedoraproject.org/archives/list/[email protected]/message/4M3P7WIEPXNRLBINQRJFXUSTNKBCHYC7/
- https://lists.fedoraproject.org/archives/list/[email protected]/message/7CNDW3PF6NHO7OXNM5GN6WSSGAMA7MZE/
- https://lists.fedoraproject.org/archives/list/[email protected]/message/S635BGHHZUMRPI7QOXOJ45QHDD5FFZ3S/
- https://lists.fedoraproject.org/archives/list/[email protected]/message/Z6MXOX7I43OWNN7R6M54XLG6U5RXY244/
- https://lists.fedoraproject.org/archives/list/[email protected]/message/ZGNHOEE2RBLH7KCJUPUNYG4CDTW4HTBT/
Provider assertions
3GitHub_M · cna
libgit2 is vulnerable to a denial of service attack in `git_revparse_single`
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 19931124da4bec5b0e30131a316fe4543f848afeacd90cd174ebe2babac4efa4
- Ingested
- 23 Sep 2026, 08:19:54 UTC
- Source record
- Official CVE record