libgit2 up to 1.6.4/1.7.1 src/libgit2/index.c git_index_add heap-based overflow
| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 8.5 | $0-$5k | 0.00 |
Summary
A vulnerability classified as critical has been found in libgit2 up to 1.6.4/1.7.1. This affects the function git_index_add in the library src/libgit2/index.c. This manipulation causes heap-based overflow.
This vulnerability appears as CVE-2024-24577. The attack may be initiated remotely. There is no available exploit.
It is recommended to upgrade the affected component.
Details
A vulnerability classified as critical was found in libgit2 up to 1.6.4/1.7.1. Affected by this vulnerability is the function git_index_add in the library src/libgit2/index.c. The manipulation with an unknown input leads to a heap-based overflow vulnerability. The CWE definition for the vulnerability is CWE-122. A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc(). As an impact it is known to affect confidentiality, integrity, and availability. The summary by CVE is:
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_index_add` can cause heap corruption that could be leveraged for arbitrary code execution. There is an issue in the `has_dir_name` function in `src/libgit2/index.c`, which frees an entry that should not be freed. The freed entry is later used and overwritten with potentially bad actor-controlled data leading to controlled heap corruption. Depending on the application that uses libgit2, this could lead to arbitrary code execution. This issue has been patched in version 1.6.5 and 1.7.2.
The weakness was presented 02/07/2024 as GHSA-j2v7-4f6v-gpg8. It is possible to read the advisory at github.com. This vulnerability is known as CVE-2024-24577 since 01/25/2024. Technical details of the vulnerability are known, but there is no available exploit.
The vulnerability scanner Nessus provides a plugin with the ID 211258 (Fedora 41 : rust-asyncgit / rust-bat / rust-cargo-c / rust-eza / etc (2024-401f10a92f)), which helps to determine the existence of the flaw in a target environment.
Upgrading to version 1.6.5 or 1.7.2 eliminates this vulnerability. The upgrade is hosted for download at github.com.
The vulnerability is also documented in the vulnerability database at Tenable (211258). Be aware that VulDB is the high quality source for vulnerability data.
Product
Name
Version
Website
- Product: https://github.com/libgit2/libgit2/
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔍VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 8.6VulDB Meta Temp Score: 8.5
VulDB Base Score: 7.3
VulDB Temp Score: 7.0
VulDB Vector: 🔍
VulDB Reliability: 🔍
NVD Base Score: 9.8
NVD Vector: 🔍
CNA Base Score: 8.6
CNA Vector (GitHub, Inc.): 🔍
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍
Exploiting
Class: Heap-based overflowCWE: CWE-122 / CWE-119
CAPEC: 🔍
ATT&CK: 🔍
Physical: No
Local: No
Remote: Yes
Availability: 🔍
Status: Not defined
EPSS Score: 🔍
EPSS Percentile: 🔍
Price Prediction: 🔍
Current Price Estimation: 🔍
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Nessus ID: 211258
Nessus Name: Fedora 41 : rust-asyncgit / rust-bat / rust-cargo-c / rust-eza / etc (2024-401f10a92f)
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔍
Upgrade: libgit2 1.6.5/1.7.2
Timeline
01/25/2024 🔍02/07/2024 🔍
02/07/2024 🔍
11/16/2024 🔍
Sources
Product: github.comAdvisory: GHSA-j2v7-4f6v-gpg8
Status: Confirmed
CVE: CVE-2024-24577 (🔍)
GCVE (CVE): GCVE-0-2024-24577
GCVE (VulDB): GCVE-100-253063
Entry
Created: 02/07/2024 08:17Updated: 11/16/2024 14:24
Changes: 02/07/2024 08:17 (52), 03/01/2024 14:36 (11), 11/16/2024 14:24 (17)
Complete: 🔍
Cache ID: 216::103
Be aware that VulDB is the high quality source for vulnerability data.
No comments yet. Languages: en.
Please log in to comment.