🛡️ CVE-2026-71325 — traefik

⚪ Unknown ✅ No Known Exploit CWE-653 NVD
N/A
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

Traefik: allowCrossNamespace=false bypass via @kubernetescrd TraefikService backendRef

Summary

There 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.

Patches

  • https://github.com/traefik/traefik/releases/tag/v2.11.54
  • https://github.com/traefik/traefik/releases/tag/v3.6.25
  • https://github.com/traefik/traefik/releases/tag/v3.7.10

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

When 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 <victim-namespace>-<name>@kubernetescrd, defeating the namespace-isolation boundary that allowCrossNamespace=false is meant to enforce.

This 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.

Details

Root cause

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.

Vulnerable code

```go

// pkg/provider/kubernetes/crd/kubernetes_http.go:662-695 — nameAndService (VULNERABLE)

func (c configBuilder) nameAndService(ctx context.Context, parentNamespace string, service traefikv1alpha1.LoadBalancerSpec) (string, *dynamic.Service, error) {

svcCtx := log.Ctx(ctx).With().Str(logs.ServiceName, service.Name).Logger().WithContext(ctx)

if !strings.Contains(service.Name, providerNamespaceSeparator) { // 665: only names WITHOUT "@"

service = *service.DeepCopy()

service.Namespace = namespaceOrParentNamespace(service.Namespace, parentNamespace)

if !isNamespaceAllowed(c.allowCrossNamespace, parentNamespace, service.Namespace) { // 669

return "", nil, fmt.Errorf("service %s/%s not in the parent resource namespace %s", ...)

}

}

// 674: for "@"-names, the ONLY gate is crossProviderNamespaces, which defaults to allow-all (nil).

if !isCrossProviderNamespaceAllowed(c.crossProviderNamespaces, parentNamespace) && strings.Contains(service.Name, providerNamespaceSeparator) {

return "", nil, fmt.Errorf("service %q reference is not allowed: ...", service.Name)

}

// ^-- MISSING: no !c.allowCrossNamespace && strings.HasSuffix(service.Name, "@"+ProviderName) rejection.

switch service.Kind {

case "TraefikService":

return fullServiceName(svcCtx, service, intstr.FromInt(0)), nil, nil // 690: returns the cross-namespace reference

...

}

}

```

For comparison, the sibling resolver used for middleware and TLS references does carry the guard:

```go

// pkg/provider/kubernetes/crd/kubernetes.go:1653-1668 — resolveReference (CORRECT)

func resolveReference(ctx context.Context, parentNs, ns, name string, crossProviderNamespaces []string, allowCrossNamespace bool) (string, error) {

if strings.Contains(name, providerNamespaceSeparator) {

if !allowCrossNamespace && strings.HasSuffix(name, providerNamespaceSeparator+ProviderName) {

return "", errors.New("when allowCrossNamespace is disa

How this vulnerability can be exploited

This issue can be reached with local access to the system, attack complexity is low, an attacker needs low-level privileges on the target. No user interaction is required. Rated impact: confidentiality low, integrity low, availability none.

Affected software

CVE-2026-71325 is recorded against 4 packages.

  • github.com/traefik/traefik
  • github.com/traefik/traefik/v2
  • github.com/traefik/traefik/v3
  • unknown

Timeline and source

Published on 6 August 2026. No public exploit is currently recorded for this entry. Record sourced from NVD.

References

github.com (Web)
github.com (Web)
github.com (Package)
github.com (Web)
github.com (Web)
github.com (Web)

Details

Severity Unknown
CVSS Score N/A
CVSS Vector 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
CWE CWE-653
Public Exploit ✅ No
Source NVD
Published 2026-08-06
Updated 2026-08-12
Modified 2026-08-06
Fix URL N/A

Affected Packages

Software From version Fixed in
github.com/traefik/traefik
github.com/traefik/traefik/v2
github.com/traefik/traefik/v3
unknown

Similar Threats

Free Vulnerability Check

Is your site affected by CVE-2026-71325?

BotEraser helps you identify potentially vulnerable plugins and themes by checking your installation against CVE-2026-71325 and other known CVE records.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.