Eclipse Jetty · Path Traversal · GHSA-453j

One encoded slash, outside the docroot

Project: Eclipse JettyAdvisory: GHSA-453j-vp8m-53mxClass: Path Traversal (CWE-22)Status: Accepted · Severity raised to 7.5
A dark jetty pier with a glowing path escaping beyond its edge

The containment check ran on the encoded path — the escape only appeared after decoding.

TL;DR — In Eclipse Jetty 12.1.14, the core ResourceHandler served files outside its configured docroot when the server ran a UriCompliance mode allowing AMBIGUOUS_PATH_SEPARATOR (the shipped LEGACY or JETTY_11 modes). A single request like GET /..%2fsecret.txt returned a file that lived next to — never inside — the docroot. I reported it as private advisory GHSA-453j-vp8m-53mx; the Jetty maintainers accepted it on 11 November 2026, raised the severity from my proposed 5.3 to 7.5, and requested a CVE.

Background

Eclipse Jetty is one of the most widely deployed Java web servers and servlet containers — it powers embedded servers, proxies and application backends across the industry, and it is maintained under the Eclipse Foundation with coordinated vulnerability disclosure (no bounty, credit only). Its ResourceHandler is the core static-file handler: you point it at a base directory (the docroot) and it serves whatever lives under it.

Jetty 12 introduced UriCompliance — a set of modes that decide how strictly the server parses URIs. The shipped DEFAULT mode follows RFC 3986 strictly; the shipped LEGACY and JETTY_11 compatibility modes tolerate certain ambiguities so existing deployments keep working. One tolerated ambiguity is Violation.AMBIGUOUS_PATH_SEPARATOR: a percent-encoded byte in the path that decodes to /, such as %2f.

The vulnerability

The bug is a hand-off failure between the URI parser and the file resolver. The parser sees ..%2fsecret.txt, registers the ambiguous-separator violation — and, in LEGACY/JETTY_11 mode, tolerates it. Because the encoded separator is not a literal /, canonicalisation treats the whole thing as one ordinary segment: it is never recognised as ... The handler then resolves the still-encoded path against the base resource, and the one containment guard in PathResource.resolve() runs on that encoded string — where the path looks perfectly normal. Only during resolution is %2f decoded into a real separator, the .. climbs out of the docroot, and no further containment check ever runs.

Three request shapes leaked, all unauthenticated, all a single plain HTTP/1.1 GET:

How I verified it

I built an embedded Jetty fixture from the released 12.1.14 jars on Maven Central — a core ResourceHandler with base /tmp/p4/docroot, no ContextHandler, and a secret file placed as a sibling of the docroot, never inside it. Raw sockets were used because ordinary HTTP clients normalise .. away before sending. Then I ran a 27-variant traversal matrix across compliance modes:

ModeLeaks
DEFAULT (RFC 3986)0 / 27 — all three variants rejected with 400
LEGACY3 / 27
JETTY_113 / 27
RFC3986 + AMBIGUOUS_PATH_SEPARATOR only3 / 27
RFC3986 + AMBIGUOUS_PATH_SEGMENT only0 / 27

The same matrix on the 12.1.15-SNAPSHOT gave identical results, and the 12.0.40 source carries the same code — so the affected package is org.eclipse.jetty:jetty-server ≤ 12.1.14 (12.0.40 source-confirmed). Everything else in the matrix failed in every mode (400 or 404): plain /../, %2e%2e without %2f, ..;, NUL bytes, double encoding, backslashes, overlong UTF-8 and %uXXXX forms. The encoded separator is the precise trigger — allowing only the segment violation leaks nothing.

Root cause — file and line (tag jetty-12.1.14)

Impact — stated honestly

Default configurations are not affected. DEFAULT mode rejects these requests with 400. Exploitation needs the operator to have selected LEGACY, JETTY_11, or an equivalent custom mode. That precondition is weaker than it sounds: LEGACY and JETTY_11 are Jetty's own shipped, documented compatibility modes, provided precisely so existing deployments keep Jetty 11 behaviour — and the minimal trigger is a single allowed violation, not the full LEGACY set. Real-world configurations posted by users (e.g. jetty.project issue #14082) show production ResourceHandler setups running custom compliance strings that include it.

The counter-argument — "a mode that allows ambiguous URIs has accepted this risk" — misses the distinction: the compliance mode governs receiving an ambiguous URI (parsing, routing, servlet mapping). It does not waive the static handler's basic contract that only the base resource's content is served. An operator choosing LEGACY for URI compatibility has no reason to expect their docroot's sibling files — configuration, backups, other vhosts' content — to become web-readable. The fix belongs in the handler/resolution layer: a containment re-check on the decoded path.

Two scope limits, stated plainly: the claim covers only the core ResourceHandler — the ee10 servlet path (DefaultServlet behind a ContextHandler, where the alias-check layer exists) was not dynamically tested. And the impact is read-only disclosure (C:L, no integrity or availability impact); no write or delete primitive was found.

Not a duplicate

Before filing I checked the published advisories, the GitHub Advisory Database, issue search and the web. The near neighbours are genuinely different: CVE-2021-28164 / CVE-2021-34429 used encoded dots (%2e) in DEFAULT mode against Jetty 9.4's servlet WEB-INF — my payload needs only the encoded separator, in non-default modes, on 12.x, against the core handler's docroot containment. CVE-2026-8384 was a semicolon (..;) canonicalisation bug where Jetty itself served no file; here the handler serves the outside file. Payload, mode, version and layer are all different.

Disclosure timeline

StepDetail
9 Nov 2026Filed as private GitHub Security Advisory GHSA-453j-vp8m-53mx on jetty/jetty.project — proposed Medium 5.3 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N), CWE-22, affected org.eclipse.jetty:jetty-server ≤ 12.1.14
11 Nov 2026Accepted by maintainer Joakim Erdfelt; severity raised to 7.5 (High)
17 Nov 2026CVE requested by the maintainers
30 Nov 2026No CVE number assigned yet; fix/publish status pending maintainer action

Remediation

Lessons

Security invariants are lost at hand-offs, not inside components. Every piece of this chain was locally consistent — the parser tolerated what it was told to tolerate, the guard checked what it was given — and the property "a served resource stays inside the base" died in the gap between the encoded check and the decoded resolution. When you audit, follow the data across the hand-off: the check that matters is the one that runs on the value the filesystem actually sees.

Found something similar?

I help teams verify and fix issues like this — and I retest my own reports for free. Reach me at sr558079@gmail.com or read more writeups.