Vulnerabilities · 2024 · Libgit2
CVE-2024-24577
Libgit2 vulnerability
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.
Affected products
Libgit2. The exact versions are in the references.
What to do now
- Check your exposureFind out whether Libgit2 runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- github.com/libgit2/libgit2/security/advisories/GHSA-j2v7-4f6v-gpg8 · Third Party Advisory
- github.com/libgit2/libgit2/releases/tag/v1.6.5
- github.com/libgit2/libgit2/releases/tag/v1.7.2
- lists.debian.org/debian-lts-announce/2024/02/msg00012.html
- lists.fedoraproject.org/archives/list/[email protected]/message/4M3
- lists.fedoraproject.org/archives/list/[email protected]/message/7CN
- lists.fedoraproject.org/archives/list/[email protected]/message/S63
- lists.fedoraproject.org/archives/list/[email protected]/message/Z6M
- nvd.nist.gov/vuln/detail/CVE-2024-24577
- cve.org/CVERecord?id=CVE-2024-24577
More vulnerabilities in Libgit2 products
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.