A AegiFlow
MEDIUMCVSS 5.3EPSS 0.2%

CVE-2026-8384

Eclipse Jetty: Path parameter traversal

Published
2026-07-22
Modified
2026-07-22
EPSS percentile
10%
Aliases
GHSA-w7x5-g22v-xqhr
Sources
github-advisory

Summary

### Description (as reported) #### Summary In Jetty 12.1.8, org.eclipse.jetty.util.URIUtil.canonicalPath() may leave dot-dot path segments unnormalized when a semicolon path parameter marker is followed by a slash and a dot segment. A minimal example is: `/public;/../admin/secret` In my local reproduction, URIUtil.canonicalPath() returns: `/public/../admin/secret` instead of the expected normalized path: `/admin/secret` When Jetty's `SecurityHandler.PathMapped` is used to protect a path prefix such as `/admin/*`, the non-normalized canonical path may not match the protected prefix. As a result, an unauthenticated request may bypass the configured path-based security constraint. #### Tested Version Jetty: 12.1.8 JDK: 17.0.18 Maven: 3.9.14 Maven artifacts used: org.eclipse.jetty:jetty-server:12.1.8 org.eclipse.jetty:jetty-security:12.1.8 org.eclipse.jetty:jetty-session:12.1.8 Only confirmed Jetty 12.1.8 so far. #### Minimal Reproduction Starts a minimal Jetty server with the following security setup: ```java SecurityHandler.PathMapped security = new SecurityHandler.PathMapped(); security.put("/admin/*", Constraint.from("admin")); security.put("/*", Constraint.ALLOWED); security.setAuthenticator(new BasicAuthenticator()); ``` The test then sends requests with no `Authorization` header. Observed result: ``` GET /admin/secret -> 401 GET /public;x/../admin/secret -> 200 ``` The handler receives paths such as: `/public/../admin/secret` This suggests that the `/admin/*` security constraint is bypassed because `PathMapped` matching is performed against the non-normalized canonical path. #### Suspected Root Cause The suspected root cause is in `URIUtil.canonicalPath()`. The relevant logic is approximately: ```java for (int i = 0; i < end; i++) { char c = encodedPath.charAt(i); switch (c) { case ';': if (builder == null) { builder = new Utf8StringBuilder(encodedPath.length()); builder.append(encodedPath, 0, i); } while (++i < end) { if (encodedPath.charAt(i) == '/') { builder.append('/'); break; } } break; case '.': if (slash) normal = false; if (builder != null) builder.append(c); break; } slash = c == '/'; } String canonical = (builder != null) ? (onBadUtf8 == null ? builder.toCompleteString() : builder.takeCompleteString(onBadUtf8)) : encodedPath; return normal ? canonical : normalizePath(canonical); ``` For the input: `/public;/../admin/secret` when the outer loop reaches the semicolon: ``` i = 7 c = ';' slash = false normal = true ``` Inside `case ';'`, the `while (++i < end)` loop advances i to the next character, which is already '/' for the empty path parameter form ";/". The code then appends '/' to the canonical builder: `builder.append('/');` At this point, the canonical builder ends with '/': `/public/` However, the local variable `c` is still the old value ';', because `c` was read before entering the switch and is not updated when the inner loop advances `i`. After leaving the switch, the loop updates the slash state using: `slash = c == '/';` Since `c` is still ';', slash becomes `false`. On the next iteration, the scanner reaches '.', which is the first dot in the following "../" segment. Because slash is incorrectly `false`, this code does not run: ```java if (slash) normal = false; ``` Therefore `normal` remains `true`, and `canonicalPath()` returns the canonical string directly instead of calling `normalizePath(canonical)`. The result is: `/public/../admin/s

Affected packages

EcosystemPackageAffected versionsFixed versions
Mavenorg.eclipse.jetty:jetty-util12.0.35, 12.1.9

Remediation: Upgrade to 12.0.35 or later.

References

Includes data from the GitHub Advisory Database, licensed under CC-BY 4.0.

CVE® is a registered trademark of The MITRE Corporation. CVE content reproduced under the CVE Terms of Use; copyright designation © MITRE.

EPSS scores provided by the FIRST.org Exploit Prediction Scoring System.