vulnerability

Amazon Linux 2023: CVE-2024-24577: Important priority package update for libgit2 (Multiple Advisories)

Severity
10
CVSS
(AV:N/AC:L/Au:N/C:C/I:C/A:C)
Published
Feb 6, 2024
Added
Feb 17, 2025
Modified
Jul 4, 2025

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.
A flaw was found in libgit2, a cross-platform, linkable library implementation of Git. A specially crafted payload to git_index_add can cause heap corruption that could be leveraged for arbitrary code execution. The attacker must be able to trigger two consecutive calls to git_index_add with a filename that starts with a / character to exploit this vulnerability. To control the heap corruption, the attacker must be able to control the ctime field of the git_index_entry data structure.

Solutions

amazon-linux-2023-upgrade-cargoamazon-linux-2023-upgrade-cargo-debuginfoamazon-linux-2023-upgrade-clippyamazon-linux-2023-upgrade-clippy-debuginfoamazon-linux-2023-upgrade-libgit2amazon-linux-2023-upgrade-libgit2-debuginfoamazon-linux-2023-upgrade-libgit2-debugsourceamazon-linux-2023-upgrade-libgit2-develamazon-linux-2023-upgrade-rustamazon-linux-2023-upgrade-rust-analysisamazon-linux-2023-upgrade-rust-analyzeramazon-linux-2023-upgrade-rust-analyzer-debuginfoamazon-linux-2023-upgrade-rust-debugger-commonamazon-linux-2023-upgrade-rust-debuginfoamazon-linux-2023-upgrade-rust-debugsourceamazon-linux-2023-upgrade-rust-docamazon-linux-2023-upgrade-rustfmtamazon-linux-2023-upgrade-rustfmt-debuginfoamazon-linux-2023-upgrade-rust-gdbamazon-linux-2023-upgrade-rust-lldbamazon-linux-2023-upgrade-rust-srcamazon-linux-2023-upgrade-rust-std-staticamazon-linux-2023-upgrade-rust-std-static-wasm32-unknown-unknownamazon-linux-2023-upgrade-rust-std-static-wasm32-wasi
Title
Rapid7 Labs

2026 Global Threat Landscape Report

The predictive window has collapsed. Exploitation follows disclosure in days. See how attackers are accelerating and how to stay ahead.