// For flags

CVE-2024-24575

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

Severity Score

7.5
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

Track
*SSVC
Descriptions

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.

libgit2 es una implementación C portátil de los métodos principales de Git proporcionada como una librería vinculable con una API sólida, que permite incorporar la funcionalidad de Git en su aplicación. El uso de entradas bien manipuladas para `git_revparse_single` puede hacer que la función entre en un bucle infinito, lo que podría provocar un ataque de denegación de servicio en la aplicación que realiza la llamada. La función revparse en `src/libgit2/revparse.c` usa un bucle para analizar la cadena de especificaciones proporcionada por el usuario. Hay un caso límite durante el análisis que permite a un mal actor forzar las condiciones del bucle para acceder a la memoria arbitraria. Potencialmente, esto también podría perder memoria si la especificación de rev extraída se refleja al atacante. Como tal, las versiones de libgit2 anteriores a 1.4.0 no se ven afectadas. Los usuarios deben actualizar a la versión 1.6.5 o 1.7.2.

It was discovered that libgit2 mishandled equivalent filenames on NTFS partitions. If a user or automated system were tricked into cloning a specially crafted repository, an attacker could possibly use this issue to execute arbitrary code. This issue only affected Ubuntu 16.04 LTS and Ubuntu 18.04 LTS. It was discovered that libgit2 did not perform certificate checking by default. An attacker could possibly use this issue to perform a machine-in-the-middle attack. This issue only affected Ubuntu 16.04 LTS, Ubuntu 18.04 LTS, Ubuntu 20.04 LTS, and Ubuntu 22.04 LTS.

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
Attack Vector
Network
Attack Complexity
Low
Authentication
None
Confidentiality
None
Integrity
None
Availability
Complete
* Common Vulnerability Scoring System
SSVC
  • Decision:Track
Exploitation
None
Automatable
No
Tech. Impact
Partial
* Organization's Worst-case Scenario
Timeline
  • 2024-01-25 CVE Reserved
  • 2024-02-06 CVE Published
  • 2025-02-13 CVE Updated
  • 2025-03-30 EPSS Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-400: Uncontrolled Resource Consumption
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Libgit2
Search vendor "Libgit2"
Libgit2
Search vendor "Libgit2" for product "Libgit2"
>= 1.4.0 < 1.6.5
Search vendor "Libgit2" for product "Libgit2" and version " >= 1.4.0 < 1.6.5"
-
Affected
Libgit2
Search vendor "Libgit2"
Libgit2
Search vendor "Libgit2" for product "Libgit2"
>= 1.7.0 < 1.7.2
Search vendor "Libgit2" for product "Libgit2" and version " >= 1.7.0 < 1.7.2"
-
Affected