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.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
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
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 | 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 include Distribution Project Distribution.
How do I fix CVE-2026-33540?
Upgrade to a fixed version.
Upgrade, and send outbound requests through an allow-list that blocks internal addresses. More about Server-side request forgery.
Is CVE-2026-33540 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-33540 exists.
Sources
Also known as CLEANSTART-2026-NX58071, CLEANSTART-2026-ZI66882, DEBIAN-CVE-2026-33540, GHSA-3p65-76g6-3w7r, GO-2026-5094, MINI-27f3-rp82-prhg and 25 more.