CVE-2024-24577 | libgit2 is vulnerable to arbitrary code execution due to heap corruption in `git_index_add`

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.

Published: 2024-02-06 Last update: 2026-06-17 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2024-24577 is rated Moderate Risk (60.6/100): CVSS High severity, with medium exploitation likelihood (EPSS 1.55%). Core evidence: EPSS rose +1.14% over the last day, indicating growing attacker interest. Mandatory action: Review affected assets and schedule remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2024-24577

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-06-15 0.41% 1.55% +1.14%
2 2026-02-24 0.30% 0.41% +0.11%
3 2025-11-21 0.30%

Full EPSS history (19 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2024-24577

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
8.6 3.1 HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:L)
Attackers could change some data, but it’s limited—not everything goes.
Availability (A:L)
Might cause slowdowns, glitches, or partial disruption—not a full brick.
3.9 4.7 [email protected]
9.8 3.1 CRITICAL
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
3.9 5.9 [email protected]

Weakness enumeration for CVE-2024-24577

OS Trackers for CVE-2024-24577

vendor priority summary link
alpine CVE-2024-24577: 2 source package rows (eza, libgit2); 21 state rows across 5 repos (3.19-community, 3.20-community, 3.21-community, 3.22-community, edge-community); fixed 21, open 0. https://security.alpinelinux.org/vuln/CVE-2024-24577
debian not yet assigned CVE-2024-24577 not yet assigned priority: Debian including 1 source packages (libgit2), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 5. https://security-tracker.debian.org/tracker/CVE-2024-24577
redhat high https://access.redhat.com/security/cve/CVE-2024-24577
suse high CVE-2024-24577 severity important: SUSE including 132 source package names (0.0.17-1.1:git-core-2.43.0-150600.3.6.1, 0.1.6-1.2:git-2.43.0-150600.3.6.1, …), 409 product×package rows across 81 product lines (Container bci/gcc, Container bci/golang, … (81 product lines)): Fixed 409. https://www.suse.com/security/cve/CVE-2024-24577/
ubuntu medium CVE-2024-24577 medium priority: Ubuntu including 1 source packages (libgit2), 11 status rows across 11 suites (bionic, focal, jammy, mantic, noble, oracular, plucky, questing, trusty, upstream, xenial): released 5, not-affected 4, needed 1, needs-triage 1. https://ubuntu.com/security/CVE-2024-24577

Affected software / configurations for CVE-2024-24577

Vendor Product Version Raw CPE
libgit2 libgit2 < 1.6.5 cpe:2.3:a:libgit2:libgit2:*:*:*:*:*:*:*:*
libgit2 libgit2 >= 1.7.0, < 1.7.2 cpe:2.3:a:libgit2:libgit2:*:*:*:*:*:*:*:*

References for CVE-2024-24577

URL Tags
https://github.com/libgit2/libgit2/releases/tag/v1.6.5 Release Notes
https://github.com/libgit2/libgit2/releases/tag/v1.7.2 Release Notes
https://github.com/libgit2/libgit2/security/advisories/GHSA-j2v7-4f6v-gpg8 Third Party Advisory
https://lists.debian.org/debian-lts-announce/2024/02/msg00012.html
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/
cvelogic Threat Intelligence