# CVE-2026-41506: go-git Credential leak via cross-host redirect in smart HTTP transport

> Attackers can steal HTTP authentication credentials when go-git follows cross-host redirects during clone or fetch operations.

- **Severity:** Medium 4.7 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 8 May 2026
- **Updated:** 11 May 2026
- **Also known as:** CLEANSTART-2026-EZ09259, CLEANSTART-2026-LM14651, CLEANSTART-2026-WN28156, CLEANSTART-2026-ZC93700, DEBIAN-CVE-2026-41506, GHSA-3xc5-wrhm-f963, GO-2026-5105, MINI-279c-qp94-f4xg, MINI-2j59-w8x2-q2gr, MINI-2j5x-f79j-84qc, MINI-2mv6-h7gx-9g4v, MINI-2p9f-px83-m3cg, MINI-2vwc-q2vh-77h6, MINI-3c3v-jp5w-59q3, MINI-3g79-j5vq-ww68, MINI-3hhf-5xvv-2vpj, MINI-3pcq-xh3r-4f7w, MINI-3v8g-vjhm-5xpm, MINI-3wgj-vfq5-2m2h, MINI-47jp-fjq9-xh86, MINI-4cch-xw7f-vqjm, MINI-4hg8-4m5w-j972, MINI-4m2v-f53j-rgvf, MINI-4wrh-3w7c-64g3, MINI-55wg-q942-vqv9, MINI-58pr-jwmr-hwpf, MINI-5j2x-wpq5-96rj, MINI-5j34-cjgg-fq98, MINI-5q57-28fg-7mr7, MINI-5r96-f7xg-7hj6, MINI-5v2c-994x-45p4, MINI-63qv-6pgp-vcmr, MINI-66ff-5hcw-qvgc, MINI-6mg9-vjg3-x2p7, MINI-6wc9-c3cx-h543, MINI-6xgq-wg82-4wc4, MINI-74vw-5wjm-hvv5, MINI-7552-65q4-fgrg, MINI-76pj-rhhj-rmjg, MINI-76pm-87p4-4p7g, MINI-787f-58cw-8482, MINI-7j5f-mpjg-8w56, MINI-7jfw-h3rc-76mv, MINI-7v3q-m42m-xgpp, MINI-826g-x2gc-q63g, MINI-893w-7v3p-922v, MINI-8phh-88cv-fff7, MINI-92gh-c7gx-wjrv, MINI-93m2-48c5-qvph, MINI-95fh-4rx6-2hxh, MINI-98wj-cpjj-568f, MINI-9c5j-5w47-5whx, MINI-9gq2-m3qj-g976, MINI-c34j-ghrg-9qcq, MINI-c6fp-c5cj-rh3x, MINI-cp5m-6m68-xx96, MINI-f5q6-gg6h-7p5v, MINI-f6c3-x2jq-pw5w, MINI-f6p6-w2pg-ppvg, MINI-ffmv-349v-phqq, MINI-fmwj-8qrr-6m6c, MINI-fq5p-5g3f-9crj, MINI-fqrg-ggm9-3vr4, MINI-g2p9-xvfm-m6jq, MINI-g85m-2q4f-m43m, MINI-gc58-68m7-p4q8, MINI-gjqf-2m48-5wg3, MINI-gmf8-m6rg-mg5q, MINI-grxm-27cw-f592, MINI-gx57-g68g-qv2c, MINI-h779-8hw3-jrr4, MINI-h8w2-52p3-fjrp, MINI-h95w-rhj8-r4rc, MINI-hhm7-pm7r-8252, MINI-hwfp-7q2j-c5r6, MINI-hx8x-3j5w-h7xf, MINI-j522-q6rr-43f8, MINI-j76q-xppc-w683, MINI-j8j5-9rpf-72w2, MINI-jc54-2r29-95r3, MINI-jcvp-h4ph-wx3f, MINI-jf39-7x8m-fx7j, MINI-jfj6-q6rw-8m2m, MINI-jwx6-8769-gg3w, MINI-jx7q-7824-9525, MINI-m2hc-wmwh-qw33, MINI-m6wg-22m7-qpjq, MINI-m739-r263-rfcv, MINI-m89v-pg2x-8h6g, MINI-mf28-j95x-6c5v, MINI-mp3p-xpr3-5xqx, MINI-mrr8-h5hf-3mpc, MINI-mvgr-2322-5hg4, MINI-mw5h-v3qh-66fg, MINI-p39w-8vr6-fhxx, MINI-p435-h97w-rmfp, MINI-p8v4-q7vx-v83h, MINI-p93p-64hr-89gm, MINI-pfq7-9jxw-c6xr, MINI-ph45-3wqh-5mg9, MINI-phjx-r5rw-5cr7, MINI-pp5m-pxjw-pgp7, MINI-px5f-888g-8gc4, MINI-pxmr-fc9r-546p, MINI-q93p-jg8c-pc45, MINI-qgmp-wj46-3v6j, MINI-qmqq-4mrg-3m63, MINI-qw2r-x457-x39v, MINI-qwcr-8cw5-98w8, MINI-r3m9-cg38-83mh, MINI-r4m2-6xmx-fpxv, MINI-r7x7-w58x-v3h5, MINI-r94f-xcwm-5859, MINI-rf93-93m3-x98r, MINI-rjj2-mgg9-55qh, MINI-rm6x-rh8q-hph5, MINI-rp76-988p-87h4, MINI-v7rx-xv49-v62j, MINI-vc3h-3hxg-q7px, MINI-vf75-3r4q-ppfw, MINI-vfg2-j234-8p2f, MINI-vqw7-454x-f795, MINI-vrcc-67qj-6pp4, MINI-w395-3hgw-pmjc, MINI-wcgf-34pv-7h44, MINI-wh2v-p9mw-47jr, MINI-wj9j-wcmg-5c2q, MINI-wjmw-q794-h62m, MINI-wpch-hg6g-hmf2, MINI-wqf5-9rfw-8wmx, MINI-wrpj-8mgr-q8w3, MINI-x9vh-p7f7-v5cq, MINI-xf5g-wpv8-pmq9, MINI-xgw7-fcq2-5gcg, MINI-xmgw-x58p-q3wp, MINI-xxj3-rjrx-7j54, RHSA-2026:17669, UBUNTU-CVE-2026-41506, openSUSE-SU-2026:10765-1

