{"id":"CVE-2026-39858","aliases":["CVE-2026-39858","GHSA-5m6w-wvh7-57vm","GO-2026-5149"],"related":[],"kind":"vulnerability","state":"published","title":"Traefik: Forwarded alias spoofing top pre-auth decision bypass","summary":"Traefik is an HTTP reverse proxy and load balancer. Prior to versions 2.11.43, 3.6.14, and 3.7.0-rc.2, there is a high severity authentication bypass vulnerability in Traefik's ForwardAuth and snippet-based authentication middleware. Traefik's forwarded-header sanitization logic targets only canonical header names (e.g., X-Forwarded-Proto) and does not strip or normalize alias variants that use underscores instead of dashes (e.g., X_Forwarded_Proto). These unsanitized alias headers are forwarded intact to the authentication backend. When the backend normalizes underscore and dash header forms equivalently, an attacker can inject spoofed trust context — such as a trusted scheme or host — through the alias headers and bypass authentication on protected routes without valid credentials. This issue has been patched in versions 2.11.43, 3.6.14, and 3.7.0-rc.2.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Traefik is an HTTP reverse proxy and load balancer. Prior to versions 2.11.43, 3.6.14, and 3.7.0-rc.2, there is a high severity authentication bypass vulnerability in Traefik's ForwardAuth and snippet-based authentication middleware. Traefik's forwarded-header sanitization logic targets only canonical header names (e.g., X-Forwarded-Proto) and does not strip or normalize alias variants that use underscores instead of dashes (e.g., X_Forwarded_Proto). These unsanitized alias headers are forwarded intact to the authentication backend. When the backend normalizes underscore and dash header forms equivalently, an attacker can inject spoofed trust context — such as a trusted scheme or host — through the alias headers and bypass authentication on protected routes without valid credentials. This issue has been patched in versions 2.11.43, 3.6.14, and 3.7.0-rc.2.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nThere is a high severity authentication bypass vulnerability in Traefik's `ForwardAuth` and snippet-based authentication middleware. Traefik's forwarded-header sanitization logic targets only canonical header names (e.g., `X-Forwarded-Proto`) and does not strip or normalize alias variants that use underscores instead of dashes (e.g., `X_Forwarded_Proto`). These unsanitized alias headers are forwarded intact to the authentication backend. When the backend normalizes underscore and dash header forms equivalently, an attacker can inject spoofed trust context — such as a trusted scheme or host — through the alias headers and bypass authentication on protected routes without valid credentials.\n\n## Patches\n\n- https://github.com/traefik/traefik/releases/tag/v2.11.43\n- https://github.com/traefik/traefik/releases/tag/v3.6.14\n- https://github.com/traefik/traefik/releases/tag/v3.7.0-rc.2\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<details>\n<summary>Original Description</summary>\n\n### Summary\nAn authentication bypass arises from chaining two bugs: incomplete forwarded-header sanitization at ingress and overly permissive header forwarding in pre-auth subrequests. While canonical `X-Forwarded-*` headers are handled, alias variants (e.g., underscore forms) are neither normalized nor stripped consistently. When downstream auth services normalize these headers, attackers can inject trusted context and bypass authentication on protected routes without credentials.\n\n### Details\nThis issue results from the interaction between forwarded-header handling and auth subrequest construction, creating a trust boundary mismatch.\n\nAt ingress, Traefik defines a fixed set of canonical forwarded headers (`X-Forwarded-Proto`, `X-Forwarded-For`, etc.):\n\nReference : [`pkg/middlewares/forwardedheaders/forwarded_header.go#L29-L36`](https://github.com/traefik/traefik/blob/174e5d81111d8e9fb3d3c81cf6d22f3e33eb4f78/pkg/middlewares/forwardedheaders/forwarded_header.go#L29-L36)\n\n```go\nvar xHeaders = []string{\n\txForwardedProto,\n\txForwardedFor,\n\txForwardedHost,\n\txForwardedPort,\n```\n\nThis logic focuses exclusively on canonical header names and does not account for alias forms such as `X_Forwarded_Proto`. As a result, while standard headers may be sanitized or rewritten, semantically equivalent variants can pass through unchanged.\n\nDuring ForwardAuth processing, request headers are copied wholesale into the auth subrequest:\n\nReference : [`pkg/middlewares/auth/forward.go#L401-L408`](https://github.com/traefik/traefik/blob/174e5d81111d8e9fb3d3c81cf6d22f3e33eb4f78/pkg/middlewares/auth/forward.go#L401-L408)\n\n```go\nutils.CopyHeaders(forwardReq.Header, req.Header)\nRemoveConnectionHeaders(forwardReq)\nutils.RemoveHeaders(forwardReq.Header, hopHeaders...)\n```\n\nThis implementation forwards nearly all client-supplied headers to the auth backend, with filtering limited to hop-by-hop headers. There is no normalization or deduplication between canonical and alias header forms, meaning attacker-controlled headers can reach the auth service intact.\n\nA similar pattern exists in snippet-based auth:\n\nReference : [`pkg/middlewares/ingressnginx/snippet/snippet.go#L574-L581`](https://github.com/traefik/traefik/blob/174e5d81111d8e9fb3d3c81cf6d22f3e33eb4f78/pkg/middlewares/ingressnginx/snippet/snippet.go#L574-L581)\n\n```go\nutils.CopyHeaders(forwardReq.Header, req.Header)\nRemoveConnectionHeaders(forwardReq)\nutils.RemoveHeaders(forwardReq.Header, hopHeaders...)\n```\n\nAgain, headers are forwarded without enforcing a consistent trust model or canonicalization.\n\nThe vulnerability emerges when the auth backend normalizes header names (e.g., treating `X_Forwarded_Proto` and `X-Forwarded-Proto` equivalently). In that case:\n\n- Traefik sanitizes only canonical headers.\n- Alias headers remain attacker-controlled.\n- The auth service merges or evaluates these aliases during normalization.\n- Trust predicates (e.g., scheme = HTTPS, trusted host) are satisfied using spoofed values.\n\nThis allows a single crafted request to simultaneously bypass ingress trust enforcement and satisfy authentication checks, resulting in unauthorized access to protected backends.\n\n### PoC\n\n1. Configure a protected route using ForwardAuth or snippet-based auth, with an auth backend that normalizes header names (underscore ↔ dash).\n2. Send a control request (expected: denied):\n\n```http\nGET / HTTP/1.1\nHost: target.local\nUser-Agent: poc-control\nConnection: close\n```\n\n3. Send an exploit request with alias headers (expected: allowed):\n\n```http\nGET /protected HTTP/1.1\nHost: app.example.local\nX_Forwarded_Proto: https\nX_Forwarded_Host: trusted.example\nConnection: close\n```\n\n### Impact\nThis vulnerability allows unauthenticated attackers to bypass authentication at the proxy-to-auth boundary by injecting spoofed trust context through header aliases. In deployments where authorization decisions depend on forwarded headers, attackers can access protected endpoints and interact with backend services as if they were fully authenticated. This effectively undermines ForwardAuth and similar mechanisms, potentially exposing sensitive internal functionality and data.\n\n### Suggested Remediation\n1. Strip and regenerate both canonical and alias forms of forwarded headers consistently at ingress and during auth subrequests.\n2. Apply a unified normalization policy across all forwarded header families (including RFC7239 and `X-Forwarded-*`).\n3. Restrict which headers are forwarded to auth services (prefer explicit allowlists).\n4. Add regression tests covering alias normalization inconsistencies across common backend frameworks.\n\n</details>\n\n---","format":"markdown","source":"ghsa"},{"lang":"en","text":"Traefik: Pre-authentication decision bypass due to forwarded alias spoofing in github.com/traefik/traefik.\n\nNOTE: The source advisory for this report contains additional versions that could not be automatically mapped to standard Go module versions.\n\n(If this is causing false-positive reports from vulnerability scanners, please suggest an edit to the report.)\n\nThe additional affected modules and versions are: .","format":"markdown","source":"go"},{"lang":"es","text":"Traefik es un proxy inverso HTTP y un balanceador de carga. Antes de las versiones 2.11.43, 3.6.14 y 3.7.0-rc.2, existe una vulnerabilidad de omisión de autenticación de alta gravedad en el middleware de autenticación ForwardAuth y basado en snippets de Traefik. La lógica de saneamiento de encabezados reenviados de Traefik se dirige solo a nombres de encabezado canónicos (por ejemplo, X-Forwarded-Proto) y no elimina ni normaliza variantes de alias que usan guiones bajos en lugar de guiones (por ejemplo, X_Forwarded_Proto). Estos encabezados de alias no saneados se reenvían intactos al backend de autenticación. Cuando el backend normaliza las formas de encabezado con guiones bajos y guiones de manera equivalente, un atacante puede inyectar contexto de confianza falsificado - como un esquema o host de confianza - a través de los encabezados de alias y omitir la autenticación en rutas protegidas sin credenciales válidas. Este problema ha sido parcheado en las versiones 2.11.43, 3.6.14 y 3.7.0-rc.2.","source":"nvd"}],"published":"2026-04-24T16:32:34.000Z","modified":"2026-11-23T20:30:09.020Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N","score":7.8,"rating":"HIGH"},{"scorer":"redhat-SADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N","score":8.2,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","score":10,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","score":10,"rating":"CRITICAL"}],"cwes":["CWE-289","CWE-290","CWE-306"],"affected":[{"ranges":[{"version":"< 2.11.43","status":"affected"},{"version":">= 3.0.0-beta1, < 3.6.14","status":"affected"},{"version":">= 3.7.0-ea.1, < 3.7.0-rc.2","status":"affected"}],"vendor":"traefik","product":"traefik","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"1779786779","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat OpenShift Dev Spaces 3.28","package":"devspaces/traefik-rhel9","cpe":"cpe:/a:redhat:openshift_devspaces:3.28::el9","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"3.7.0-ea.1","status":"affected","fixed":"3.7.0-rc.2"}],"ecosystem":"Go","package":"github.com/traefik/traefik/v3","purl":"pkg:golang/github.com/traefik/traefik/v3","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"3.0.0-beta1","status":"affected","fixed":"3.6.14"}],"ecosystem":"Go","package":"github.com/traefik/traefik/v3","purl":"pkg:golang/github.com/traefik/traefik/v3","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.11.43"}],"ecosystem":"Go","package":"github.com/traefik/traefik/v2","purl":"pkg:golang/github.com/traefik/traefik/v2","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","lastAffected":"1.7.34"}],"ecosystem":"Go","package":"github.com/traefik/traefik","purl":"pkg:golang/github.com/traefik/traefik","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"github.com/traefik/traefik","purl":"pkg:golang/github.com/traefik/traefik","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.11.43"}],"ecosystem":"Go","package":"github.com/traefik/traefik/v2","purl":"pkg:golang/github.com/traefik/traefik/v2","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.6.14"},{"type":"semver","introduced":"3.7.0-ea.1","status":"affected","fixed":"3.7.0-rc.2"}],"ecosystem":"Go","package":"github.com/traefik/traefik/v3","purl":"pkg:golang/github.com/traefik/traefik/v3","source":"go"},{"ranges":[{"status":"affected","fixed":"2.11.43"},{"status":"affected","introduced":"3.0.0","fixed":"3.6.14"},{"status":"affected","version":"3.7.0"},{"status":"affected","version":"3.7.0"},{"status":"affected","version":"3.7.0"},{"status":"affected","version":"3.7.0"}],"vendor":"traefik","product":"traefik","cpe":"cpe:2.3:a:traefik:traefik:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/traefik/traefik/security/advisories/GHSA-5m6w-wvh7-57vm","tags":["advisory","exploit","mitigation","patch","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/traefik/traefik/releases/tag/v2.11.43","tags":["product","release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/traefik/traefik/releases/tag/v3.6.14","tags":["product","release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/traefik/traefik/releases/tag/v3.7.0-rc.2","tags":["product","release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-39858","tags":["vdb-entry","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2464234","tags":["issue-tracking","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-39858.json","tags":["x-sadp-csaf-vex"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:21772","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-39858","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/traefik/traefik","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-05-04T16:57:57.062Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-39858","url":"https://www.cve.org/CVERecord?id=CVE-2026-39858","licence":"CVE Terms of Use","modified":"2026-07-15T01:01:48.271Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-5m6w-wvh7-57vm","url":"https://github.com/advisories/GHSA-5m6w-wvh7-57vm","licence":"CC-BY-4.0","modified":"2026-06-25T18:56:35.695Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5149","url":"https://pkg.go.dev/vuln/GO-2026-5149","licence":"CC-BY-4.0","modified":"2026-11-23T20:30:09.020Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-39858","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-39858","licence":"Public domain","modified":"2026-11-11T21:10:00.200Z"}],"updatedAt":"2026-11-25T22:59:20.302Z","epss":{"score":0.00597,"percentile":0.49926,"date":"2026-12-01T12:00:22.000Z"}}