# CVE-2026-33540: Distribution affected by pull-through cache credential exfiltration via www-authenticate bearer realm

> Attackers can exfiltrate upstream registry credentials by manipulating WWW-Authenticate headers in pull-through cache mode.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 6 Apr 2026
- **Updated:** 6 Apr 2026
- **Also known as:** CLEANSTART-2026-NX58071, CLEANSTART-2026-ZI66882, DEBIAN-CVE-2026-33540, GHSA-3p65-76g6-3w7r, GO-2026-5094, MINI-27f3-rp82-prhg, MINI-2c56-9qvf-7468, MINI-72p5-97vg-rmjj, MINI-7r77-9chc-xmm2, MINI-85q4-wx4f-fwh4, MINI-8mqp-39qq-5vc2, MINI-9h82-vw7q-p4xq, MINI-9r22-mqqc-4jgf, MINI-9rfg-4jm2-cr27, MINI-c727-qfmp-55h6, MINI-cx94-m58w-6jcr, MINI-hg6g-vvxq-hqq2, MINI-j98p-wc7p-3c38, MINI-mh8m-whc7-7qwj, MINI-p726-4jgq-662x, MINI-prf8-gfxp-fw6v, MINI-q27f-r864-7rqj, MINI-qcqw-4xvr-9mrf, MINI-r4c3-q3vg-pw2m, MINI-r82v-3q9p-p79x, MINI-r8cm-rf53-5c5p, MINI-r925-pmmq-j99h, MINI-wjpm-hr7g-j3vp, MINI-x42p-4f3v-prm3, MINI-xpr2-jv4g-469q, UBUNTU-CVE-2026-33540

## What is CVE-2026-33540?

CVE-2026-33540 is a high-severity server-side request forgery vulnerability in distribution, published on 6 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Distribution is a toolkit to pack, ship, store, and deliver container content. Prior to 3.1.0, in pull-through cache mode, distribution discovers token auth endpoints by parsing WWW-Authenticate challenges returned by the configured upstream registry. The realm URL from a bearer challenge is used without validating that it matches the upstream registry host. As a result, an attacker-controlled upstream (or an attacker with MitM position to the upstream) can cause distribution to send the configured upstream credentials via basic auth to an attacker-controlled realm URL. This vulnerability is fixed in 3.1.0.

Weakness: CWE-918 (Server-Side Request Forgery)

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

6 open source packages ship an affected version, including github.com/distribution/distribution and github.com/distribution/distribution/v3. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/distribution/distribution` | Go | All versions | None |
| `github.com/distribution/distribution` | Go | All versions to 2.8.3 | None |
| `github.com/distribution/distribution` | Go | All versions to 2.8.3 | None |
| `github.com/distribution/distribution/v3` | Go | All versions | 3.1.0 |
| `github.com/distribution/distribution/v3` | Go | All versions | 3.1.0 |
| `github.com/distribution/distribution/v3` | Go | All versions | 3.1.0 |

Products: Distribution Project Distribution.

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

Upgrade to a fixed version.

## Is CVE-2026-33540 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-33540 exists.

## Fix prompt for AI coding agents

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

What it is: CVE-2026-33540 is a high-severity server-side request forgery vulnerability in distribution, published on 6 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-33540 exists.

Affected packages and fixed versions:
- github.com/distribution/distribution (Go): affected all versions; no fix listed
- github.com/distribution/distribution (Go): affected all versions up to 2.8.3; no fix listed
- github.com/distribution/distribution (Go): affected all versions up to 2.8.3; no fix listed
- github.com/distribution/distribution/v3 (Go): affected all versions; fixed in 3.1.0
- github.com/distribution/distribution/v3 (Go): affected all versions; fixed in 3.1.0
- github.com/distribution/distribution/v3 (Go): affected all versions; fixed in 3.1.0

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-33540/ (Markdown: https://insights.sbomify.com/CVE-2026-33540/index.md)
```

## Sources

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

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