CVE-2026-53587

NameCVE-2026-53587
Descriptionlibgit2 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.
SourceCVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
ReferencesDSA-6453-1

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
libgit2 (PTS)bullseye (security), bullseye1.1.0+dfsg.1-4+deb11u2vulnerable
bookworm, bookworm (security)1.5.1+ds-1+deb12u1vulnerable
trixie1.9.0+ds-2vulnerable
trixie (security)1.9.0+ds-2+deb13u1fixed
forky, sid1.9.7+ds-1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
libgit2sourcetrixie1.9.0+ds-2+deb13u1DSA-6453-1
libgit2source(unstable)1.9.6+ds-1

Notes

https://github.com/libgit2/libgit2/security/advisories/GHSA-pm24-4jhq-3xvm
Fixed by: https://github.com/libgit2/libgit2/commit/affda60c10fcef16723451c0d7dc71b71dc20ad3 (v1.9.5)

Search for package or bug name: Reporting problems