Aug 6, 2026·6 min read·1 visit
A path traversal vulnerability in Traefik's ReplacePathRegex middleware allows unauthenticated remote attackers to bypass gateway authentication controls by exploiting parser differentials and un-normalized path forwarding.
CVE-2026-65600 is a path traversal vulnerability in the ReplacePathRegex middleware component of Traefik. An unauthenticated remote attacker can exploit the vulnerability to inject directory traversal sequences. When Traefik forwards the resulting un-normalized path, downstream backend web servers normalize the request to execute administrative or protected paths, bypassing gateway-enforced security policies.
Traefik is a modern reverse proxy and ingress controller designed to route incoming network requests to appropriate backend services. Within its routing architecture, Traefik employs various middleware components to inspect, modify, or restrict HTTP requests. The ReplacePathRegex middleware is specifically used to modify request paths using regular expressions prior to proxying.
The vulnerability is classified as improper limitation of a pathname to a restricted directory, or path traversal (CWE-22). The attack surface resides in endpoints configured with this middleware where the regular expression allows loose, non-delimited path capture. Remote, unauthenticated attackers can manipulate the requested path using directory traversal sequences to bypass proxy-level authorization.
By leveraging this flaw, attackers target routes configured with ReplacePathRegex to proxy modified paths to backend applications. If downstream backends perform automatic normalization, they resolve the traversal operators, granting unauthorized access to administrative or restricted handlers. Gateway-enforced authentication policies, such as OAuth2, Basic Auth, or Custom forward authentication, are rendered completely ineffective.
The root cause of CVE-2026-65600 lies in a parser differential vulnerability combined with a lack of validation after path replacement operations. The ReplacePathRegex middleware executes string substitution based on user-defined regular expression capture groups. However, prior to the fix, the middleware failed to validate or clean the rewritten path before transferring it to the proxy engine.
Consider an environment with a vulnerable regular expression configuration designed to match /api(.*). If an attacker requests /api../admin, the capture group (.*) evaluates to ../admin. The middleware substitutes this capture group into the replacement string, producing a modified path that contains active relative traversal sequences.
Traefik routes the request based on the initial matching logic, which deems /api../admin safe. The internal engine fails to clean the updated URI and forwards the raw traversal sequence to the backend. The downstream web framework (such as Node.js or Spring Boot) then normalizes the path to /admin, exposing the protected interface.
Analysis of the patch reveals the exact mechanism used to remediate the vulnerability. The security fix was committed to the Traefik repository within pkg/middlewares/replacepathregex/replace_path_regex.go in commit 3f10dd442479530560f010167cac2947676d9b29 by developer Kevin Pollet.
The modified codebase implements post-replacement normalization and comparison checks:
// pkg/middlewares/replacepathregex/replace_path_regex.go
func (rp *replacePathRegex) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
// ... (replacement execution logic is performed here)
req.RequestURI = req.URL.RequestURI()
// The fix introduces sanitization and comparison verification
path := req.URL.Path
if path != "" {
// JoinPath normalizes the path by resolving dot segments (path.Clean)
req.URL = req.URL.JoinPath()
}
// If the cleaned path differs from the replaced path, block execution
if path != req.URL.Path {
logger.Debugf("Rejecting request, sanitized path: %q is not equivalent to stripped path: %q", path, req.URL.Path)
http.Error(rw, http.StatusText(http.StatusBadRequest), http.StatusBadRequest)
return
}
}This implementation utilizes Go's standard library JoinPath() to clean the output path. If the resulting cleaned path differs from the initial un-normalized replacement output, it indicates path traversal manipulation. Traefik logs the event, terminates the connection immediately, and responds with an HTTP 400 Bad Request error.
While the patch successfully stops standard path traversal vectors on UNIX platforms, security teams must monitor for parser discrepancies. Go's native path resolution does not treat backslashes as path separators on UNIX platforms, whereas specific Windows-based backend applications might execute backslash normalization, which represents a potential minor variant risk.
Exploitation requires no user interaction or existing privileges on the system. The attacker only needs network access to the exposed Traefik proxy and knowledge of a route employing the vulnerable middleware. Because path modification occurs invisibly, the downstream server receives and services the unauthorized traffic directly.
In a simulated attack, an operator identifies an API endpoint routed through Traefik with the rule regex: "^/public(.*)". The corresponding target backend hosts both public endpoints and an administrator console located at /secure-admin. Under normal operating parameters, Traefik blocks direct access to /secure-admin using an authentication middleware.
The attacker bypasses this control by transmitting a crafted GET request targeting /public/../../secure-admin. Traefik matches the request to the public rule, passes it through the replacement middleware, and rewrites the path. Since the original middleware failed to normalize the output, Traefik forwards the raw traversal sequence directly to the backend system.
The backend server receives /public/../../secure-admin and immediately normalizes the request to /secure-admin using its native routing rules. It processes the query and returns the sensitive data back to the proxy, bypassing the Traefik-layer authorization check entirely.
The security impact of CVE-2026-65600 is classified as high because it nullifies upstream perimeter security controls. Gateways are commonly utilized as centralized security boundaries to enforce authentication, rate limiting, and IP whitelisting. A bypass at this layer exposes entire backend architectures to unauthenticated remote actions.
According to the CVSS v4.0 assessment, this vulnerability receives a base score of 7.8, reflecting high subsequent confidentiality and integrity impacts. An attacker can access administrative APIs, extract confidential information from internal applications, or execute states-changing commands. The vulnerability does not require privileges, specialized system access, or user interaction.
Currently, the exploit status of this vulnerability remains at the proof-of-concept phase. There are no documented instances of weaponized exploitation in the wild, nor is the CVE listed in the CISA KEV catalog. Nevertheless, the ease of exploitation makes immediate remediation critical for organizations relying on Traefik gateways to secure backend services.
The recommended resolution is to upgrade all Traefik instances to the appropriate patched release. Administrators using the v2 branch must upgrade to at least v2.11.52. Organizations deploying v3.6 must migrate to v3.6.23 or later, and those on v3.7 must upgrade to at least v3.7.7.
If immediate software upgrades are not possible, administrators should apply defensive configuration adjustments. Inspect all dynamic configurations containing ReplacePathRegex middleware. Alter the matching regular expressions to enforce a strict slash delimiter, changing patterns like ^/api(.*) to ^/api/(.*) to reduce the traversal capture surface.
Organizations can also deploy external Web Application Firewall (WAF) rules to detect and drop directory traversal patterns within incoming request paths. In parallel, monitor system logs for HTTP 400 errors or requests featuring dot-dot-slash patterns. Upgrading remains the only complete and reliable remediation for the underlying flaw.
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N| Product | Affected Versions | Fixed Version |
|---|---|---|
Traefik traefik | <= v2.11.51 | v2.11.52 |
Traefik traefik | >= v3.6.0, <= v3.6.22 | v3.6.23 |
Traefik traefik | >= v3.7.0, <= v3.7.6 | v3.7.7 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-22 |
| Attack Vector | Network |
| CVSS v4.0 | 7.8 (High) |
| EPSS Score | 0.00674 |
| Impact | Authentication Bypass |
| Exploit Status | Proof of Concept |
| CISA KEV Status | Not Listed |
The software uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as '..' that can resolve to a location outside of the directory.
A high-severity path traversal vulnerability exists in Traefik's Kubernetes Ingress NGINX provider. The flaw resides in the RewriteTarget middleware, which is auto-generated when an Ingress resource specifies the `nginx.ingress.kubernetes.io/rewrite-target` annotation. This allows remote, unauthenticated attackers to bypass route-level authentication and access restricted downstream endpoints by exploiting a parser differential.
A critical authentication bypass and context spoofing vulnerability exists in Traefik's BasicAuth, DigestAuth, and ForwardAuth middlewares prior to versions 2.11.51, 3.6.22, and 3.7.6. The flaw arises because Traefik's header cleanup mechanisms rely on Go's standard library header canonicalization, which does not modify or delete headers containing underscores. Consequently, unauthenticated remote attackers can inject custom underscore-variant headers (e.g., X_Auth_User) that bypass Traefik's stripping filters and reach backend application servers. When downstream backends normalize both hyphens and underscores into the same environment variables, the attacker's spoofed identity value is processed as trusted authorization data.
CVE-2026-71324 is a high-severity HTTP request smuggling vulnerability in the Traefik reverse proxy. It allows an unauthenticated remote attacker to achieve cross-user response poisoning when Traefik is configured to route HTTP/2 or HTTP/3 CONNECT requests to an HTTP/1.1 upstream backend. By sending a crafted CONNECT request that is subsequently rejected by the backend with a keep-alive non-2xx response, the attacker can leave smuggled requests within the shared connection pool, which are then served to subsequent clients.
A critical process-fatal NULL pointer dereference vulnerability exists in the WebDAV backend of rclone (when configured with ownCloud Infinite Scale TUS uploads). During transport failures, a nil HTTP response pointer is dereferenced directly without validation, leading to an unhandled Go runtime panic that terminates the entire rclone daemon. This vulnerability was resolved in rclone version 1.75.0.
A path traversal vulnerability exists in the S3 emulation layer of rclone when executing the 'serve s3' subcommand. Because the application maps client-supplied S3 object keys containing relative directory sequences to file paths without proper boundary checks, an attacker can escape the logical containment of a target bucket. This enables unauthorized reading, writing, and deletion of files at the root level of the served storage directory.
A critical security flaw was identified in rclone before version 1.75.0, where the custom S3 redirect handler failed to sanitize sensitive authentication headers and encryption keys during cross-host redirects or transport downgrades. This flaw allows attackers on the path or controlling target hosts to intercept sensitive IBM IAM tokens, AWS S3 Express tokens, and customer-provided server-side encryption keys (SSE-C).