CVE-2026-53586
Fixed in a distro release EPSS <1%CVSS 6.5
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.
Products: libgit2
Distro releases
| Release | Package | Fixed in |
|---|---|---|
| Amazon Linux 2 | cargo | 1.97.0-2.amzn2 |
| Amazon Linux 2 | clippy | 1.97.0-2.amzn2 |
| Amazon Linux 2 | rust | 1.97.0-2.amzn2 |
| Amazon Linux 2 | rust-analyzer | 1.97.0-2.amzn2 |
| Amazon Linux 2 | rust-debugger-common | 1.97.0-2.amzn2 |
| Amazon Linux 2 | rust-doc | 1.97.0-2.amzn2 |
| Amazon Linux 2 | rust-gdb | 1.97.0-2.amzn2 |
| Amazon Linux 2 | rust-src | 1.97.0-2.amzn2 |
| Amazon Linux 2 | rust-std-static | 1.97.0-2.amzn2 |
| Amazon Linux 2 | rust-toolset | 1.97.0-2.amzn2 |
| Amazon Linux 2 | rust-toolset-srpm-macros | 1.97.0-2.amzn2 |
| Amazon Linux 2 | rustfmt | 1.97.0-2.amzn2 |
| Amazon Linux 2023 | cargo | 1.97.0-2.amzn2023 |
| Amazon Linux 2023 | clippy | 1.97.0-2.amzn2023 |
| Amazon Linux 2023 | libgit2 | 1.6.4-116.amzn2023 |
| Amazon Linux 2023 | libgit2-devel | 1.6.4-116.amzn2023 |
| Amazon Linux 2023 | rust | 1.97.0-2.amzn2023 |
| Amazon Linux 2023 | rust-analyzer | 1.97.0-2.amzn2023 |
| Amazon Linux 2023 | rust-debugger-common | 1.97.0-2.amzn2023 |
| Amazon Linux 2023 | rust-doc | 1.97.0-2.amzn2023 |
| Amazon Linux 2023 | rust-gdb | 1.97.0-2.amzn2023 |
| Amazon Linux 2023 | rust-lldb | 1.97.0-2.amzn2023 |
| Amazon Linux 2023 | rust-src | 1.97.0-2.amzn2023 |
| Amazon Linux 2023 | rust-std-static | 1.97.0-2.amzn2023 |
| Amazon Linux 2023 | rust-std-static-wasm32-unknown-unknown | 1.97.0-2.amzn2023 |
| Amazon Linux 2023 | rust-std-static-wasm32-wasip1 | 1.97.0-2.amzn2023 |
| Amazon Linux 2023 | rust-toolset | 1.97.0-2.amzn2023 |
| Amazon Linux 2023 | rust-toolset-srpm-macros | 1.97.0-2.amzn2023 |
| Amazon Linux 2023 | rustfmt | 1.97.0-2.amzn2023 |
| Debian 12 | libgit2 | 1.5.1+ds-1+deb12u2 |
| Debian 13 | libgit2 | 1.9.0+ds-2+deb13u1 |
| Debian 14 | libgit2 | 1.9.6+ds-1 |
| Red Hat hummingbird 1 | libgit2 | 0:1.9.7-1.hum1 |
| Red Hat hummingbird 1 | libgit2-devel | 0:1.9.7-1.hum1 |
| Ubuntu 24.04 LTS | libgit2 | 1.7.2+ds-1ubuntu3.1 |
| Ubuntu 26.04 LTS | libgit2 | 1.9.1+ds-1ubuntu1.1 |
| Ubuntu Pro 14.04 LTS | libgit2 | 0.19.0-2ubuntu0.4+esm2 |
| Ubuntu Pro 16.04 LTS | libgit2 | 0.24.1-2ubuntu0.2+esm3 |
| Ubuntu Pro 18.04 LTS | libgit2 | 0.26.0+dfsg.1-1.1ubuntu0.2+esm2 |
| Ubuntu Pro 20.04 LTS | libgit2 | 0.28.4+dfsg.1-2ubuntu0.1+esm1 |
| Ubuntu Pro 22.04 LTS | libgit2 | 1.1.0+dfsg.1-4.1ubuntu0.1+esm1 |
| openSUSE Tumbleweed | libgit2 | 1.9.6-1.1 |