Summary
Traefik's Kubernetes Gateway API provider can allow tenants with only HTTPRoute creation permissions to expose the internal REST provider handler, even when providers.rest.insecure=false is configured.
By abusing backend references ending with @internal, a low-privileged actor may gain live write access to Traefik's dynamic configuration, enabling unauthorized reconfiguration of routers and services in shared Gateway deployments.
Affected context
This vulnerability affects Traefik instances deployed with the Kubernetes Gateway API provider in multi-tenant or shared cluster environments.
It becomes relevant when:
- Tenants can create or modify
HTTPRouteresources. - The Traefik REST provider is enabled, but intended to be protected by
providers.rest.insecure=false. - Internal services such as
api@internalare exposed intentionally, whilerest@internalis meant to remain inaccessible.
In such environments, the Gateway provider's handling of TraefikService backend references ending in @internal can unintentionally expose the REST handler.
Exploit preconditions
- Attack surface: Kubernetes cluster running Traefik with the Gateway API provider enabled.
- Required access: Ability to create or modify
HTTPRouteresources within a namespace served by the shared Traefik Gateway (no direct Traefik admin access required). - Trigger point: Definition of a route whose backend reference is a
TraefikServicewhose name ends with@internal, specifically targetingrest@internal. - Why exploitation is possible: The Gateway provider accepts arbitrary
@internalbackend names and does not distinguish between the intendedapi@internaland the sensitiverest@internal, allowing tenants to expose the REST provider despiteproviders.rest.insecure=false.
Why this happens
The underlying issue is an improper access control design (CWE-284) in how Traefik's Kubernetes Gateway API provider validates internal service references.
The provider treats any TraefikService backend whose name ends in @internal as valid, with insufficient checks to ensure that only intended internal endpoints (e.g., api@internal) are reachable from tenant-defined routes.
As a result, the security boundary implied by providers.rest.insecure=false is bypassed: the REST management interface (rest@internal), which should require stronger protections or be disabled, becomes routable via tenant-controlled HTTPRoute objects.
Conceptually, this reflects an authorization flaw where internal administrative surfaces are exposed through a shared data plane without proper partitioning or allowlisting.
Potential impact
- An attacker with HTTPRoute creation permissions can gain write access to Traefik's dynamic configuration via the REST API.
- Unauthorized creation, modification, or deletion of routers, middlewares, and services.
- Traffic hijacking or rerouting to attacker-controlled backends, enabling data interception or manipulation.
- Downtime or denial of service by misconfiguring routes or removing critical services.
- Potential lateral movement or escalation within the cluster by exposing additional internal services or manipulating ingress paths.
General mitigation guidance
Effective mitigations focus on tightening access control boundaries and reducing exposure of administrative endpoints:
- Restrict which internal services can be referenced from tenant-controlled Gateway resources using allowlists, explicit
kindchecks, or dedicated service names that cannot collide with admin endpoints. - Treat all management and configuration APIs (like the REST provider) as sensitive admin surfaces and segregate them from tenant traffic, for example via separate entrypoints, networks, or instances.
- Apply least-privilege principles to Kubernetes RBAC so that only trusted operators can define routes that may indirectly surface internal Traefik services.
- Use multi-tenant isolation strategies (separate Traefik instances or dedicated Gateways) to avoid sharing administrative control paths across untrusted tenants.
- Regularly review configuration for internal handlers and remove or harden any that are not strictly required in the current deployment model.
How teams detect issues like this
Detection typically combines configuration inspection, logging review, and policy enforcement:
- Implement admission controllers or policy engines (e.g., OPA/Gatekeeper, Kyverno) that reject
HTTPRouteorTraefikServiceobjects referencing*@internalbackends except from explicitly trusted namespaces or service names. - Use static or configuration analysis tools to scan cluster manifests and Traefik configs for routes targeting internal admin surfaces such as
rest@internal. - Monitor Traefik access logs for unexpected access to REST handler paths or unusual configuration changes originating from non-admin tenants.
- During code and configuration review, flag patterns where internal control-plane endpoints are reachable through shared data-plane routing rules.
- Periodically audit dynamic configuration state against a known-good baseline to detect unauthorized routers, services, or middlewares.

