CVE-2026-53587: libgit2 - Unauthenticated network-reachable heap out-of-bounds read in transports/smart_pkt.c:set_data
Last updated 13 August 2026
Other sources
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 setdata in src/libgit2/transports/smartpkt.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 formatstr 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.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/libgit2to a version that resolves this vulnerability.Fixed in 1.9.6+ds-1 - Upgrade
Upgrade
libgit2to a version that resolves this vulnerability.Fixed in 1.8.6 - Upgrade
Upgrade
libgit2to a version that resolves this vulnerability.Fixed in 1.9.5
Event History
Frequently Asked Questions
Which clients and connections are exposed?
Applications using libgit2 versions before 1.8.6 or 1.9.5 are exposed when they contact a malicious Git server. The crash can be triggered in the first refs-advertisement packet over HTTP, HTTPS, SSH, or the Git protocol.
Does exploitation require authentication or user interaction?
No. The supplied vector identifies network access, low attack complexity, no privileges, and no user interaction; a malicious Git server can send the malformed smart-protocol pkt-line.
What is the impact of a successful exploit?
The heap out-of-bounds walk can crash the client. The provided impact vector indicates availability impact only, with no confidentiality or integrity impact listed.
How can I remediate this issue?
Update libgit2 to version 1.8.6 or 1.9.5, which contain the fix.