/

CVE-2026-32695

Severity:

HIGH RISK

(7.7)

Injection in Traefik Knative Provider

CVE-2026-32695

Modified

Vulnerability type

Category:

Injection

CWE:

CWE-74, CWE-917

Impact:

Access Control Bypass and Cross-Tenant Traffic Exposure

Severity:

HIGH RISK

(7.7)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Traefik's Knative provider constructs router rules by interpolating unescaped, user-controlled values into rule expressions, enabling rule-syntax injection.

An attacker who can influence Knative host or header values may bypass host restrictions and route unauthorized traffic to victim services in multi-tenant environments.

Affected context

This vulnerability affects Traefik deployments that:

  • Use the Knative provider to dynamically configure routing
  • Rely on Knative rules[].hosts[] and/or headers[].exact for host-based and header-based access control
  • Operate in shared or multi-tenant clusters where different tenants are separated primarily by routing rules

The issue manifests when Traefik turns these Knative values into backtick-delimited rule expressions without proper escaping or validation.

Exploit preconditions

  • Attack surface: HTTP routing configuration via Knative resources (e.g., Knative Services, Routes, or related CRDs).
  • Required access: Ability to create or modify Knative routing objects that influence:
  • rules[].hosts[] values, and/or
  • headers[].exact values.
  • Trigger point: Traefik's Knative provider reads cluster state and builds router rules, interpolating the attacker-controlled values into rule expressions.
  • Why exploitation is possible: The rule-building logic treats user-controlled strings as trusted fragments of the Traefik rule DSL, concatenating them into expressions delimited by backticks without escaping. This allows attackers to inject additional rule clauses (e.g., logical OR conditions) that alter the intended routing behavior.

Why this happens

The root cause is improper neutralization of special elements in data used to build command-like expressions, aligning with CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection').

Traefik's Knative provider constructs router rules by embedding Knative host and header values directly into its rule DSL, enclosed with backticks but not escaped. Because these rule strings support operators such as logical OR and function calls (e.g., Host(...) clauses), an attacker-controlled value like tenant.example.com) || Host(attacker.com can break out of the intended literal context and inject new logic. The system mistakenly assumes these values are pure data, but they are interpreted as code-like expressions by the downstream rule engine, leading to rule-syntax injection and access control bypass.

Potential impact

  • Unauthorized routing of traffic to attacker-controlled services within the same cluster.
  • Host restriction bypass, allowing requests for attacker-owned domains to be served by routes intended only for specific tenants.
  • Cross-tenant traffic exposure in multi-tenant clusters, where one tenant can observe or receive traffic meant for another.
  • Degradation of logical isolation between services relying on Traefik host/header rules as a security boundary.
  • Potential groundwork for more complex attacks when combined with sensitive backends (e.g., internal APIs or admin endpoints exposed via misrouted traffic).

General mitigation guidance

Effective mitigation focuses on treating all configuration-derived strings as untrusted data and preventing their interpretation as rule syntax:

  • Strict escaping / neutralization: Ensure all user-controlled values (hosts, headers, paths, etc.) are sanitized or escaped before being embedded into rule expressions so that special characters and operators cannot alter the rule structure.
  • Separation of data and rule logic: Prefer APIs or configuration mechanisms where rule logic (e.g., OR conditions, Host predicates) is expressed structurally (e.g., as typed fields or separate conditions) rather than by concatenating strings into a DSL.
  • Constrained configuration sources: Limit who can create or modify Knative routing resources in multi-tenant environments, and apply admission controls or policies that validate host and header patterns.
  • Defense-in-depth at the backend: Avoid relying solely on the reverse proxy for tenant isolation. Implement tenant-aware authorization and scoping in backend services so that misrouting does not automatically imply data disclosure.
  • Least privilege for routing rules: Design routing so that a single misconfigured or overly broad rule cannot capture all traffic; use explicit matching and layering of rules to reduce blast radius.

How teams detect issues like this

Organizations can use a combination of code-centric and configuration-centric detection:

  • Static analysis of routing code: Scan the code that builds rule strings (providers, plugins, integration layers) for patterns where user-controllable values are interpolated into rule DSLs or expressions without escaping or validation.
  • Configuration policy enforcement: Use admission controllers, policy engines (e.g., OPA/Gatekeeper, Kyverno), or custom webhooks to enforce that Knative rules[].hosts[] and headers[].exact match constrained patterns and do not contain characters or substrings associated with rule syntax (such as backticks, parentheses, or logical operators).
  • Code review heuristics: During reviews, flag any logic that:
  • Concatenates configuration fields into Traefik rule strings.
  • Treats hostnames or headers as fragments of rule code instead of data.
  • Uses backtick-delimited expressions with user-supplied content.
  • Runtime monitoring: Inspect generated Traefik configuration or routing tables for unexpected hosts, OR conditions, or additional Host() clauses that do not match intended service definitions, and alert on anomalous rule patterns.

Sources

SourceLink
github.comgithub.com/traefik/traefik/releases/tag/v3.6.11
github.comgithub.com/traefik/traefik/releases/tag/v3.7.0-ea.2
github.comgithub.com/traefik/traefik/security/advisories/GHSA-67jx-r9pv-98rj
access.redhat.comaccess.redhat.com/errata/RHSA-2026:10175
access.redhat.comaccess.redhat.com/security/cve/CVE-2026-32695
bugzilla.redhat.combugzilla.redhat.com/show_bug.cgi?id=2452235
security.access.redhat.comsecurity.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-32695.json

Frequently asked

questions

Not typically. Exploitation generally requires the ability to influence Knative routing configuration (for example, by creating or modifying Knative resources). Pure external HTTP clients without such control cannot directly inject routing rules.

The attacker needs permissions to create or update Knative objects that affect rules[].hosts[] or headers[].exact fields. In many multi-tenant clusters, tenants have some control over these resources for their own services, which is what makes the injection path relevant.

The safest pattern is to ensure strict separation between data and rule logic: never concatenate user-controlled values into rule DSL strings. Instead, escape all special characters in such values or use structured APIs that treat them as opaque data while keeping rule operators and functions under full control of trusted code.

Treat any configuration field that ends up in a policy, DSL, or expression engine as untrusted input. Apply input neutralization, design rules as structured data instead of free-form strings where possible, enforce policy-based validation for routing fields at admission time, and include checks for expression injection in security reviews and automated scanning.

Find out what's already
exploitable in your codebase.