CVE-2024-24575
Fixed in a distro release EPSS 1%CVSS 7.5
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_revparse_single` can cause the function to enter an infinite loop, potentially causing a Denial of Service attack in the calling application. The revparse function in `src/libgit2/revparse.c` uses a loop to parse the user-provided spec string. There is an edge-case during parsing that allows a bad actor to force the loop conditions to access arbitrary memory. Potentially, this could also leak memory if the extracted rev spec is reflected back to the attacker. As such, libgit2 versions before 1.4.0 are not affected. Users should upgrade to version 1.6.5 or 1.7.2.
Products: libgit2
Distro releases
| Release | Package | Fixed in |
|---|---|---|
| Amazon Linux 2 | cargo | 1.68.2-1.amzn2.0.6 |
| Amazon Linux 2 | clippy | 1.68.2-1.amzn2.0.6 |
| Amazon Linux 2 | rust | 1.68.2-1.amzn2.0.6 |
| Amazon Linux 2 | rust-analysis | 1.68.2-1.amzn2.0.6 |
| Amazon Linux 2 | rust-analyzer | 1.68.2-1.amzn2.0.6 |
| Amazon Linux 2 | rust-debugger-common | 1.68.2-1.amzn2.0.6 |
| Amazon Linux 2 | rust-doc | 1.68.2-1.amzn2.0.6 |
| Amazon Linux 2 | rust-gdb | 1.68.2-1.amzn2.0.6 |
| Amazon Linux 2 | rust-src | 1.68.2-1.amzn2.0.6 |
| Amazon Linux 2 | rust-std-static | 1.68.2-1.amzn2.0.6 |
| Amazon Linux 2 | rust-toolset | 1.68.2-1.amzn2.0.6 |
| Amazon Linux 2 | rustfmt | 1.68.2-1.amzn2.0.6 |
| Amazon Linux 2023 | cargo | 1.68.2-1.amzn2023.0.5 |
| Amazon Linux 2023 | clippy | 1.68.2-1.amzn2023.0.5 |
| Amazon Linux 2023 | libgit2 | 1.6.4-115.amzn2023.0.2 |
| Amazon Linux 2023 | libgit2-devel | 1.6.4-115.amzn2023.0.2 |
| Amazon Linux 2023 | rust | 1.68.2-1.amzn2023.0.5 |
| Amazon Linux 2023 | rust-analysis | 1.68.2-1.amzn2023.0.5 |
| Amazon Linux 2023 | rust-analyzer | 1.68.2-1.amzn2023.0.5 |
| Amazon Linux 2023 | rust-debugger-common | 1.68.2-1.amzn2023.0.5 |
| Amazon Linux 2023 | rust-doc | 1.68.2-1.amzn2023.0.5 |
| Amazon Linux 2023 | rust-gdb | 1.68.2-1.amzn2023.0.5 |
| Amazon Linux 2023 | rust-lldb | 1.68.2-1.amzn2023.0.5 |
| Amazon Linux 2023 | rust-src | 1.68.2-1.amzn2023.0.5 |
| Amazon Linux 2023 | rust-std-static | 1.68.2-1.amzn2023.0.5 |
| Amazon Linux 2023 | rust-std-static-wasm32-unknown-unknown | 1.68.2-1.amzn2023.0.5 |
| Amazon Linux 2023 | rust-std-static-wasm32-wasi | 1.68.2-1.amzn2023.0.5 |
| Amazon Linux 2023 | rustfmt | 1.68.2-1.amzn2023.0.5 |
| Chainguard | libgit2 | 1.7.2-r0 |
| Chainguard | libgit2-1.5 | 1.7.2-r0 |
| Debian 12 | libgit2 | 1.5.1+ds-1+deb12u1 |
| Debian 13 | libgit2 | 1.7.2+ds-1 |
| Debian 14 | libgit2 | 1.7.2+ds-1 |
| SUSE Linux Enterprise Module for Development Tools 15 SP6 | libgit2 | 1.7.2-150600.3.3.1 |
| Ubuntu 20.04 LTS | libgit2 | 0.28.4+dfsg.1-2ubuntu0.1 |
| Ubuntu 22.04 LTS | libgit2 | 1.1.0+dfsg.1-4.1ubuntu0.1 |
| Ubuntu Pro 16.04 LTS | libgit2 | 0.24.1-2ubuntu0.2+esm2 |
| Ubuntu Pro 18.04 LTS | libgit2 | 0.26.0+dfsg.1-1.1ubuntu0.2+esm1 |
| Wolfi | libgit2 | 1.7.2-r0 |
| openSUSE Leap 15.6 | libgit2 | 1.7.2-150600.3.3.1 |
| openSUSE Tumbleweed | libgit2 | 1.7.2-2.1 |