## What is CVE-2026-41506?

CVE-2026-41506 is a medium-severity vulnerability in go-git, published on 8 May 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

go-git is an extensible git implementation library written in pure Go. Prior to versions 5.18.0 and 6.0.0-alpha.2, go-git may leak HTTP authentication credentials when following redirects during smart-HTTP clone and fetch operations. This issue has been patched in versions 5.18.0 and 6.0.0-alpha.2.

Weakness: CWE-522 (Insufficiently Protected Credentials)

## Which versions are affected by CVE-2026-41506?

5 open source packages ship an affected version, including github.com/go-git/go-git/v5 and github.com/go-git/go-git/v6. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/go-git/go-git/v5` | Go | All versions | 5.18.0 |
| `github.com/go-git/go-git/v5` | Go | All versions | 5.18.0 |
| `github.com/go-git/go-git/v5` | Go | All versions | 5.18.0 |
| `github.com/go-git/go-git/v6` | Go | All versions | 6.0.0-alpha.2 |
| `github.com/go-git/go-git/v6` | Go | All versions | 6.0.0-alpha.2 |
| `syft` | Red Hat:hummingbird:1 | All versions | 0:1.44.0-0.3.hum1 |
| `amazon-ssm-agent` | openSUSE:Tumbleweed | All versions | 3.3.4268.0-2.1 |

Products: Go-Git Project Go-Git.

## How do I fix CVE-2026-41506?

Upgrade github.com/go-git/go-git/v5 to 5.18.0 or later.

## Is CVE-2026-41506 being exploited?

There is no known exploitation of CVE-2026-41506 in the wild and no public exploit code.

## Other vulnerabilities in go-git

- [CVE-2023-49569](https://insights.sbomify.com/CVE-2023-49569/): Maliciously crafted Git server replies can lead to path traversal and RCE on go-git clients (critical 9.8)
- [CVE-2025-21613](https://insights.sbomify.com/CVE-2025-21613/): go-git has an Argument Injection via the URL field (critical 9.2)
- [CVE-2025-21614](https://insights.sbomify.com/CVE-2025-21614/): go-git clients vulnerable to DoS via maliciously crafted Git server replies (high 7.5)
- [CVE-2023-49568](https://insights.sbomify.com/CVE-2023-49568/): Maliciously crafted Git server replies can cause DoS on go-git clients (high 7.5)
- [CVE-2026-45022](https://insights.sbomify.com/CVE-2026-45022/): go-git: Improper parsing of specially crafted objects may lead to inconsistent interpretation compared to upstream Git (high 7.0)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-41506 and fix it if it is affected.

What it is: CVE-2026-41506 is a medium-severity vulnerability in go-git, published on 8 May 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2026-41506 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/go-git/go-git/v5 (Go): affected all versions; fixed in 5.18.0
- github.com/go-git/go-git/v5 (Go): affected all versions; fixed in 5.18.0
- github.com/go-git/go-git/v5 (Go): affected all versions; fixed in 5.18.0
- github.com/go-git/go-git/v6 (Go): affected all versions; fixed in 6.0.0-alpha.2
- github.com/go-git/go-git/v6 (Go): affected all versions; fixed in 6.0.0-alpha.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-41506/ (Markdown: https://insights.sbomify.com/CVE-2026-41506/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-41506
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-41506
- OSV: https://osv.dev/vulnerability/CVE-2026-41506

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-41506/
Summaries are generated and may contain mistakes; the official description above is the record.
