CVE-2026-33433: Github.com/traefik/traefik/v2 Traefik Vulnerable To BasicAuth/DigestAuth Identity Vulnerability
MODERATECVE-2026-33433 is a MODERATE traefik vulnerable to basicauth/digestauth identity vulnerability (CWE-290: Authentication Bypass by Spoofing) affecting Github.com/traefik/traefik/v2 libraries in the Go ecosystem. The issue involves traefik vulnerable to basicauth/digestauth identity spoofing via non-canonical headerfield. Remediation is available by upgrading affected packages to version 2.11.42, 3.6.12, 3.7.0-ea.3.
CVE-2026-33433 at a Glance
How to Fix CVE-2026-33433
To remediate this vulnerability, upgrade all affected Github.com/traefik/traefik/v2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/traefik/traefik/v2 to 2.11.42
Upgrade github.com/traefik/traefik/v3 to 3.6.12
Upgrade github.com/traefik/traefik/v3 to 3.7.0-ea.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/traefik/traefik/v2
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-33433, inspect your project dependencies for Github.com/traefik/traefik/v2:
inspect dependencies for github.com/traefik/traefik/v2
Analyze the terminal output to locate any version of Github.com/traefik/traefik/v2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.11.42), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-290: Authentication Bypass by Spoofing, where this attack-focused weakness is caused by incorrectly implemented authentication schemes that are subject to spoofing attacks. In Github.com/traefik/traefik/v2, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-33433 Affected Github.com/traefik/traefik/v2 Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/traefik/traefik/v2
|
Go |
< 2.11.42
|
2.11.42
|
|
github.com/traefik/traefik/v3
|
Go |
≥ 3.0.0-beta1
< 3.6.12
|
3.6.12
|
|
github.com/traefik/traefik/v3
|
Go |
≥ 3.7.0-ea.1
< 3.7.0-ea.3
|
3.7.0-ea.3
|
References
Frequently Asked Questions
What is CVE-2026-33433?
Which Github.com/traefik/traefik/v2 versions are affected?
What version fixes CVE-2026-33433?
Is github.com/traefik/traefik/v2 affected?
Is github.com/traefik/traefik/v3 affected?
What CWE is associated with CVE-2026-33433?
How can I check Go dependencies for CVE-2026-33433?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-qr99-7898-vr7c",
"modified" : "2026-03-27T20:35:53Z",
"published" : "2026-03-27T20:35:53Z",
"aliases" : [ "CVE-2026-33433" ],
"summary" : "Traefik Vulnerable to BasicAuth/DigestAuth Identity Spoofing via Non-Canonical headerField",
"details" : "## Summary\n\nThere is a potential vulnerability in Traefik's Basic and Digest authentication middlewares when `headerField` is configured with a non-canonical HTTP header name.\n\nAn 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.\n\n## Patches\n\n- <https://github.com/traefik/traefik/releases/tag/v2.11.42>\n- <https://github.com/traefik/traefik/releases/tag/v3.6.12>\n- <https://github.com/traefik/traefik/releases/tag/v3.7.0-ea.3>\n\n## For more information\n\nIf there are any questions or comments about this advisory, please [open an issue](https://github.com/traefik/traefik/issues).\n\n---\n\n<details>\n<summary>Original Description</summary>\n\n### Summary\n\nWhen `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.\n\nTested on Traefik v3.6.10.\n\n### Details\n\nAt `pkg/middlewares/auth/basic_auth.go:92`, the authenticated username is written using direct map assignment:\n\n```go\nreq.Header[b.headerField] = []string{user}\n```\n\nGo'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.\n\nThe 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.\n\n### PoC\n\n**Traefik config (YAML, Docker labels, or REST API):**\n\n```yaml\nmiddlewares:\n auth:\n basicAuth:\n users: [\"admin:$2y$05$...\"]\n headerField: \"x-auth-user\"\n```\n\n**Normal request (baseline):**\n\n```bash\ncurl -u admin:admin http://traefik/secure/test\n# Backend receives: x-auth-user: admin\n# Identity = admin ✓\n```\n\n**Attack request:**\n\n```bash\ncurl -u admin:admin -H \"X-Auth-User: superadmin\" http://traefik/secure/test\n# Backend receives BOTH headers:\n# X-Auth-User: superadmin ← attacker-injected (canonical key, read first by most frameworks)\n# x-auth-user: admin ← Traefik-set (non-canonical, ignored by most frameworks)\n# Identity seen by backend = superadmin ✗\n```\n\n**Control test** — when `headerField` uses canonical casing (`X-Auth-User`), the attack fails. Traefik's write correctly overwrites the attacker's header.\n\nThis 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.\n\n**Fix suggestion:**\n\n```go\n// basic_auth.go:92 and digest_auth.go:100 — change:\nreq.Header[b.headerField] = []string{user}\n// to:\nreq.Header.Set(b.headerField, user)\n```\n\nAlso strip any incoming `headerField` header before the auth check with `req.Header.Del(b.headerField)`.\n\n### Impact\n\nAn 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.\n\nThe 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.\n\n</details>",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:H/AT:P/PR:H/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/traefik/traefik/v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.11.42"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/traefik/traefik/v3"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0-beta1"
}, {
"fixed" : "3.6.12"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "< 3.6.11"
}
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/traefik/traefik/v3"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.7.0-ea.1"
}, {
"fixed" : "3.7.0-ea.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/traefik/traefik/security/advisories/GHSA-qr99-7898-vr7c"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-33433"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/traefik/traefik"
}, {
"type" : "WEB",
"url" : "https://github.com/traefik/traefik/releases/tag/v2.11.42"
}, {
"type" : "WEB",
"url" : "https://github.com/traefik/traefik/releases/tag/v3.6.11"
}, {
"type" : "WEB",
"url" : "https://github.com/traefik/traefik/releases/tag/v3.7.0-ea.3"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-290" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-27T20:35:53Z",
"nvd_published_at" : "2026-03-27T15:16:54Z"
}
}