CVE-2026-53586

NameCVE-2026-53586
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, the built-in HTTP transport in src/libgit2/transports/http.c follows an offsite initial redirect, and handle_remote_auth and handle_auth pass transport->owner->url instead of transport->server.url to the credential callback when the redirected host returns 401 Unauthorized. A callback that scopes credentials to the original trusted URL can therefore return GIT_CREDENTIAL_USERPASS_PLAINTEXT credentials that libgit2 stores in transport->server.cred and sends as an Authorization header to the redirected host. An attacker who controls a trusted Git host or an open redirect on that host can disclose HTTP Basic credentials, personal access tokens, or equivalent credentials. 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-2889-x8f6-mc4x
Fixed by: https://github.com/libgit2/libgit2/commit/af2b29ad0a74d5bac9751376879ddaf848136d3b (v1.9.5)

Search for package or bug name: Reporting problems