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. Using well-crafted inputs to `git_revparse_single` can cause the function to enter an infinite loop, potentially causing a Denial of Service attack in the calling application. The revparse function in `src/libgit2/revparse.c` uses a loop to parse the user-provided spec string. There is an edge-case during parsing that allows a bad actor to force the loop conditions to access arbitrary memory. Potentially, this could also leak memory if the extracted rev spec is reflected back to the attacker. As such, libgit2 versions before 1.4.0 are not affected. Users should upgrade to version 1.6.5 or 1.7.2.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
Debian Bugs1063415

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
libgit2 (PTS)buster0.27.7+dfsg.1-0.2fixed
buster (security)0.27.7+dfsg.1-0.2+deb10u2fixed
bullseye (security)1.1.0+dfsg.1-4+deb11u2fixed
bookworm (security)1.5.1+ds-1+deb12u1fixed
sid, trixie1.7.2+ds-1fixed

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

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
libgit2sourcebuster(not affected)
libgit2sourcebullseye(not affected)


[bullseye] - libgit2 <not-affected> (Vulnerable code introduced later)
[buster] - libgit2 <not-affected> (Vulnerable code introduced later)
Introduced by: (v1.4.0)
Fixed by: (v1.6.5)
Fixed by: (v1.7.2)

Search for package or bug name: Reporting problems