ZeroHour

CVE-2026-86253

large

Unauthenticated Path Traversal in h3 (npm) serveStatic() Enables Arbitrary File Read

CVSS 4.0
8.2 high
EPSS
<1%p36
Published
()
Modified
AI analysis

h3, a Node.js HTTP framework published on npm, contains a path traversal flaw (CWE-22) in its serveStatic() helper: on Node.js deployments the request's event.url.pathname is not normalized, so percent-encoded dot segments such as %2e%2e reach decodeURI(), are decoded into ../ sequences, and are never sanitized. An unauthenticated remote attacker can send crafted requests to any endpoint served through serveStatic() to escape the intended static directory. The attacker gains read access to arbitrary files readable by the Node.js process (CVSS 4.0 score 8.2 high, with high confidentiality impact and no integrity or availability impact), though the high attack complexity and present attack requirements suggest some configurations, such as front-ends that normalize the URL path, may not be exploitable. Any application using serveStatic() to serve static files on Node.js is affected: all versions up to and including 2.0.1-rc.14 are vulnerable, with fixes shipped in 1.15.6 on the 1.x line and 2.0.1-rc.15 on the 2.x line. No exploitation is currently known: the flaw is not in CISA's KEV, no public proof-of-concept exists, and EPSS estimates a 0.4% probability of exploitation within 30 days.

What to do: Upgrade h3 to 1.15.6 (1.x line) or 2.0.1-rc.15 (2.x line), and audit your dependency tree since h3 is commonly pulled in transitively by frameworks such as Nitro (Nuxt). As an interim mitigation, place a front-end proxy or middleware that normalizes and decodes the request path (collapsing percent-encoded %2e%2e dot segments) in front of any Node.js server using serveStatic(). Review access logs for requests containing %2e targeting static-file routes, and check for anomalous reads of files outside the intended static directory.

Affected
UnJS h3 (npm package)<= 2.0.1-rc.14 (1.x releases prior to 1.15.6 and 2.x pre-releases up to 2.0.1-rc.14); fixed in 1.15.6 and 2.0.1-rc.15; exploitable when serveStatic() is used on
Estimated exposure
largeroughly tens of thousands of internet-facing deployments (the subset of h3's multi-million weekly npm download base that serves static files via serveStatic()… — h3 receives multi-million weekly npm downloads because it is the HTTP layer beneath widely used frameworks (notably Nitro, which powers Nuxt), but only the subset of those applications exposed directly on Node.js servers and serving static…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

h3 (npm package) versions <= 2.0.1-rc.14 contain a path traversal vulnerability in serveStatic(). On Node.js deployments, event.url.pathname is not normalized, so percent-encoded dot segments (%2e%2e) are passed to decodeURI() and decoded to ../ sequences without sanitization. An unauthenticated remote attacker can send crafted requests to endpoints served by serveStatic() to read arbitrary files outside the intended static directory. Fixed in 1.15.6 and 2.0.1-rc.15.

Weakness
CWE-22
Vector
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

In the news

No ingested article mentions this CVE yet.