{"id":"CVE-2026-41174","aliases":["CVE-2026-41174","GHSA-xhjw-95fp-8vgq","GO-2026-5760"],"related":[],"kind":"vulnerability","state":"published","title":"Traefik Kubernetes CRD allows unauthorized cross-namespace middleware binding","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 potential vulnerability in Traefik's Kubernetes CRD provider cross-namespace isolation enforcement. When providers.kubernetesCRD.allowCrossNamespace=false, Traefik correctly rejects direct cross-namespace middleware references from IngressRoute objects, but fails to apply the same restriction to middleware references nested inside a Chain middleware's spec.chain.middlewares[]. An actor with permission to create or update Traefik CRDs in their own namespace can exploit this to cause Traefik to resolve and apply middleware objects from another namespace, bypassing the documented isolation boundary. 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 potential vulnerability in Traefik's Kubernetes CRD provider cross-namespace isolation enforcement. When providers.kubernetesCRD.allowCrossNamespace=false, Traefik correctly rejects direct cross-namespace middleware references from IngressRoute objects, but fails to apply the same restriction to middleware references nested inside a Chain middleware's spec.chain.middlewares[]. An actor with permission to create or update Traefik CRDs in their own namespace can exploit this to cause Traefik to resolve and apply middleware objects from another namespace, bypassing the documented isolation boundary. 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 vulnerability in Traefik's Kubernetes CRD provider cross-namespace isolation enforcement.\n\nWhen `providers.kubernetesCRD.allowCrossNamespace=false`, Traefik correctly rejects direct cross-namespace middleware references from `IngressRoute` objects, but fails to apply the same restriction to middleware references nested inside a `Chain` middleware's `spec.chain.middlewares[]`. An actor with permission to create or update Traefik CRDs in their own namespace can exploit this to cause Traefik to resolve and apply middleware objects from another namespace, bypassing the documented isolation boundary.\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\nWhen `providers.kubernetesCRD.allowCrossNamespace=false`, Traefik still allows a namespace-local `Middleware` of type `Chain` to reference middleware objects from another namespace via `spec.chain.middlewares[].namespace`.\n\nThis bypasses the documented cross-namespace restriction and allows an actor with permission to create or update Traefik CRDs in namespace A to bind middleware defined in namespace B to routes in namespace A.\n\n### Details\nTraefik documents `allowCrossNamespace` as the control that governs whether `IngressRoute` objects may reference resources in other namespaces.\n\nDirect middleware references from `IngressRoute.routes[].middlewares[]` are validated in `pkg/provider/kubernetes/crd/kubernetes_http.go` by `makeMiddlewareKeys(...)`, which rejects cross-namespace references when `allowCrossNamespace` is disabled.\n\nHowever, nested middleware references inside `Middleware.spec.chain.middlewares[]` follow a different code path. `createChainMiddleware(...)` in `pkg/provider/kubernetes/crd/kubernetes.go` does not receive or enforce `allowCrossNamespace`; it resolves `mi.Namespace` (or defaults to the current namespace) and appends `makeID(ns, mi.Name)` unconditionally.\n\nAt runtime, `pkg/server/middleware/middlewares.go` qualifies and builds `config.Chain.Middlewares`, so the cross-namespace middleware is actually loaded and used.\n\nThis was verified on the current `master` at commit `786f7192e11878dfaa634f8263bf79bb730a71cb`.\n\nThis appears related to earlier cross-namespace hardening work, but the surviving issue is a distinct nested `Chain` middleware code path rather than the already-guarded direct reference path.\n\n### Expected behavior\nWhen `providers.kubernetesCRD.allowCrossNamespace=false`, any middleware reference that resolves to an object in another namespace should be rejected, whether referenced directly from an `IngressRoute` or indirectly through a local `Chain` middleware.\n\n### Actual behavior\nA namespace-local `Chain` middleware can reference `spec.chain.middlewares[].namespace` in another namespace, and Traefik resolves and applies that middleware even when cross-namespace references are disabled.\n\n### Attacker prerequisites\nThe attacker must have permission to create or update Traefik CRDs in a namespace they control, but does not need permission to modify resources in the target namespace.\n\n### PoC\n1. Run Traefik with the Kubernetes CRD provider and set `allowCrossNamespace: false`.\n\n2. Create two namespaces, for example `default` and `cross-ns`.\n\n3. Apply a middleware in `cross-ns`:\n\n```yaml\napiVersion: traefik.io/v1alpha1\nkind: Middleware\nmetadata:\n  name: victim-strip\n  namespace: cross-ns\nspec:\n  stripPrefix:\n    prefixes:\n      - /secret\n```\n\n4. Apply a chain middleware in `default` that references the middleware above:\n\n```yaml\napiVersion: traefik.io/v1alpha1\nkind: Middleware\nmetadata:\n  name: mychain\n  namespace: default\nspec:\n  chain:\n    middlewares:\n      - name: victim-strip\n        namespace: cross-ns\n```\n\n5. Apply an `IngressRoute` in `default` that references only the local `mychain` middleware:\n\n```yaml\napiVersion: traefik.io/v1alpha1\nkind: IngressRoute\nmetadata:\n  name: demo\n  namespace: default\nspec:\n  entryPoints:\n    - web\n  routes:\n    - match: Host(`example.test`) && PathPrefix(`/demo`)\n      kind: Rule\n      middlewares:\n        - name: mychain\n      services:\n        - name: whoami\n          port: 80\n```\n\n6. Observe that Traefik accepts the configuration and resolves the resulting chain to the middleware from `cross-ns` even though `allowCrossNamespace` is disabled.\n\n7. As a control, replace the local chain reference in the `IngressRoute` with a direct cross-namespace middleware reference. That direct reference is rejected when `allowCrossNamespace=false`, which indicates the bypass is specific to nested `Chain` middleware resolution.\n\n### Impact\n\nThis is an authorization / trust-boundary bypass in Traefik's Kubernetes CRD provider.\n\nClusters that rely on providers.kubernetesCRD.allowCrossNamespace=false for namespace isolation are affected. An actor who is allowed to create or update Traefik CRDs in their own namespace can still cause Traefik to apply middleware from another namespace by referencing it indirectly through a local Chain middleware.\n\nThe practical impact depends on which middleware objects exist in the other namespace, but this can allow unauthorized reuse of security-sensitive or policy-bearing middleware across namespace boundaries. Examples include request modification, header manipulation, authentication or forward-auth related behavior, and other traffic-handling policies that were intended to remain namespace-scoped.\n\nTesters have not verified unauthenticated remote compromise, code execution, or universal cross-tenant data exposure. The core issue is that a documented isolation control can be bypassed through the nested Chain middleware reference path.\n\n</details>","format":"markdown","source":"ghsa"},{"lang":"en","text":"Traefik Kubernetes CRD allows unauthorized cross-namespace middleware binding 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 equilibrador de carga. Antes de las versiones 2.11.43, 3.6.14 y 3.7.0-rc.2, existe una potencial vulnerabilidad en la aplicación del aislamiento entre espacios de nombres del proveedor CRD de Kubernetes de Traefik. Cuando providers.kubernetesCRD.allowCrossNamespace=false, Traefik rechaza correctamente las referencias directas de middleware entre espacios de nombres de los objetos IngressRoute, pero no aplica la misma restricción a las referencias de middleware anidadas dentro de spec.chain.middlewares[] de un middleware Chain. Un actor con permiso para crear o actualizar CRD de Traefik en su propio espacio de nombres puede exploit esto para hacer que Traefik resuelva y aplique objetos middleware de otro espacio de nombres, eludiendo el límite de aislamiento documentado. 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-24T20:12:10.000Z","modified":"2026-11-23T20:30:09.559Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","score":4.8,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","score":4.8,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N","score":6.4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N","score":6.4,"rating":"MEDIUM"}],"cwes":["CWE-653","CWE-863"],"affected":[{"ranges":[{"version":"< 2.11.43","status":"affected"},{"version":">= 3.7.0-ea.1, < 3.7.0-rc.2","status":"affected"}],"vendor":"traefik","product":"traefik","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-xhjw-95fp-8vgq","tags":["advisory","exploit","patch","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/traefik/traefik/commit/df00d82fc7f12e07199551832b54de6d0e55414d","tags":["fix","patch","web","x-refsource-misc"],"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://nvd.nist.gov/vuln/detail/CVE-2026-41174","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":"no","technicalImpact":"partial","date":"2026-05-04T13:25:25.541Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-41174","url":"https://www.cve.org/CVERecord?id=CVE-2026-41174","licence":"CVE Terms of Use","modified":"2026-05-04T13:26:08.289Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-xhjw-95fp-8vgq","url":"https://github.com/advisories/GHSA-xhjw-95fp-8vgq","licence":"CC-BY-4.0","modified":"2026-06-25T23:11:34.624Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5760","url":"https://pkg.go.dev/vuln/GO-2026-5760","licence":"CC-BY-4.0","modified":"2026-11-23T20:30:09.559Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-41174","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-41174","licence":"Public domain","modified":"2026-11-11T21:10:00.200Z"}],"updatedAt":"2026-11-25T22:59:20.308Z","epss":{"score":0.00258,"percentile":0.18687,"date":"2026-12-01T12:00:22.000Z"}}