Summary
A request-parsing discrepancy in Traefik can cause HTTP/1 request targets with a rootless form to be normalized differently for routing and backend forwarding. An attacker may use this mismatch to bypass cross-vhost or path-based authorization controls and evade access logging when the backend interprets the forwarded opaque target as a path.
Affected context
The issue affects Traefik HTTP reverse-proxy deployments handling specially formed HTTP/1 request targets. It becomes risky when Traefik evaluates routing, sanitization, authentication forwarding, encoded-character policies, or logging using a normalized path while the backend receives the original opaque target and interprets it differently.
Exploit preconditions
- Attack surface: HTTP/1 request handling at a Traefik reverse-proxy entry point
- Required access: Ability to send requests to an exposed Traefik router
- Trigger point: Processing of a rootless HTTP/1 request target stored by Go in
URL.Opaque - Why exploitation is possible: Traefik performs security and routing decisions using a normalized
/path but forwards the opaque target verbatim, creating inconsistent interpretations between the proxy and backend
Why this happens
The vulnerability results from inconsistent parsing and normalization of an HTTP request target across proxy processing stages. Traefik's routing, path sanitization, authentication forwarding, encoded-character handling, and access logging evaluate a normalized path, while backend forwarding preserves URL.Opaque. When the backend interprets that opaque value as a path, the proxy and backend disagree about the requested resource.
This behavior maps primarily to CWE-444: Inconsistent Interpretation of HTTP Requests, with CWE-1286: Improper Validation of Syntactic Correctness of Input also relevant because an unusual request-target form is accepted without ensuring consistent semantic validation across all processing stages.
Potential impact
- An attacker may bypass cross-vhost routing restrictions
- Path-scoped authorization checks could be bypassed
- Protected backend resources may become reachable through inconsistent path interpretation
- Access logs may omit or misrepresent the effective backend path
- Monitoring and incident investigation could be impaired
- Backend behavior could be influenced by request-target parsing differences
General mitigation guidance
Mitigation generally focuses on enforcing one consistent interpretation of HTTP request targets throughout proxy processing.
Common defensive patterns include:
- Rejecting malformed, ambiguous, or unsupported request-target forms at the earliest boundary
- Applying identical canonicalization and validation rules to routing, authorization, forwarding, and logging
- Avoiding decisions based on a normalized placeholder when a separate raw target will be forwarded
- Ensuring backend services receive only validated, canonical request paths
- Treating proxy and backend parser disagreement as a security policy violation
- Restricting backend privileges and isolating sensitive routes so parser discrepancies have limited impact
- Testing reverse-proxy behavior with differential request-target and normalization cases
How teams detect issues like this
Detection can combine parser-focused testing, source review, and runtime monitoring.
- Use static analysis and code review to identify separate handling of normalized path fields and raw or opaque request-target fields.
- Review whether routing, authorization, forwarding, and logging consume different representations of the same request.
- Add regression tests for rootless HTTP/1 targets, unusual request-target forms, encoded separators, and proxy/backend interpretation differences.
- Enforce gateway policies that reject ambiguous request syntax before routing decisions are made.
- Compare proxy access logs, backend logs, and observed request paths for mismatches.
- Neutral automated review tools may help identify inconsistent canonicalization and HTTP parser-boundary patterns.

