{"id":"DHI-aebq-pbbl-qbee-davj","summary":"## Summary","details":"## Summary\n\nThere is a medium severity vulnerability in Traefik's Kubernetes CRD provider. When `providers.kubernetesCRD.allowCrossNamespace` is disabled — the default — cross-namespace `@kubernetescrd` references are rejected for middlewares, TLS options and HTTP/TCP ServersTransports, but the same restriction was not applied to `TraefikService` backend references resolved by the service resolver. A tenant confined by RBAC to a single namespace can therefore bind its own router to a `TraefikService` owned by another namespace and expose or reroute that namespace's backend, defeating the namespace isolation `allowCrossNamespace=false` is meant to enforce. Traefik v2 releases and the unmaintained v3 minor lines below v3.6 are affected and will not receive a patch on their own line; the remedy for those users is upgrading to a maintained, patched release.\n\n## Patches\n\n- https://github.com/traefik/traefik/releases/tag/v2.11.54\n- https://github.com/traefik/traefik/releases/tag/v3.6.25\n- https://github.com/traefik/traefik/releases/tag/v3.7.10\n\n## For more information\n\nIf you have any questions or comments about this advisory, please [open an issue](https://github.com/traefik/traefik/issues).\n\n\u003cdetails\u003e\n\u003csummary\u003eOriginal Description\u003c/summary\u003e\n\n### Summary\r\nWhen `providers.kubernetesCRD.allowCrossNamespace=false` (the default), Traefik correctly rejects cross-namespace `@kubernetescrd` references for middlewares, TLS options, and HTTP/TCP `ServersTransport`, but it does not apply the same restriction to service (`TraefikService`) backendRefs. As a result, a Kubernetes tenant who is confined by RBAC to their own namespace can bind their own router to a `TraefikService` owned by another namespace simply by referencing it as `\u003cvictim-namespace\u003e-\u003cname\u003e@kubernetescrd`, defeating the namespace-isolation boundary that `allowCrossNamespace=false` is meant to enforce.\r\n\r\nThis is the service-resolver sibling of the cross-namespace isolation family that Traefik has been fixing one resolver at a time (`df00d82f` / CVE-2026-41174 for Chain middlewares, and `67501cbe` for TCP `ServersTransport`, which shipped in v3.7.7 only four days before the analyzed commit). The `TraefikService` resolver in `configBuilder.nameAndService` was never given the guard its sibling resolvers received.\r\n\r\n### Details\r\n### Root cause\r\n\r\n`nameAndService` only performs the same-namespace check (`isNamespaceAllowed`) inside the branch that handles names without an `@` separator. For names that contain an `@` separator (that is, `@kubernetescrd` cross-namespace references) it applies only the `crossProviderNamespaces` allowlist check, and that check returns `true` by default because a `nil` allowlist means \"unrestricted\". It never applies the `!allowCrossNamespace && strings.HasSuffix(name, \"@kubernetescrd\")` rejection that the sibling resolvers all apply, so `allowCrossNamespace=false` is effectively never consulted for `@kubernetescrd` service references.\r\n\r\n### Vulnerable code\r\n\r\n```go\r\n// pkg/provider/kubernetes/crd/kubernetes_http.go:662-695 — nameAndService (VULNERABLE)\r\nfunc (c configBuilder) nameAndService(ctx context.Context, parentNamespace string, service traefikv1alpha1.LoadBalancerSpec) (string, *dynamic.Service, error) {\r\n\tsvcCtx := log.Ctx(ctx).With().Str(logs.ServiceName, service.Name).Logger().WithContext(ctx)\r\n\r\n\tif !strings.Contains(service.Name, providerNamespaceSeparator) { // 665: only names WITHOUT \"@\"\r\n\t\tservice = *service.DeepCopy()\r\n\t\tservice.Namespace = namespaceOrParentNamespace(service.Namespace, parentNamespace)\r\n\t\tif !isNamespaceAllowed(c.allowCrossNamespace, parentNamespace, service.Namespace) { // 669\r\n\t\t\treturn \"\", nil, fmt.Errorf(\"service %s/%s not in the parent resource namespace %s\", ...)\r\n\t\t}\r\n\t}\r\n\r\n\t// 674: for \"@\"-names, the ONLY gate is crossProviderNamespaces, which defaults to allow-all (nil).\r\n\tif !isCrossProviderNamespaceAllowed(c.crossProviderNamespaces, parentNamespace) && strings.Contains(service.Name, providerNamespaceSeparator) {\r\n\t\treturn \"\", nil, fmt.Errorf(\"service %q reference is not allowed: ...\", service.Name)\r\n\t}\r\n\t// ^-- MISSING: no `!c.allowCrossNamespace && strings.HasSuffix(service.Name, \"@\"+ProviderName)` rejection.\r\n\r\n\tswitch service.Kind {\r\n\tcase \"TraefikService\":\r\n\t\treturn fullServiceName(svcCtx, service, intstr.FromInt(0)), nil, nil // 690: returns the cross-namespace reference\r\n\t...\r\n\t}\r\n}\r\n```\r\n\r\nFor comparison, the sibling resolver used for middleware and TLS references does carry the guard:\r\n\r\n```go\r\n// pkg/provider/kubernetes/crd/kubernetes.go:1653-1668 — resolveReference (CORRECT)\r\nfunc resolveReference(ctx context.Context, parentNs, ns, name string, crossProviderNamespaces []string, allowCrossNamespace bool) (string, error) {\r\n\tif strings.Contains(name, providerNamespaceSeparator) {\r\n\t\tif !allowCrossNamespace && strings.HasSuffix(name, providerNamespaceSeparator+ProviderName) {\r\n\t\t\treturn \"\", errors.New(\"when allowCrossNamespace is disabled, @kubernetescrd references are disallowed\") // 1656 — THE GUARD\r\n\t\t}\r\n\t\t...\r\n\t}\r\n\t...\r\n}\r\n```\r\n\r\nThe same guard is also present at `pkg/provider/kubernetes/crd/kubernetes_http.go:500` (`makeServersTransportKey`, HTTP) and `pkg/provider/kubernetes/crd/kubernetes_tcp.go:316` (`makeTCPServersTransportKey`, TCP, added by commit `67501cbe`). Only the service resolver `nameAndService` lacks it.\r\n\r\n### Data flow\r\n\r\nAn `IngressRoute` created by a tenant in namespace `attacker` declares a route service `{ name: \"victim-backend@kubernetescrd\", kind: TraefikService }`; the tenant controls this reference string. In `nameAndService`, because the name contains `@`, the same-namespace check at line 669 is skipped, and `isCrossProviderNamespaceAllowed(nil, \"attacker\")` returns `true` under the default `nil` allowlist, so no rejection fires. `fullServiceName` then resolves the reference to the victim namespace's `TraefikService`, and the attacker's HTTP router is generated and bound to the victim's backend. At runtime the attacker's `Host(...)` route forwards to namespace `victim`'s backend pods.\r\n\r\n### Default reachability\r\n\r\n`AllowCrossNamespace` defaults to `false` (`pkg/provider/kubernetes/crd/kubernetes.go:57`, never set to `true` by any `SetDefaults`), so the isolation this bug bypasses is on by default. `CrossProviderNamespaces` defaults to `nil`, and `isCrossProviderNamespaceAllowed` returns `true` for a `nil` allowlist (`pkg/provider/kubernetes/crd/kubernetes.go:1645-1651`), so the only check `nameAndService` applies to an `@`-name is inert by default. The attacker needs only namespace-scoped RBAC to create an `IngressRoute` or `TraefikService` in their own namespace (the standard hard-multi-tenant Traefik setup) and knowledge of the target `TraefikService`'s namespace and name.\r\n\r\n### PoC\r\nA table-style harness was added to the CRD provider package. It defines a victim `TraefikService` (`backend` in namespace `victim`, backed by a real endpoint) and an attacker `IngressRoute` (namespace `attacker`) that references it via `victim-backend@kubernetescrd`, plus a control route that references a victim `Middleware` via `victim-mw@kubernetescrd`. The control route is given a valid local service so that the only reason it could be dropped is the cross-namespace middleware guard. The provider is run with `AllowCrossNamespace: false` and `CrossProviderNamespaces: nil` (both defaults).\r\n\r\n```\r\n$ go test -run TestPoC_CrossNamespaceServiceBypass ./pkg/provider/kubernetes/crd/ -v\r\n\r\nHTTP routers:  [attacker-attacker-svc-route-7df4381938699bd21215]\r\nHTTP services: [victim-whoami-victim-80 victim-backend]\r\nCONTROL OK: cross-ns MIDDLEWARE ref (victim-mw@kubernetescrd) rejected -\u003e router dropped\r\nBYPASS CONFIRMED: attacker router bound to cross-ns service \"victim-backend\" despite AllowCrossNamespace=false\r\n```\r\n\r\nThe control route (middleware reference) is dropped even though it has a valid local service, confirming that the isolation control is active for middlewares; the service route survives and its `Service` field resolves to `victim-backend`, with the victim's services pulled into the generated configuration and reachable through the attacker's router.\r\n\r\nThe harness also runs two corroborating cases. With `AllowCrossNamespace=false` and `CrossProviderNamespaces=[\"someotherns\"]` (an allowlist that excludes the attacker), the service reference is blocked, which proves that the only gate ever applied to an `@kubernetescrd` service name is `crossProviderNamespaces` (inert by default) and that `allowCrossNamespace=false` is never consulted. With `AllowCrossNamespace=true`, both the service and middleware references are accepted, as expected when isolation is intentionally disabled.\r\n\r\n### Impact\r\nIn a multi-tenant cluster relying on `allowCrossNamespace=false` for namespace isolation, a tenant confined to their own namespace can attach their own router (their own `Host` rule and entrypoint) to another tenant's `TraefikService` backend, exposing an otherwise internal-only service on the data plane under the attacker's hostname, and can route or mirror traffic to another namespace's backend that they should not be able to reference.\r\n\n\n\u003c/details\u003e","modified":"2026-11-16T02:34:42.740558975Z","published":"2026-11-11T23:20:44Z","upstream":["CVE-2026-71325"],"references":[{"type":"ADVISORY","url":"https://scout.docker.com/v/DHI-aebq-pbbl-qbee-davj"},{"type":"ADVISORY","url":"https://github.com/traefik/traefik/security/advisories/GHSA-62fc-8686-hfmq"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-62fc-8686-hfmq"},{"type":"FIX","url":"https://github.com/traefik/traefik/commit/65ebf4b47fbdc33e3856803a5844a404e094d52d"},{"type":"WEB","url":"https://github.com/traefik/traefik/releases/tag/v3.7.10"},{"type":"WEB","url":"https://github.com/traefik/traefik/releases/tag/v3.6.25"},{"type":"WEB","url":"https://github.com/traefik/traefik/releases/tag/v2.11.54"},{"type":"ADVISORY","url":"https://pkg.go.dev/vuln/GO-2026-6203"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-71325"}],"affected":[{"package":{"name":"traefik-3.6-dev","ecosystem":"Docker Hardened Images:Alpine:3.23","purl":"pkg:apk/dhi/traefik-3.6-dev"},"versions":["3.6.21-r1","3.6.22-r0","3.6.22-r1","3.6.22-r2","3.6.24-r0","3.6.25-r0","3.6.25-r2","3.6.25-r3","3.6.25-r4","3.6.25-r5","3.6.25-r6","3.6.25-r7","3.6.25-r8","3.6.25-r9"],"database_specific":{"owner_kind":"HSP","source":"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-aebq-pbbl-qbee-davj.json"}},{"package":{"name":"traefik-3.6-fips-dev","ecosystem":"Docker Hardened Images:Alpine:3.23","purl":"pkg:apk/dhi/traefik-3.6-fips-dev"},"versions":["3.6.21-r1","3.6.22-r0","3.6.22-r1","3.6.22-r2","3.6.24-r0","3.6.25-r0","3.6.25-r2","3.6.25-r3","3.6.25-r4","3.6.25-r5","3.6.25-r6","3.6.25-r7","3.6.25-r8","3.6.25-r9"],"database_specific":{"source":"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-aebq-pbbl-qbee-davj.json","owner_kind":"HSP"}},{"package":{"name":"traefik-3.6-fips","ecosystem":"Docker Hardened Images:Alpine:3.23","purl":"pkg:apk/dhi/traefik-3.6-fips"},"versions":["3.6.21-r1","3.6.22-r0","3.6.22-r1","3.6.22-r2","3.6.24-r0","3.6.25-r0","3.6.25-r2","3.6.25-r3","3.6.25-r4","3.6.25-r5","3.6.25-r6","3.6.25-r7","3.6.25-r8","3.6.25-r9"],"database_specific":{"owner_kind":"HSP","source":"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-aebq-pbbl-qbee-davj.json"}},{"package":{"name":"traefik-3.6","ecosystem":"Docker Hardened Images:Alpine:3.23","purl":"pkg:apk/dhi/traefik-3.6"},"versions":["3.6.21-r1","3.6.22-r0","3.6.22-r1","3.6.22-r2","3.6.24-r0","3.6.25-r0","3.6.25-r2","3.6.25-r3","3.6.25-r4","3.6.25-r5","3.6.25-r6","3.6.25-r7","3.6.25-r8","3.6.25-r9"],"database_specific":{"owner_kind":"HSP","source":"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-aebq-pbbl-qbee-davj.json"}},{"package":{"name":"traefik-3.7-dev","ecosystem":"Docker Hardened Images:Alpine:3.23","purl":"pkg:apk/dhi/traefik-3.7-dev"},"versions":["3.7.10-r0","3.7.10-r2","3.7.11-r0","3.7.11-r1","3.7.11-r2","3.7.12-r0","3.7.12-r1","3.7.13-r0","3.7.13-r1","3.7.13-r2","3.7.14-r0","3.7.14-r1","3.7.15-r0","3.7.16-r0","3.7.16-r1","3.7.16-r2","3.7.17-r0","3.7.18-r0","3.7.18-r1","3.7.18-r2","3.7.19-r0","3.7.5-r1","3.7.6-r0","3.7.6-r1","3.7.6-r2","3.7.9-r0"],"database_specific":{"owner_kind":"HSP","source":"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-aebq-pbbl-qbee-davj.json"}},{"package":{"name":"traefik-3.7-fips-dev","ecosystem":"Docker Hardened Images:Alpine:3.23","purl":"pkg:apk/dhi/traefik-3.7-fips-dev"},"versions":["3.7.10-r0","3.7.10-r2","3.7.11-r0","3.7.11-r1","3.7.11-r2","3.7.12-r0","3.7.12-r1","3.7.13-r0","3.7.13-r1","3.7.13-r2","3.7.14-r0","3.7.14-r1","3.7.15-r0","3.7.16-r0","3.7.16-r1","3.7.16-r2","3.7.17-r0","3.7.18-r0","3.7.18-r1","3.7.18-r2","3.7.19-r0","3.7.5-r1","3.7.6-r0","3.7.6-r1","3.7.6-r2","3.7.9-r0"],"database_specific":{"owner_kind":"HSP","source":"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-aebq-pbbl-qbee-davj.json"}},{"package":{"name":"traefik-3.7-fips","ecosystem":"Docker Hardened Images:Alpine:3.23","purl":"pkg:apk/dhi/traefik-3.7-fips"},"versions":["3.7.10-r0","3.7.10-r2","3.7.11-r0","3.7.11-r1","3.7.11-r2","3.7.12-r0","3.7.12-r1","3.7.13-r0","3.7.13-r1","3.7.13-r2","3.7.14-r0","3.7.14-r1","3.7.15-r0","3.7.16-r0","3.7.16-r1","3.7.16-r2","3.7.17-r0","3.7.18-r0","3.7.18-r1","3.7.18-r2","3.7.19-r0","3.7.5-r1","3.7.6-r0","3.7.6-r1","3.7.6-r2","3.7.9-r0"],"database_specific":{"owner_kind":"HSP","source":"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-aebq-pbbl-qbee-davj.json"}},{"package":{"name":"traefik-3.7","ecosystem":"Docker Hardened Images:Alpine:3.23","purl":"pkg:apk/dhi/traefik-3.7"},"versions":["3.7.10-r0","3.7.10-r2","3.7.11-r0","3.7.11-r1","3.7.11-r2","3.7.12-r0","3.7.12-r1","3.7.13-r0","3.7.13-r1","3.7.13-r2","3.7.14-r0","3.7.14-r1","3.7.15-r0","3.7.16-r0","3.7.16-r1","3.7.16-r2","3.7.17-r0","3.7.18-r0","3.7.18-r1","3.7.18-r2","3.7.19-r0","3.7.5-r1","3.7.6-r0","3.7.6-r1","3.7.6-r2","3.7.9-r0"],"database_specific":{"owner_kind":"HSP","source":"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-aebq-pbbl-qbee-davj.json"}},{"package":{"name":"traefik-dev","ecosystem":"Docker Hardened Images:Alpine:3.23","purl":"pkg:apk/dhi/traefik-dev"},"versions":["3.6.17-r0","3.6.17-r1","3.6.17-r2","3.6.18-r0","3.6.19-r0","3.6.20-r0","3.6.21-r0","3.6.21-r1","3.7.1-r0","3.7.1-r1","3.7.1-r2","3.7.2-r0","3.7.3-r0","3.7.4-r0","3.7.5-r0","3.7.5-r1"],"database_specific":{"source":"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-aebq-pbbl-qbee-davj.json","owner_kind":"HSP"}},{"package":{"name":"traefik-fips-dev","ecosystem":"Docker Hardened Images:Alpine:3.23","purl":"pkg:apk/dhi/traefik-fips-dev"},"versions":["3.6.17-r0","3.6.17-r1","3.6.17-r2","3.6.18-r0","3.6.19-r0","3.6.20-r0","3.6.21-r0","3.6.21-r1","3.7.1-r0","3.7.1-r1","3.7.1-r2","3.7.2-r0","3.7.3-r0","3.7.4-r0","3.7.5-r0","3.7.5-r1"],"database_specific":{"owner_kind":"HSP","source":"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-aebq-pbbl-qbee-davj.json"}},{"package":{"name":"traefik-fips","ecosystem":"Docker Hardened Images:Alpine:3.23","purl":"pkg:apk/dhi/traefik-fips"},"versions":["3.6.17-r0","3.6.17-r1","3.6.17-r2","3.6.18-r0","3.6.19-r0","3.6.20-r0","3.6.21-r0","3.6.21-r1","3.7.1-r0","3.7.1-r1","3.7.1-r2","3.7.2-r0","3.7.3-r0","3.7.4-r0","3.7.5-r0","3.7.5-r1"],"database_specific":{"owner_kind":"HSP","source":"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-aebq-pbbl-qbee-davj.json"}},{"package":{"name":"traefik","ecosystem":"Docker Hardened Images:Alpine:3.23","purl":"pkg:apk/dhi/traefik"},"versions":["3.6.17-r0","3.6.17-r1","3.6.17-r2","3.6.18-r0","3.6.19-r0","3.6.20-r0","3.6.21-r0","3.6.21-r1","3.7.1-r0","3.7.1-r1","3.7.1-r2","3.7.2-r0","3.7.3-r0","3.7.4-r0","3.7.5-r0","3.7.5-r1"],"database_specific":{"source":"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-aebq-pbbl-qbee-davj.json","owner_kind":"HSP"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N"}]}