
Offline educational model of CVE-2026-119200 (Nuxt dot-segment middleware bypass)
Offline model of CVE-2026-119200 (GHSA-9v7c-q64q-vv33): in Nuxt
4.6.0-4.6.2 a page request with . / .. segments (also spelled %2e)
renders the page the path resolves to, while server/middleware and the
server route rules see the unresolved path. The model compares the
behaviour before (pre) and after (post) the fix commit
45463f8
(released in [email protected] / @nuxt/[email protected]). Educational,
deterministic, Python standard library only. No Nuxt, h3, Nitro or browser
code is imported or run and no socket is opened.
Spanish: README.es.md. Exercises: PRACTICE.md. Limits: LIMITATIONS.md. Sources: SOURCES.md.
diff:N is line N of the saved fix diff (SOURCES.md). Ported code is marked
in src/nuxt_model/model.py; everything else is labelled RECONSTRUCTED.
event.path (reconstructed): one percent-decoding pass that keeps
%2F (diff:17 comment; the advisory gives /%2e/admin -> /./admin).event.path.startsWith('/admin')
-> 401 (config mw).rules): /dashboard headers, /old -> /new
(both from the diff test at diff:122-135) and the advisory's
/admin/** redirect. Lookup through normalizeRouteRulePath:
pre = decode + fold (diff:210, old:40); post =
decodeRoutePath(resolveRoutePathDotSegments(path)) (diff:211, new:42;
runtime copy diff:230, 235). resolveRoutePathDotSegments is ported line
by line from diff:154-176 (packages/nuxt/src/core/utils/index.ts
new:60-82).toRequestEvent (packages/nitro-server/src/runtime/utils/event.ts):
post only, 404 when the path portion of event.path matches
DOT_SEGMENT_RE = /(?:^|\/)\.{1,2}(?:\/|$)/ (diff:15 = new:12;
diff:28-31 = new:271-274).encodeEventPath (encodeURI, diff:12-14
constants), WHATWG URL dot-segment resolution ("as url would resolve
them", diff:24-25), then one decode, case-insensitive match, optional
trailing slash, against the pages / /admin /admin/secret /dashboard /old /new /login.Configs: bare (only the renderer, like the diff test at diff:42-100),
mw, rules. Labels: BYPASS_DOT (protected page rendered, middleware
skipped, dot segments present), RULE_SKIPPED_DOT (the rule keyed on the
rendered page was not applied), DOT_404 (post-fix rejection), AUTH_401,
REDIRECT_307, NOT_FOUND_404, URL_EQ / URL_DIFF (bare: does the page
URL name the same path as event.path?), CASE_ONLY_NOT_CVE (/ADMIN:
case-insensitive page router, mentioned in the advisory's workaround notes,
not fixed by 45463f8 and not this CVE), OK, BAD_INPUT.
| Case | pre | post | Diff lines |
|---|---|---|---|
g01 /%2e/admin (mw) | BYPASS_DOT: event.path /./admin, page /admin | DOT_404 | diff:28-31 |
g03 /x/%2e%2e/admin (mw) | BYPASS_DOT | DOT_404 | diff:28-31 |
g04 /admin (mw) | AUTH_401 | AUTH_401 | none (control) |
g05 /%2e/admin/secret (rules) | RULE_SKIPPED_DOT (no redirect) | REDIRECT_307 to /login | diff:154-176, 211 |
d15 /./dashboard (rules) | RULE_SKIPPED_DOT (no header) | DOT_404, header rule now resolved | diff:129-130, 211 |
d01-d09 (bare) | URL_DIFF | DOT_404 | test table diff:76-88 |
d10-d14 (bare) | URL_EQ | URL_EQ | test table diff:90-100 |
a01 /ADMIN (mw) | CASE_ONLY_NOT_CVE | CASE_ONLY_NOT_CVE | not changed by the fix |
Fixed sweep (results/sweep.csv): 1884 targets (/ + 1-3 tokens from
admin ADMIN x old '' . .. %2e .%2e %2e. %2e%2e %252e) x configs mw,
rules. pre: 192 BYPASS_DOT, 260 RULE_SKIPPED_DOT. post: 0 of
either; 2658 DOT_404. A sweep is a fixed grid, not a proof.
python3 tests/run.py # 26 tests, a skip fails
python3 scripts/derive_expected.py | diff - fixtures/expected.tsv
python3 scripts/derive_expected.py sweep | diff - results/sweep.csv
PYTHONPATH=src python3 -m nuxt_model results fixtures/cases.tsv /tmp/r && diff -r results /tmp/r
PYTHONPATH=src python3 -m nuxt_model case pre /%2e/admin mw
scripts/derive_expected.py does not import src/; it recomputes every
expectation with different algorithms (RFC 3986 remove_dot_segments,
urllib.parse.quote, a byte-loop decoder, regex rule matching).
A model is not a finding: see LIMITATIONS.md.
License: Apache-2.0.