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
Affects libgit2Source GCVE Database
Not known to be exploited · CVSS 9.8 Critical · fixed in 0.24.1-2ubuntu0.2+esm2 : patch libgit2 as a priority.
Data as of 24 Nov 2026, 19:25 UTC
- Patch
- Available – fixed in 0.24.1-2ubuntu0.2+esm2, 0.26.0+dfsg.1-1.1ubuntu0.2+esm1, 0.28.4+dfsg.1-2ubuntu0.1 +1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HExploitation evidence
Disclosed: evidence found.
CVE published 6 Feb 2024
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 23 Nov 2026.
What to do
Upgrade to a fixed release listed under Affected software.
Patches and advisories
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Ubuntu 22.04 LTSlibgit2pkg:deb/ubuntu/libgit2?arch=source&distro=jammyOther threats | Affected
| Fixed in
|
Ubuntu 20.04 LTSlibgit2pkg:deb/ubuntu/libgit2?arch=source&distro=focalOther threats | Affected
| Fixed in
|
Ubuntu Pro 18.04 LTSlibgit2pkg:deb/ubuntu/libgit2?arch=source&distro=esm-apps/bionicOther threats | Affected
| Fixed in
|
Ubuntu Pro 16.04 LTSlibgit2pkg:deb/ubuntu/libgit2?arch=source&distro=esm-apps/xenialOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
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.
References
- ubuntu.com/security/CVE-2024-24577 (opens in a new tab)
- github.com/libgit2/libgit2/security/advisories/GHSA-j2v7-4f6v-gpg8 (opens in a new tab)
- github.com/libgit2/libgit2/releases/tag/v1.6.5 (opens in a new tab)
- github.com/libgit2/libgit2/releases/tag/v1.7.2 (opens in a new tab)
- ubuntu.com/security/notices/USN-6678-1 (opens in a new tab)
- cve.org/CVERecord?id=CVE-2024-24577 (opens in a new tab)