CVE-2026-53587 libgit2 - Unauthenticated network-reachable heap out-of-bounds read in transports/smart_pkt.c:set_data
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: yes · technical impact: partial
- Technology
- UbuntuDebianRed Hat
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.
Upgrade path
16 packages: 12 fixed, 3 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| redhat/libgit2(Red Hat enterprise_linux 8) | All versions | No fix listed | No fix yet |
| redhat/libgit2(Red Hat enterprise_linux_ai 3) | All versions | No fix listed | No fix yet |
| redhat/rust(Red Hat enterprise_linux_ai 3) | All versions | No fix listed | No fix yet |
| alpine/libgit2(Alpine v3.23) | < 1.9.6-r0 | 1.9.6-r0 | Fixed |
| alpine/libgit2(Alpine v3.24) | < 1.9.6-r0 | 1.9.6-r0 | Fixed |
| debian/libgit2(Debian 13) | < 1.9.0+ds-2+deb13u1; = 1.9.0+ds-2 | 1.9.0+ds-2+deb13u1 | Fixed |
| debian/libgit2(Debian 14) | < 1.9.6+ds-1; = 1.9.0+ds-2; = 1.9.1+ds-1; = 1.9.2+ds-1 +10 more | 1.9.6+ds-1 | Fixed |
| redhat/libgit2-main(Red Hat hummingbird 1) | < 1.9.7-1.hum1 | 1.9.7-1.hum1 | Fixed |
| redhat/rust(Red Hat enterprise_linux 10.2) | < 1.92.0-2.el10_2 | 1.92.0-2.el10_2 | Fixed |
| redhat/rust(Red Hat enterprise_linux 9) | < 1.92.0-2.el9_8 | 1.92.0-2.el9_8 | Fixed |
| redhat/rust(Red Hat enterprise_linux_eus 10.0) | < 1.84.1-1.el10_0.4 | 1.84.1-1.el10_0.4 | Fixed |
| redhat/rust(Red Hat rhel_e4s 9.4) | < 1.75.0-1.el9_4.1 | 1.75.0-1.el9_4.1 | Fixed |
| redhat/rust(Red Hat rhel_eus 9.6) | < 1.84.1-1.el9_6.1 | 1.84.1-1.el9_6.1 | Fixed |
| ubuntu/libgit2(Ubuntu 24.04) | < 1.7.2+ds-1ubuntu3.1 | 1.7.2+ds-1ubuntu3.1 | Fixed |
| ubuntu/libgit2(Ubuntu 26.04) | < 1.9.1+ds-1ubuntu1.1 | 1.9.1+ds-1ubuntu1.1 | Fixed |
| libgit2 | = < 1.8.6; = >= 1.9.0, < 1.9.5 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| libgit2 | = < 1.8.6 | No fix listed |
| libgit2 | = >= 1.9.0, < 1.9.5 | No fix listed |
| redhat/rust(Red Hat:enterprise_linux:10.2) | < 1.92.0-2.el10_2 | 1.92.0-2.el10_2 |
| redhat/rust(Red Hat:enterprise_linux_eus:10.0) | < 1.84.1-1.el10_0.4 | 1.84.1-1.el10_0.4 |
| redhat/rust(Red Hat:enterprise_linux:9) | < 1.92.0-2.el9_8 | 1.92.0-2.el9_8 |
| redhat/rust(Red Hat:rhel_e4s:9.4) | < 1.75.0-1.el9_4.1 | 1.75.0-1.el9_4.1 |
| redhat/rust(Red Hat:rhel_eus:9.6) | < 1.84.1-1.el9_6.1 | 1.84.1-1.el9_6.1 |
| redhat/libgit2-main(Red Hat:hummingbird:1) | < 1.9.7-1.hum1 | 1.9.7-1.hum1 |
| redhat/libgit2(Red Hat:enterprise_linux:8) | All versions | No fix listed |
| redhat/libgit2(Red Hat:enterprise_linux_ai:3) | All versions | No fix listed |
| redhat/rust(Red Hat:enterprise_linux_ai:3) | All versions | No fix listed |
| debian/libgit2(Debian:13) | < 1.9.0+ds-2+deb13u1 | 1.9.0+ds-2+deb13u1 |
| debian/libgit2(Debian:13) | = 1.9.0+ds-2 | No fix listed |
| debian/libgit2(Debian:14) | < 1.9.6+ds-1 | 1.9.6+ds-1 |
| debian/libgit2(Debian:14) | = 1.9.0+ds-2 | No fix listed |
| debian/libgit2(Debian:14) | = 1.9.1+ds-1 | No fix listed |
| debian/libgit2(Debian:14) | = 1.9.2+ds-1 | No fix listed |
| debian/libgit2(Debian:14) | = 1.9.2+ds-2 | No fix listed |
| debian/libgit2(Debian:14) | = 1.9.2+ds-3 | No fix listed |
| debian/libgit2(Debian:14) | = 1.9.2+ds-4 | No fix listed |
| debian/libgit2(Debian:14) | = 1.9.2+ds-5 | No fix listed |
| debian/libgit2(Debian:14) | = 1.9.2+ds-6 | No fix listed |
| debian/libgit2(Debian:14) | = 1.9.2+ds-7 | No fix listed |
| debian/libgit2(Debian:14) | = 1.9.2+ds-8 | No fix listed |
| debian/libgit2(Debian:14) | = 1.9.2+ds-9 | No fix listed |
Show 6 more
| Product | Affected versions | Fixed in |
|---|---|---|
| debian/libgit2(Debian:14) | = 1.9.3+ds-1 | No fix listed |
| debian/libgit2(Debian:14) | = 1.9.4+ds-1 | No fix listed |
| alpine/libgit2(Alpine:v3.23) | < 1.9.6-r0 | 1.9.6-r0 |
| alpine/libgit2(Alpine:v3.24) | < 1.9.6-r0 | 1.9.6-r0 |
| ubuntu/libgit2(Ubuntu:24.04) | < 1.7.2+ds-1ubuntu3.1 | 1.7.2+ds-1ubuntu3.1 |
| ubuntu/libgit2(Ubuntu:26.04) | < 1.9.1+ds-1ubuntu1.1 | 1.9.1+ds-1ubuntu1.1 |
References
- https://github.com/libgit2/libgit2/security/advisories/GHSA-pm24-4jhq-3xvm exploit
- 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
- Red Hat CVE page mitigation vendor-advisory
- RHSA-2026:67286 patch vendor-advisory
- RHSA-2026:69096 patch vendor-advisory
- RHSA-2026:67285 patch vendor-advisory
- RHSA-2026:69097 patch vendor-advisory
- RHSA-2026:69109 patch vendor-advisory
- RHSA-2026:59361 patch vendor-advisory
- Red Hat Bugzilla 2520693 issue-tracking
- www.cve.org
- nvd.nist.gov
- Debian Security Tracker CVE-2026-53587 vendor-advisory
- security.alpinelinux.org vendor-advisory
- Ubuntu CVE tracker vendor-advisory
- USN-8628-1 vendor-advisory
- ENISA EUVD EUVD-2026-63547 third-party-advisory