Skip to content
CVE-2026-85594 Google Chronicle · YARA-L

Detect Traefik crossProviderNamespaces Bypass via service.middlewares Annotation (CVE-2026-85594) in Google Chronicle

Detects attempts to exploit CVE-2026-85594, an authorization bypass through user-controlled key (CWE-639) in Traefik from v3.7.1 through versions prior to 3.7.11. Traefik fails to enforce the crossProviderNamespaces restriction on the traefik.ingress.kubernetes.io/service.middlewares Service annotation. A namespace-limited tenant excluded from the allowlist can attach 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, breaking tenant isolation. The detection surfaces Kubernetes audit events creating or updating Services carrying cross-namespace middleware references, Traefik configuration-reload logs applying such annotations, and anomalous routing to resources protected in other namespaces.

Based on Traefik GHSA-m6wx-622r-48r9 security advisory

MITRE ATT&CK

Tactic
Privilege Escalation Stealth

YARA-L Detection Query

Google Chronicle (YARA-L)
yaral
// df00tech DF00-06f89926ef · https://df00tech.com/detections/CVE-2026-85594 · licence: https://df00tech.com/detections/licence
rule traefik_crossnamespace_middleware_bypass_cve_2026_85594 {
  meta:
    author = "Argus Detection Platform"
    description = "Traefik crossProviderNamespaces bypass via service.middlewares annotation (CVE-2026-85594)"
    severity = "HIGH"
  events:
    $e.metadata.product_name = /Kubernetes/ nocase
    $e.target.resource.resource_type = "services" or $e.metadata.product_event_type = /services/
    re.regex($e.metadata.description, `traefik\.ingress\.kubernetes\.io/service\.middlewares`)
    re.regex($e.metadata.description, `[A-Za-z0-9\-]+-[A-Za-z0-9\-]+@kubernetescrd`)
  condition:
    $e
}
high severity medium confidence

Chronicle YARA-L rule matching Kubernetes audit UDM events referencing Traefik service.middlewares with namespace-qualified middleware names.

Data Sources

Kubernetes audit logs (UDM)

Required Tables

udm.events

False Positives & Tuning

  • Sanctioned shared-middleware references
  • GitOps reconciliation
  • CI/staging test manifests

Other platforms for CVE-2026-85594


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are further down this page.

  1. Test 1 Apply Service with cross-namespace Traefik middleware annotation

    Expected signal: Kubernetes audit log entry: verb=create, objectRef.resource=services, requestObject.metadata.annotations containing traefik.ingress.kubernetes.io/service.middlewares with a tenant-b-*@kubernetescrd value.

  2. Test 2 Patch existing Service to add cross-namespace middleware

    Expected signal: Kubernetes audit log entry with verb=patch/update on the Service and the cross-namespace middleware annotation in requestObject.

  3. Test 3 Verify Traefik version is in affected range

    Expected signal: Exec/get audit events against the traefik deployment; version string output showing a 3.7.x release.


Response Playbook

Triage

  1. Confirm the Traefik version in the affected cluster: run `traefik version` on the controller pod or inspect the Deployment image tag; versions from v3.7.1 and below 3.7.11 are vulnerable.
  2. Identify the flagged Service object (namespace/name) and extract the traefik.ingress.kubernetes.io/service.middlewares annotation value; determine whether the referenced middleware resides in a different namespace or provider than the Service.
  3. Determine the actor from the Kubernetes audit event (user.username / serviceaccount and sourceIPs) and verify whether they are authorized to reference middlewares outside their namespace.
  4. Check whether the referenced middleware performs security-relevant actions (authentication, authorization, IP allowlists, header injection, redirects, or backend credential injection) that could bypass tenant isolation when applied cross-namespace.

Containment

  1. Remove or revert the offending traefik.ingress.kubernetes.io/service.middlewares annotation on the Service via `kubectl annotate svc <name> -n <ns> traefik.ingress.kubernetes.io/service.middlewares-`.
  2. Restrict the implicated user/ServiceAccount's RBAC so it can no longer create or patch Services with cross-namespace references, and apply an admission policy (OPA/Gatekeeper/Kyverno) blocking namespace-qualified middleware annotations until patched.

Evidence Collection

  1. Export the full Kubernetes audit log entries for the create/update/patch of the Service, including requestObject, user, sourceIPs and timestamps.
  2. Snapshot the current Service manifest, the referenced Middleware CRD definition, and Traefik's dynamic configuration (dashboard/API /api/http/middlewares) to preserve the applied routing state.

