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

Published Aug 20, 2026
·
Updated

Last updated 13 August 2026

Other sources

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 handleremoteauth and handleauth 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 GITCREDENTIALUSERPASSPLAINTEXT 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.

MITRE

Affected Software

1 affected componentFixes available
debian/libgit2<=1.1.0+dfsg.1-4+deb11u2, <=1.5.1+ds-1+deb12u1, <=1.9.0+ds-2
1.9.6+ds-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/libgit2 to a version that resolves this vulnerability.

    Fixed in 1.9.6+ds-1
  2. Upgrade

    Upgrade libgit2 to a version that resolves this vulnerability.

    Fixed in 1.8.6
  3. Upgrade

    Upgrade libgit2 to a version that resolves this vulnerability.

    Fixed in 1.9.5

Event History

Aug 12, 2026
Data Sourced
via Debian·10:40 PM
DescriptionAffected Software
Aug 13, 2026
Data Sourced
via Ubuntu·10:40 PM
RemedyDescriptionSeverityAffected Software
Aug 20, 2026
CVE Published
via MITRE·06:40 PM
Data Sourced
via MITRE·06:40 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which applications are exposed to credential disclosure?

Applications using libgit2’s built-in HTTP transport with a credential callback that supplies HTTP Basic credentials, personal access tokens, or equivalent credentials based on the original repository URL are exposed. The affected behavior is present before libgit2 1.8.6 and 1.9.5.

2

What does an attacker need to exploit this issue?

The attacker must control a trusted Git host or an open redirect on that trusted host. They can redirect an HTTP transport request to an offsite host that responds with 401 Unauthorized, causing the application’s credential callback to provide credentials scoped to the original URL.

3

Is user interaction required?

Yes. The supplied severity vector includes UI:R, indicating that user interaction is required. Exploitation also depends on the application following an initial offsite redirect through the built-in HTTP transport.

4

What should be done if an immediate update is not possible?

Avoid accessing repositories hosted on Git servers that are untrusted or may contain open redirects, and avoid supplying reusable HTTP credentials through affected libgit2 credential callbacks where possible. Updating to libgit2 1.8.6 or 1.9.5 is the documented fix.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203