Skip to main content
CVE-2024-24577VulnerabilityPublished Updated

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

0
Compare

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

CVSS 3.1 base score
9.8Critical
How severe the flaw is on the 0–10 CVSS scale.
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:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 6 Feb 2024

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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.

Affected software

ProductAffectedFixed in
Ubuntu 22.04 LTSlibgit2pkg:deb/ubuntu/libgit2?arch=source&distro=jammyOther threatsAffected
  • <1.1.0+dfsg.1-4.1ubuntu0.1
Fixed in
  • 1.1.0+dfsg.1-4.1ubuntu0.1
Ubuntu 20.04 LTSlibgit2pkg:deb/ubuntu/libgit2?arch=source&distro=focalOther threatsAffected
  • <0.28.4+dfsg.1-2ubuntu0.1
Fixed in
  • 0.28.4+dfsg.1-2ubuntu0.1
Ubuntu Pro 18.04 LTSlibgit2pkg:deb/ubuntu/libgit2?arch=source&distro=esm-apps/bionicOther threatsAffected
  • <0.26.0+dfsg.1-1.1ubuntu0.2+esm1
Fixed in
  • 0.26.0+dfsg.1-1.1ubuntu0.2+esm1
Ubuntu Pro 16.04 LTSlibgit2pkg:deb/ubuntu/libgit2?arch=source&distro=esm-apps/xenialOther threatsAffected
  • <0.24.1-2ubuntu0.2+esm2
Fixed in
  • 0.24.1-2ubuntu0.2+esm2

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

Community reviews

Loading reviews…