GHSA-M6WX-622R-48R9
Kubernetes Ingress service middleware bypasses crossProviderNamespaces
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Remediación | Parche v3.7.11 | github.com/traefik/traefik/v3 · -3 d desde divulgación | |
| Divulgación | Publicada | GHSA-M6WX-622R-48R9 divulgada · CVSS 7 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
There is a medium severity vulnerability in Traefik's Kubernetes Ingress provider. The `providers.kubernetesIngress.crossProviderNamespaces` allowlist was enforced for the `router.middlewares` and `service.serverstransport` annotations, but not for the `traefik.ingress.kubernetes.io/service.middlewares` Service annotation, whose value was copied into the generated dynamic service without checking the Service's namespace. A tenant restricted to a namespace excluded from the allowlist could therefore attach an operator-owned middleware from another provider to its own Service, and, when that middleware injects a backend credential, recover the credential at a backend it controls. Only the v3.7 line from v3.7.1 onwards is affected: the `crossProviderNamespaces` option was introduced in v3.7.1, and neither Traefik v2 nor the v3 lines up to v3.6 carry it.
Patches
- https://github.com/traefik/traefik/releases/tag/v3.7.11
For more information
If you have any questions or comments about this advisory, please open an issue https://github.com/traefik/traefik/issues.
<details>
<summary>Original Description</summary>
Summary
The Kubernetes Ingress provider does not enforce `crossProviderNamespaces` for the documented `traefik.ingress.kubernetes.io/service.middlewares` Service annotation. A namespace-limited tenant excluded from the allowlist can apply an operator-owned middleware from another provider to its own Service. If that middleware injects a backend credential, the tenant can recover the credential at a backend it controls.
Details
`providers.kubernetesIngress.crossProviderNamespaces` is intended to restrict which Kubernetes namespaces may use cross-provider references. Traefik v3.7.10 correctly checks this option for `router.middlewares` and `service.serverstransport`, but `pkg/provider/kubernetes/ingress/kubernetes.go::loadService` copies `svcConfig.Service.Middlewares` into `svc.Middlewares` without checking the Service namespace.
The generated dynamic Service therefore retains a reference such as `operator-secret@file`. During request handling, Traefik resolves and executes that middleware before forwarding the request to the tenant backend.
This was reproduced on the current stable v3.7.10 (`2a2349356c01b1b1f7ecddb0c17b30c97f5241e7`). Current `master` was also affected when checked on 2026-08-10.
This is related to the `crossProviderNamespaces` advisory family, but it is not the same path as GHSA-42cj-m3vj-89wv or GHSA-96qj-4jj5-wcjc: this issue uses the standard Kubernetes Ingress Service middleware annotation and reaches an HTTP middleware executed before a tenant-controlled backend.
### PoC
traefik-service-middleware-poc.zip https://github.com/user-attachments/files/30907045/traefik-service-middleware-poc.zip
- Start Traefik v3.7.10 with `KUBECONFIG` pointing to an isolated test cluster:
traefik --configFile=static.yml- Apply the tenant fixture:
kubectl apply -f tenant.yml
kubectl -n poc-tenant rollout status deployment/attacker-backend- As the namespace-limited tenant ServiceAccount, add the cross-provider Service middleware reference:
kubectl --as=system:serviceaccount:poc-tenant:tenant-author \
-n poc-tenant annotate service attacker-backend \
traefik.ingress.kubernetes.io/service.middlewares=operator-secret@file- After the provider reloads, send one request:
curl -sS -H 'Host: poc.local' http://127.0.0.1:18080/The tenant backend response contains:
X-Operator-Secret: candidate-007-canaryNegative control:
kubectl --as=system:serviceaccount:poc-tenant:tenant-author \
-n poc-tenant annotate service attacker-backend \
traefik.ingress.kubernetes.io/service.middlewares-
curl -sS -H 'Host: poc.local' http://127.0.0.1:18080/The route still returns the backend response, but `X-Operator-Secret` is absent.
Impact
An excluded Kubernetes tenant can execute a middleware owned by another Traefik provider on requests to its own backend. In deployments where an operator middleware injects an upstream API key, bearer token, or similar credential, the tenant can disclose that credential without access to the operator configuration or Kubernetes Secrets.
The proposed severity is Medium. The attack requires low Kubernetes namespace privileges and a pre-existing security-sensitive middleware whose qualified name is known to the tenant.
</details>
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
gogithub.com/traefik/traefik/v3 |
Corregida | v3.7.11 | -3 d | v3.7.19 no afectada |
v3.7.11Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/traefik/traefik/security/advisories/GHSA-m6wx-622r-48r9Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
