Skip to main content

CVE-2026-33433 — Vulnerability in traefik/traefik/v3 — CVE Details

MEDIUM

Traefik Vulnerable to BasicAuth/DigestAuth Identity Spoofing via Non-Canonical headerField

Published March 27, 2026Updated November 4, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.66%). Schedule for your next planned update.

Does your project use an affected github.com/traefik/traefik/v3 version?

Paste your go.sum to check it for CVE-2026-33433 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my go.sum

Summary

Summary

There is a potential vulnerability in Traefik's Basic and Digest authentication middlewares when headerField is configured with a non-canonical HTTP header name.

An authenticated attacker with valid credentials can inject the canonical version of the configured header to impersonate any identity to the backend. Because Traefik writes the authenticated username using a non-canonical map key, it creates a separate header entry rather than overwriting the attacker's canonical one — causing most backend frameworks to read the attacker-controlled value instead.

Patches

For more information

If there are any questions or comments about this advisory, please open an issue.


Summary

When headerField is configured with a non-canonical HTTP header name (e.g., x-auth-user instead of X-Auth-User), an authenticated attacker can inject a canonical version of that header to impersonate any identity to the backend. The backend receives two header entries — the attacker-injected canonical one is read first, overriding Traefik's non-canonical write.

Tested on Traefik v3.6.10.

Details

At pkg/middlewares/auth/basic_auth.go:92, the authenticated username is written using direct map assignment:

req.Header[b.headerField] = []string{user}

Go's http.Header map is keyed by canonical names (e.g., X-Auth-User). Direct assignment with a non-canonical key (x-auth-user) creates a separate map entry from any canonical-key entry already present. The attacker's X-Auth-User: superadmin occupies the canonical slot and is never overwritten by Traefik's non-canonical write.

The same bug exists in pkg/middlewares/auth/digest_auth.go:100. Notably, forward.go:254 correctly uses http.CanonicalHeaderKey(), showing the fix pattern already exists in the codebase.

PoC

Traefik config (YAML, Docker labels, or REST API):

middlewares:
  auth:
    basicAuth:
      users: ["admin:$2y$05$..."]
      headerField: "x-auth-user"

Normal request (baseline):

curl -u admin:admin http://traefik/secure/test
# Backend receives: x-auth-user: admin
# Identity = admin ✓

Attack request:

curl -u admin:admin -H "X-Auth-User: superadmin" http://traefik/secure/test
# Backend receives BOTH headers:
#   X-Auth-User: superadmin   ← attacker-injected (canonical key, read first by most frameworks)
#   x-auth-user: admin        ← Traefik-set (non-canonical, ignored by most frameworks)
# Identity seen by backend = superadmin ✗

Control test — when headerField uses canonical casing (X-Auth-User), the attack fails. Traefik's write correctly overwrites the attacker's header.

This is realistic because YAML conventions favor lowercase keys, Traefik docs don't warn about canonicalization, and the pattern of backends trusting the headerField header is recommended in Traefik's own documentation.

Fix suggestion:

// basic_auth.go:92 and digest_auth.go:100 — change:
req.Header[b.headerField] = []string{user}
// to:
req.Header.Set(b.headerField, user)

Also strip any incoming headerField header before the auth check with req.Header.Del(b.headerField).

Impact

An authenticated attacker with valid credentials (even low-privilege) can impersonate any other user identity to backend services. If backends use the headerField header for authorization decisions (which is the intended use case per Traefik docs), this enables privilege escalation — e.g., a regular user impersonating an admin.

The attack requires the operator to configure headerField with a non-canonical header name, which is the natural thing to do in YAML and is not warned against in documentation.

Advisory Timeline

  • First published March 27, 2026 (244 days ago).
  • Last revised November 4, 2026 — 221 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Go
Update github.com/traefik/traefik/v3 to 3.6.12 or later
go get github.com/traefik/traefik/v3@v3.6.12
Go
Update github.com/traefik/traefik/v3 to 3.7.0-ea.3 or later
go get github.com/traefik/traefik/v3@v3.7.0-ea.3
Go
Update github.com/traefik/traefik/v2 to 2.11.42 or later
go get github.com/traefik/traefik/v2@v2.11.42

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (3)

Affects 1 ecosystem: Go (2).

PackageFixed In
github.com/traefik/traefik/v3 Go · Affected: All versions3.6.12
github.com/traefik/traefik/v3 Go · Affected: All versions3.7.0-ea.3
github.com/traefik/traefik/v2 Go · Affected: All versions2.11.42

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 8.8 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Frequently Asked Questions

What is CVE-2026-33433?
Traefik Vulnerable to BasicAuth/DigestAuth Identity Spoofing via Non-Canonical headerField. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 8.8/10).
How do I check if my project is affected by CVE-2026-33433?
CVE-2026-33433 affects github.com/traefik/traefik/v3 and github.com/traefik/traefik/v2. It has a 0.7% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-33433 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
8.8

Significant impact if exploited, or exploitable with modest effort.

EPSS Score (30-day exploit probability)
0.66%
EPSS percentile: 46.2

This is a below-median EPSS score — only 46.2% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.

Also Known As

GHSA-qr99-7898-vr7c
GO-2026-4893

Related CVEs

  • CVE-2026-71324
    HIGH

    Traefik: Cross-user response poisoning via proxied CONNECT on Traefik's shared backend keep-alive pool

  • CVE-2026-39858
    HIGH

    Traefik: Pre-authentication decision bypass due to forwarded alias spoofing

  • CVE-2026-48491
    HIGH

    Traefik: SNICheck ignores wildcard TLSOptions mappings, allowing domain-fronted mTLS bypass

  • CVE-2026-35051
    HIGH

    Traefik's ForwardAuth trustForwardHeader=false allows spoofed X-Forwarded-Prefix to bypass authentication

  • CVE-2026-40912
    HIGH

    Traefik has an StripPrefixRegex Middleware Authorization Bypass via Path/RawPath Desync

  • CVE-2025-32431
    HIGH

    Traefik has a possible vulnerability with its path matchers

  • CVE-2026-53622
    HIGH

    Traefik: HTTP/3 mTLS bypass via exact SNI TLSOptions lookup for wildcard and mixed-case hosts

  • CVE-2026-44774
    MEDIUM

    Traefik: Gateway API TraefikService backend accepts rest@internal, allowing unauthorized exposure of the REST provider despite providers.rest.insecure=false

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my go.sum