CVE-2024-24577

HIGH
Published Feb 6, 2024 Modified Nov 21, 2024 CWE-122 CWE-119

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_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.

Is your site exposed to CVE-2024-24577?

Run a free security scan — no signup, results in seconds.

CVSS v3.1 Score

8.6
HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L

Weakness Type (CWE)

CWE-122 CWE-122
CWE-119 Buffer Overflow

Affected Products

Vendor Product
libgit2 libgit2
libgit2 libgit2

References

Frequently Asked Questions

What is CVE-2024-24577? +
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. It has a CVSS v3.1 base score of 8.6 (HIGH).
How severe is CVE-2024-24577? +
CVE-2024-24577 has a CVSS v3.1 score of 8.6 out of 10, rated HIGH. This is a high-severity vulnerability that should be prioritized for patching.
What products are affected by CVE-2024-24577? +
CVE-2024-24577 affects products from libgit2, specifically: libgit2. Check the affected products table above for specific version ranges.
How do I check if I'm vulnerable to CVE-2024-24577? +
You can use Secably's free Website Scanner to check your website for known vulnerabilities. For infrastructure scanning, use the Port Scanner to identify exposed services that may be affected. Check the vendor advisories linked above for specific patch and version information.

Related Vulnerabilities

Don't wait for an exploit

Scan your website for vulnerabilities like CVE-2024-24577 — free, no signup required.