Escalation Criteria

  • !Escalate to IR if the cross-namespace middleware grants authentication/authorization bypass or credential disclosure to a production or multi-tenant workload.
  • !Escalate if the actor is unexpected (unknown ServiceAccount, external IP, or a namespace that should be isolated) or if evidence shows the bypass was used to reach another tenant's protected resource.

Investigation Guide

Forensic Artifacts

  • >Kubernetes API server audit log entries for Service create/update/patch operations
  • >Traefik configuration-reload / dynamic-config logs showing the applied middleware chain
  • >The Service object annotations and the referenced Middleware CRD manifest

Tuning Guidance

Baseline the set of middleware references legitimately used in your cluster. If your organization sanctions a single shared-middleware namespace, allowlist references pointing to it and alert only on references to other namespaces. Combine with RBAC context: raise confidence when the acting ServiceAccount lacks a legitimate need to reference external namespaces, and lower it for approved GitOps controllers applying reviewed manifests.


Hunting Queries

Enumerate all Services across the cluster that reference namespace-qualified Traefik middlewares to find pre-existing cross-namespace bypass configurations.

Hunting — KQL
kql
// df00tech DF00-06f89926ef · https://df00tech.com/detections/CVE-2026-85594 · licence: https://df00tech.com/detections/licence
KubeEvents | where Annotations has "traefik.ingress.kubernetes.io/service.middlewares" | where Annotations matches regex @"[A-Za-z0-9\-]+-[A-Za-z0-9\-]+@kubernetescrd" | summarize count() by Namespace, Name, bin(TimeGenerated, 1d)
Hunting — SPL
spl
``` df00tech DF00-06f89926ef · https://df00tech.com/detections/CVE-2026-85594 · licence: https://df00tech.com/detections/licence ```
index=kube_audit "traefik.ingress.kubernetes.io/service.middlewares" | rex "(?<mwref>[A-Za-z0-9\-]+-[A-Za-z0-9\-]+@kubernetescrd)" | stats count by objectRef.namespace objectRef.name mwref

Atomic Red Team Tests

Test 1 Apply Service with cross-namespace Traefik middleware annotation
linux

Creates a Service in namespace tenant-a that references a middleware in namespace tenant-b via the service.middlewares annotation, reproducing the crossProviderNamespaces bypass condition on a vulnerable Traefik (lab only).

Command

bash
kubectl create namespace tenant-a 2>/dev/null; kubectl -n tenant-a apply -f - <<'EOF'
apiVersion: v1
kind: Service
metadata:
  name: poc-svc
  namespace: tenant-a
  annotations:
    traefik.ingress.kubernetes.io/service.middlewares: "tenant-b-authbypass@kubernetescrd"
spec:
  selector:
    app: poc
  ports:
    - port: 80
EOF

Cleanup

bash
kubectl -n tenant-a delete service poc-svc --ignore-not-found; kubectl delete namespace tenant-a --ignore-not-found

Expected Telemetry

Kubernetes audit log entry: verb=create, objectRef.resource=services, requestObject.metadata.annotations containing traefik.ingress.kubernetes.io/service.middlewares with a tenant-b-*@kubernetescrd value.

Expected Detection

KQL/SPL/EQL rules fire on the namespace-qualified middleware reference in the Service annotation.

Test 2 Patch existing Service to add cross-namespace middleware
linux

Patches an existing Service to inject a cross-namespace middleware annotation, simulating an attacker modifying a benign Service after creation.

Command

bash
kubectl -n tenant-a patch service poc-svc --type merge -p '{"metadata":{"annotations":{"traefik.ingress.kubernetes.io/service.middlewares":"tenant-b-stripprefix@kubernetescrd"}}}'

Cleanup

bash
kubectl -n tenant-a annotate service poc-svc traefik.ingress.kubernetes.io/service.middlewares- --overwrite 2>/dev/null; true

Expected Telemetry

Kubernetes audit log entry with verb=patch/update on the Service and the cross-namespace middleware annotation in requestObject.

Expected Detection

Detection matches on verb in (update,patch) with the namespace-qualified middleware reference.

Test 3 Verify Traefik version is in affected range
linux

Checks the running Traefik image version to confirm exposure to CVE-2026-85594 (v3.7.1 through < 3.7.11).

Command

bash
kubectl -n traefik get deploy traefik -o jsonpath='{.spec.template.spec.containers[0].image}'; echo; kubectl -n traefik exec deploy/traefik -- traefik version 2>/dev/null | grep -i version

Cleanup

bash
true

Expected Telemetry

Exec/get audit events against the traefik deployment; version string output showing a 3.7.x release.

Expected Detection

Informational, confirms whether the cluster runs an affected Traefik build; not a malicious indicator by itself.

Related Detections