🛡️ CVE-2026-41506 — go-git

🟡 CVSS 4.7 — Medium ✅ No Known Exploit CWE-522 NVD
4.7
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

go-git: Credential leak via cross-host redirect in smart HTTP transport ### Impact `go-git` may leak HTTP authentication credentials when following redirects during smart-HTTP clone and fetch operations. If a remote repository responds to the initial `/info/refs` request with a redirect to a different host, go-git updates the session endpoint to the redirected location and reuses the original authentication for subsequent requests. This can result in the credentials (e.g. Authorization headers) being sent to an unintended host. An attacker controlling or influencing the redirect target can capture these credentials and potentially reuse them to access the victim’s repositories or other resources, depending on the scope of the credential. **Clients using `go-git` exclusively with trusted remotes (for example, GitHub or GitLab), and over a secure HTTPS connection, are not affected by this issue.** The risk arises when interacting with untrusted or misconfigured Git servers, or when using unsecured HTTP connections, which is not recommended. Such configurations also expose clients to a broader class of security risks beyond this issue, including credential interception and tampering of repository data. ### Patches Users should upgrade to `v5.18.0`, or `v6.0.0-alpha.2`, in order to mitigate this vulnerability. Versions prior to v5 are likely to be affected, users are recommended to upgrade to a supported `go-git` version. The patched versions add support for configuring [followRedirects](https://git-scm.com/docs/git-config#Documentation/git-config.txt-httpfollowRedirects). In line with upstream behaviour, the default is now `initial`, while users can opt into `FollowRedirects` or `NoFollowRedirects` programmatically. ### Credit Thanks to the 3 separate reports from @celinke97, @N0zoM1z0 and @AyushParkara. Thanks for finding and reporting this issue privately to the `go-git` project. :bow:

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. A user must be tricked into taking some action. The scope is changed, meaning a successful attack can affect components beyond the vulnerable one. Rated impact: confidentiality low, integrity none, availability none.

Weakness class

CVE-2026-41506 is classified as CWE-522: Insufficiently Protected Credentials. Credentials are stored or transmitted with protection too weak for what they unlock.

Affected software and timeline

Affected software: github.com/go-git/go-git/v5, github.com/go-git/go-git/v6, go-git and unknown. Published on 17 April 2026 and last revised on 8 August 2026. No public exploit is currently recorded for this entry. Record sourced from NVD.

References

github.com (Web)
nvd.nist.gov (Advisory)
github.com (Package)
github.com (Web)
github.com (Web)

CVE-2026-41506 on other distributions

Each distribution ships its own build and its own fixed version. Pick the one you run:

Details

Severity Medium
CVSS Score 4.7
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N
CWE CWE-522
Public Exploit ✅ No
Source NVD
Published 2026-04-17
Updated 2026-08-12
Modified 2026-08-08
Fix URL N/A

Affected Packages

Software From version Fixed in
github.com/go-git/go-git/v5
github.com/go-git/go-git/v6
go-git
unknown

Similar Threats

Vulnerability Monitoring

Track new vulnerabilities in go-git

CVE-2026-41506 is rated CVSS 4.7 Medium. BotEraser monitors your WordPress installation and notifies you when software you use appears in our vulnerability database.

Set Up Free Alerts →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

More CVE 2026 advisories

Part of CVE 2026 in the advisory index.