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. Prior to 1.8.6 and 1.9.5, libgit2 performs a fixed-size strncmp in set_data in src/libgit2/transports/smart_pkt.c without first verifying that the smart-protocol pkt-line capability buffer contains 14 bytes. A malicious Git server can make bytes after the pkt-line complete object-format=, causing format_str to advance beyond the pkt-line and the following memchr length calculation to underflow. The resulting heap out-of-bounds walk can crash a client during the first refs-advertisement packet over HTTP, HTTPS, SSH, or the Git protocol. This issue is fixed in versions 1.8.6 and 1.9.5.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| libgit2 | libgit2 | < 1.8.6, >= 1.9.0, < 1.9.5 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | libgit2 | 1.9.6+ds-1 | — |
| Debian 13 | libgit2 | 1.9.0+ds-2+deb13u1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.04 LTS | libgit2 | 1.9.1+ds-1ubuntu1.1 | — |
| Ubuntu 24.04 LTS | libgit2 | 1.7.2+ds-1ubuntu3.1 | — |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 10 | rust +16 | 1.92.0-2.el10_2 | RHSA-2026:67286 |
| RHEL 9 | rust +13 | 1.92.0-2.el9_8 | RHSA-2026:67285 |
Show 4 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 10.0 EUS | rust +16 | 1.84.1-1.el10_0.4 | RHSA-2026:69096 |
| RHEL 9.6 EUS | rust +13 | 1.84.1-1.el9_6.1 | RHSA-2026:69109 |
| RHEL 9.4 E4S | rust +13 | 1.75.0-1.el9_4.1 | RHSA-2026:69097 |
| Red Hat Hardened Images 1 | libgit2 +1 | 1.9.7-1.hum1 | RHSA-2026:59361 |
AlmaLinux
Errata ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux 10 | rust +16 | 1.92.0-2.el10_2.alma.1 | ALSA-2026:67286 |
| AlmaLinux 9 | rust +13 | 1.92.0-2.el9_8 | ALSA-2026:67285 |
Rocky Linux
Errata ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Rocky Linux 10 | rust | 1.92.0-2.el10_2 | RLSA-2026:67286 |
| Rocky Linux 9 | rust | 1.92.0-2.el9_8 | RLSA-2026:67285 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | libgit2 | 1.9.6-1.1 | openSUSE-SU-2026:11315-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | libgit2 | 1.9.6-r0 | — |
| Alpine v3.23 | libgit2 | 1.9.6-r0 | — |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2023 | cargo-c | 0.10.21-1.amzn2023.0.1 | ALAS2023-2026-2064 |
| Amazon Linux 2023 | libgit2 +1 | 1.6.4-116.amzn2023 | ALAS2023-2026-2083 |
| Amazon Linux 2023 | network-flow-monitor-agent | 1.1.8-1.amzn2023.0.1 | ALAS2023-2026-3116 |
| Amazon Linux 2023 | rust +14 | 1.97.0-2.amzn2023 | ALAS2023-2026-2065 |
| Amazon Linux 2 | rust +11 | 1.97.0-2.amzn2 | ALAS2-2026-3865 |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 3 | libgit2 | 1.7.2-3 | — |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
GitHub 1 repository
-
Alixploit22/CVE-2026-53587 ★ 0 · Aug 15, 2026
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 17
- ALSA-2026:67285 Important: rust security update AlmaLinux Security Advisories · Oct 29, 2026
- ALSA-2026:67286 Important: rust security update AlmaLinux Security Advisories · Oct 29, 2026
- ALAS2023-2026-3116 Important: network-flow-monitor-agent security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Oct 23, 2026
- RHSA-2026:59361 Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update Red Hat Security Advisories (RHSA) · Oct 6, 2026
- RHSA-2026:69109 Red Hat Security Advisory: rust security update Red Hat Security Advisories (RHSA) · Sep 22, 2026
- RHSA-2026:69097 Red Hat Security Advisory: rust security update Red Hat Security Advisories (RHSA) · Sep 22, 2026
- RHSA-2026:69096 Red Hat Security Advisory: rust security update Red Hat Security Advisories (RHSA) · Sep 22, 2026
- RHSA-2026:67286 Red Hat Security Advisory: rust security update Red Hat Security Advisories (RHSA) · Sep 22, 2026
- RHSA-2026:67285 Red Hat Security Advisory: rust security update Red Hat Security Advisories (RHSA) · Sep 22, 2026
- WID-SEC-2026-3333 Red Hat Enterprise Linux (libgit2): Schwachstelle ermöglicht Denial of Service BSI CERT-Bund (WID) · Sep 20, 2026
- RLSA-2026:67285 Important: rust security update Rocky Linux Security Advisories · Sep 15, 2026
- RLSA-2026:67286 Important: rust security update Rocky Linux Security Advisories · Sep 15, 2026
- ALAS2023-2026-2083 Important: libgit2 security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Aug 31, 2026
- ALAS2-2026-3865 Important: rust security update (Amazon Linux 2) Amazon Linux Security Center (ALAS) · Aug 17, 2026
- ALAS2023-2026-2064 Important: rust-cargo-c security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Aug 17, 2026
- ALAS2023-2026-2065 Important: rust security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Aug 17, 2026
- openSUSE-SU-2026:11315-1 libgit2-1_9-1.9.6-1.1 on GA media SUSE / openSUSE Security Updates · Jul 21, 2026
References
- https://github.com/libgit2/libgit2/security/advisories/GHSA-pm24-4jhq-3xvm
- https://github.com/libgit2/libgit2/commit/2c0ce8c0132ac38ab0db28239462a671e2e5440e
- https://github.com/libgit2/libgit2/commit/affda60c10fcef16723451c0d7dc71b71dc20ad3
- https://github.com/libgit2/libgit2/commit/d7a9fb87f504434e9f45228678953c4fa56e7640
- https://github.com/libgit2/libgit2/releases/tag/v1.8.6
- https://github.com/libgit2/libgit2/releases/tag/v1.9.5