Aug 6, 2026·6 min read·218 visits
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.
NATS Server prior to versions 2.12.8 and 2.14.3 contains an incorrect authorization vulnerability (CWE-863) in its message tracing subsystem. When evaluating whether a connection is permitted to publish trace events to a destination subject specified in the Nats-Trace-Dest header, the server only checks standard client permissions and omits permission checks for leaf node connections. This allows a connected leaf node operator with restricted publishing privileges to emit internal trace events to unauthorized subjects and suppress standard message delivery using the Nats-Trace-Only header.
CVE-2026-63341 is a high-severity Denial of Service (DoS) vulnerability in the Aedes MQTT broker for Node.js affecting all versions prior to 1.1.1. The flaw stems from missing input validation on the hierarchical depth of incoming MQTT topic strings before they are passed to the underlying topic-matching engine, qlobber. Because qlobber enforces a hardcoded limit of 100 topic levels and throws a synchronous exception when this threshold is exceeded, an attacker can send a single MQTT packet containing 101 or more forward-slash-separated levels to trigger an uncaught exception that immediately terminates the Node.js broker process.
CVE-2026-61725 is a path traversal vulnerability (CWE-22) in the sevenz-rust2 Cargo package prior to version 0.21.1. The vulnerability occurs because the decompression utility fails to validate or sanitize archive entry filenames before joining them with the destination directory path via std::path::Path::join. An attacker who supplies a crafted 7z archive containing parent directory traversal sequences or absolute paths can write or overwrite arbitrary files on the host filesystem with the privileges of the extracting process.
CVE-2026-77309 (GHSA-jrjx-9jjw-747m) is a high-severity unauthenticated remote code execution vulnerability affecting NASA-AMMOS AIT-GUI versions 1.0.0 through 2.5.0. The flaw results from chaining an incomplete file cleanup error in the telemetry query endpoint (/tlm/query) with a directory traversal flaw in the script execution endpoint (/script/run). An attacker on an adjacent network can stage arbitrary Python statements into a static file on disk and execute that file under the privileges of the AIT-GUI web server process.
A vulnerability classified under CWE-116 (Improper Encoding or Escaping of Output) exists in memtomem-stm versions 0.1.0 through 0.1.33. The software acts as a Model Context Protocol (MCP) short-term memory proxy gateway for AI agent architectures. When surfacing retrieved memories and scratchpad items into downstream Large Language Model (LLM) context envelopes, the SurfacingFormatter component fails to properly sanitize untrusted memory attributes. An attacker with the ability to plant untrusted content into the agent's long-term or working memory store can inject arbitrary structural delimiters, close the <surfaced-memories> XML boundary prematurely, visually obscure instructions using Unicode bidirectional overrides, and execute stored prompt injection attacks against downstream LLM agents.
CVE-2026-77331 (GHSA-72jh-722p-rqr3) is a concurrency and session-state synchronization vulnerability in memtomem-stm, a short-term memory proxy gateway for AI agents. In versions 0.1.2 prior to 0.1.34, concurrent Model Context Protocol (MCP) Remote Procedure Call (RPC) failures or mid-flight task cancellations can initiate duplicate reconnect loops and permit dirty or cancelled transport sessions to be reused. This deficiency results in session-state integrity loss and local service degradation.