Libgit2
libgit2 - Unauthenticated network-reachable heap out-of-bounds read in transports/smart_pkt.c:set_data
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 versions and mitigation
From the CVE record and the vendor's references.Affected
- < 1.8.6
- >= 1.9.0, < 1.9.5
Fixed in 1.8.6, 1.9.5
Mitigation
Upgrade libgit2 to 1.8.6 or 1.9.5 or later.
References
- Vendor advisory github.com/libgit2/libgit2/security/advisories…
- Patch github.com/libgit2/libgit2/commit/2c0ce8c0132a…
- Patch github.com/libgit2/libgit2/commit/affda60c10fc…
3 more
Timeline
Days relative to CVE publicationFirst public PoC 5.2 days before publication; not in CISA KEV. First PoC: Alixploit22/CVE-2026-53587 (created 15 Aug 2026, found by us: backfilled).
PoC repositories
Found on GitHub.1 PoCs
PoCs 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| Alixploit22/CVE-2026-53587 | 15 Aug 2026 −5.2 d | 0 | PoC
Flags · score 30
Below the suspicion threshold (50); does not change the assessment. |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.