CVE-2026-53586
Medium · 6.5CVSS
6.5
EPSS
0.3%
Published
Aug 20, 2026
CISA due date
—
Cloudanix analysis
Some software that talks to Git servers over the web can be tricked into sending login details to the wrong place after following a link, letting attackers steal access to code repositories.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Data Exposure
- Component
- Library
- Class
- Credential Exposure
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The built-in HTTP transport follows an offsite redirect and passes the original owner URL instead of the redirected server URL to the credential callback on 401 responses, causing credentials scoped to the trusted host to be stored and sent to the attacker-controlled host.
Why it matters to the business
Applications depending on the affected library versions risk exposure of Git repository credentials, enabling unauthorized access to source code and potential intellectual property compromise across development environments.
How an attack unfolds
An attacker who can influence a trusted Git host or insert an open redirect causes a libgit2-based client to follow the redirect; when the malicious host returns 401, the library incorrectly supplies original-host credentials to the attacker via the Authorization header.
How to fix it
Upgrade to libgit2 1.8.6, 1.9.5 or later; for Red Hat systems apply the package update to libgit2-main 1.9.7-1.hum1 (RHSA-2026:59361) and rebuild dependent applications against the fixed library.
How to confirm the fix worked
Confirm the running libgit2 shared library reports a version at or above the fixed releases; perform controlled tests that trigger HTTP redirects and verify credentials are no longer forwarded to the redirected host.
Typical attack path
- Attacker plants an open redirect or controls a host reachable via redirect from a trusted Git server
- Victim application initiates an HTTP Git operation using vulnerable libgit2
- Library follows the initial redirect to the attacker host
- Attacker host returns 401 Unauthorized
- Library invokes credential callback with original URL and forwards resulting credentials to attacker
How to detect it
Review application and system logs for Git HTTP operations that result in unexpected host connections or 401 responses followed by credential-bearing requests; correlate with credential usage outside expected repository hosts.
What your security team should do
- Prioritize patching all instances of libgit2 to the fixed versions
- Inventory and rebuild applications that statically or dynamically link the library
- Review Git credential helper configurations and limit credential scope where possible
The record
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.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|
Related vulnerabilities
- CVE-2026-116666 Tanium addressed an information disclosure vulnerability in Discover. CWE-200
- CVE-2026-116665 Tanium addressed an information disclosure vulnerability in Discover. CWE-200
- CVE-2026-121509 A security flaw has been discovered in Headless CMS Plugin up to 2.0.4 on WordPress. CWE-200
- CVE-2026-121254 Information leak in Select in Google Chrome prior to 157.0.8103.38 allowed a remote… CWE-200
- CVE-2026-121243 Information leak in Frames in Google Chrome prior to 157.0.8103.38 allowed a remote… CWE-200
- CVE-2026-121239 Information leak in Core in Google Chrome prior to 157.0.8103.38 allowed a remote… CWE-200
- CVE-2026-121235 Information leak in Paint in Google Chrome prior to 157.0.8103.38 allowed a remote… CWE-200
- CVE-2026-121161 Information leak in BackgroundFetch in Google Chrome prior to 157.0.8103.38 allowed a… CWE-200