Traefik crossProviderNamespaces Bypass via service.middlewares Annotation (CVE-2026-85594)
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.
Vulnerability Intelligence
Public PoCAffected Software
- Vendor
- traefik
- Product
- traefik
- Versions
- < 3.7.11
Weakness (CWE)
Timeline
- Disclosed
- September 4, 2026
CVSS
What is CVE-2026-85594 Traefik crossProviderNamespaces Bypass via service.middlewares Annotation (CVE-2026-85594)?
Traefik crossProviderNamespaces Bypass via service.middlewares Annotation (CVE-2026-85594) (CVE-2026-85594) maps to the Privilege Escalation and Stealth tactics — the adversary is trying to gain higher-level permissions in MITRE ATT&CK.
This page provides production-ready detection logic for Traefik crossProviderNamespaces Bypass via service.middlewares Annotation (CVE-2026-85594), covering the data sources and telemetry it touches: Kubernetes audit logs, Azure Monitor Container Insights. The queries below are rated high severity at medium confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.
MITRE ATT&CK
- Tactic
- Privilege Escalation Stealth
// df00tech DF00-06f89926ef · https://df00tech.com/detections/CVE-2026-85594 · licence: https://df00tech.com/detections/licence
// Kubernetes audit logs ingested to Sentinel; detect Service objects with cross-namespace middleware refs
let suspiciousAnnotation = "traefik.ingress.kubernetes.io/service.middlewares";
KubeEvents
| where TimeGenerated > ago(1h)
| where ObjectKind == "Service" or Reason in ("Created","Updated")
| extend Annotations = tostring(parse_json(Annotations))
| where Annotations has suspiciousAnnotation
// cross-namespace / cross-provider reference pattern: namespace-qualified middleware name (ns-middleware@kubernetescrd)
| where Annotations matches regex @"[A-Za-z0-9\-]+-[A-Za-z0-9\-]+@kubernetescrd"
| project TimeGenerated, Namespace, Name, Annotations, Reason, ClusterName
| sort by TimeGenerated desc Searches Kubernetes audit/event data in Sentinel for Service objects annotated with traefik service.middlewares that reference namespace-qualified middlewares (potential crossProviderNamespaces bypass).
Data Sources
Required Tables
False Positives
- Legitimate platform teams intentionally sharing a sanctioned shared-middleware namespace where cross-namespace references are expected
- GitOps controllers (ArgoCD/Flux) reconciling pre-approved Service manifests that include middleware annotations
- Blue-team or CI validation jobs applying test manifests in a staging cluster
Query fingerprint DF00-06f89926ef · licence
Sigma logsource & community rules
The detection logic for Traefik crossProviderNamespaces Bypass via service.middlewares Annotation (CVE-2026-85594) (CVE-2026-85594) above is provided in a vendor-neutral
form so you can deploy it on any SIEM. The same logic is shipped here as native
KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the
following logsource:
logsource:
product: azure Browse the community-maintained Sigma rules for this technique:
Platform-specific guides 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.
- 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.
- 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.
- 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
- 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.
- 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.
- 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.
- 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
- 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-`.
- 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
- Export the full Kubernetes audit log entries for the create/update/patch of the Service, including requestObject, user, sourceIPs and timestamps.
- 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.
// 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) ``` 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
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
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
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.
Patches an existing Service to inject a cross-namespace middleware annotation, simulating an attacker modifying a benign Service after creation.
Command
kubectl -n tenant-a patch service poc-svc --type merge -p '{"metadata":{"annotations":{"traefik.ingress.kubernetes.io/service.middlewares":"tenant-b-stripprefix@kubernetescrd"}}}' Cleanup
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.
Checks the running Traefik image version to confirm exposure to CVE-2026-85594 (v3.7.1 through < 3.7.11).
Command
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
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
Tactic Hubs
Related Techniques
Same Tactic: Privilege Escalation
Browse by tactic
- Reconnaissance TA0043
- Resource Development TA0042
- Initial Access TA0001
- Execution TA0002
- Persistence TA0003
- Privilege Escalation TA0004
- Stealth TA0005
- Defense Impairment TA0112
- Credential Access TA0006
- Discovery TA0007
- Lateral Movement TA0008
- Collection TA0009
- Command and Control TA0011
- Exfiltration TA0010
- Impact TA0040