CVEfocus › CVE database › CVE-2026-53586

CVE-2026-53586libgit2: HTTP transport can leak credentials to an offsite redirect target

CVSS 6.5 MediumEPSS 0.5% (higher than 33% of CVEs)Published 2026-08-20Updated 2026-08-21Assigner: GitHub_M

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, 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.

CWE-200CWE-522CWE-601

What to do

Fixed builds are available from Alpine, Debian, Ubuntu: see the table below for the fixed version per release.

Red Hat, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

7Fixed
37Fix pending

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04libgit2Fixed1.9.1+ds-1ubuntu1.1UBUNTU-CVE-2026-53586
Ubuntu 24.04libgit2Fixed1.7.2+ds-1ubuntu3.1UBUNTU-CVE-2026-53586
Ubuntu 22.04libgit2Fix pending1.1.0+dfsg.1-4.1ubuntu0.1+esm1 (Ubuntu Pro)UBUNTU-CVE-2026-53586
Ubuntu 20.04libgit2Fix pending0.28.4+dfsg.1-2ubuntu0.1+esm1 (Ubuntu Pro)UBUNTU-CVE-2026-53586
Debian 14libgit2Fixed1.9.6+ds-1DEBIAN-CVE-2026-53586
Debian 13libgit2Fixed1.9.0+ds-2+deb13u1DEBIAN-CVE-2026-53586
Debian 12libgit2Fixed1.5.1+ds-1+deb12u2DEBIAN-CVE-2026-53586
Red Hat Enterprise Linux 10cargoFix pending
Fix deferred
Red Hat Enterprise Linux 10clippyFix pending
Fix deferred
Red Hat Enterprise Linux 10rustFix pending
Fix deferred
Red Hat Enterprise Linux 10rust-analyzerFix pending
Fix deferred
Red Hat Enterprise Linux 10rust-debugger-commonFix pending
Fix deferred
Red Hat Enterprise Linux 10rust-docFix pending
Fix deferred
Red Hat Enterprise Linux 10rust-gdbFix pending
Fix deferred
Red Hat Enterprise Linux 10rust-lldbFix pending
Fix deferred
Red Hat Enterprise Linux 10rust-srcFix pending
Fix deferred
Red Hat Enterprise Linux 10rust-std-staticFix pending
Fix deferred
Red Hat Enterprise Linux 10rust-std-static-aarch64-unknown-none-softfloatFix pending
Fix deferred
Red Hat Enterprise Linux 10rust-std-static-wasm32-unknown-unknownFix pending
Fix deferred
Red Hat Enterprise Linux 10rust-std-static-wasm32-wasip1Fix pending
Fix deferred
Red Hat Enterprise Linux 10rust-std-static-x86_64-unknown-noneFix pending
Fix deferred
Red Hat Enterprise Linux 10rust-toolsetFix pending
Fix deferred
Red Hat Enterprise Linux 10rust-toolset-srpm-macrosFix pending
Fix deferred
Red Hat Enterprise Linux 10rustfmtFix pending
Fix deferred
Red Hat Enterprise Linux 9cargoFix pending
Fix deferred
Red Hat Enterprise Linux 9clippyFix pending
Fix deferred
Red Hat Enterprise Linux 9rustFix pending
Fix deferred
Red Hat Enterprise Linux 9rust-analysisFix pending
Fix deferred
Red Hat Enterprise Linux 9rust-analyzerFix pending
Fix deferred
Red Hat Enterprise Linux 9rust-debugger-commonFix pending
Fix deferred
Red Hat Enterprise Linux 9rust-docFix pending
Fix deferred
Red Hat Enterprise Linux 9rust-gdbFix pending
Fix deferred
Red Hat Enterprise Linux 9rust-lldbFix pending
Fix deferred
Red Hat Enterprise Linux 9rust-srcFix pending
Fix deferred
Red Hat Enterprise Linux 9rust-std-staticFix pending
Fix deferred
Red Hat Enterprise Linux 9rust-std-static-wasm32-unknown-unknownFix pending
Fix deferred
Red Hat Enterprise Linux 9rust-std-static-wasm32-wasiFix pending
Fix deferred
Red Hat Enterprise Linux 9rust-std-static-wasm32-wasip1Fix pending
Fix deferred
Red Hat Enterprise Linux 9rust-toolsetFix pending
Fix deferred
Red Hat Enterprise Linux 9rustfmtFix pending
Fix deferred
Red Hat Enterprise Linux 8libgit2Fix pending
Fix deferred
Red Hat Enterprise Linux 8libgit2-develFix pending
Fix deferred
Alpine Linux 3.24libgit2Fixed1.9.6-r0ALPINE-CVE-2026-53586
Alpine Linux 3.23libgit2Fixed1.9.6-r0ALPINE-CVE-2026-53586

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.