Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Network-reachable with no authentication required; impact is file disclosure only (C:H, I:N, A:N); scope unchanged as no system boundary is crossed.
Primary rating from Vendor (openjs).
CVSS VectorVendor: openjs
Lifecycle Timeline
3DescriptionCVE.org
@fastify/static before version 10.1.3 contains an incomplete fix for a previous route guard bypass. The static file handler rejected only parent directory segments, but it did not canonicalize dot segments, duplicate slashes, encoded dots, or backslashes before route matching and before delegating to the send layer. As a result, an unauthenticated attacker could request a file protected by a route based guard using a non canonical path form that misses the guarded route yet resolves back onto the protected file, disclosing its contents. Applications that protect a subtree of the static root with a route based guard are affected, while applications relying on the allowedPath option are not. This is fixed in @fastify/static 10.1.3, which canonicalizes the pathname, including rejecting backslashes, on the path used for routing and serving.
AnalysisAI
Route guard bypass in @fastify/static before 10.1.3 exposes protected static files to unauthenticated remote attackers without requiring any credentials. The plugin failed to canonicalize non-standard path forms - including dot segments, duplicate slashes, percent-encoded dots, and backslashes - before matching the request path against route-based guards, allowing crafted URLs to evade the guard while the underlying send layer resolves and serves the protected file. This is an incomplete fix for a prior vulnerability in the same component; no public exploit identified at time of analysis, though the technique is a textbook path normalization bypass requiring no advanced skills.
Technical ContextAI
The vulnerability is rooted in CWE-22 (Path Traversal) and specifically in a path canonicalization gap between two processing layers: the Fastify route-matching layer and the send file-serving library. @fastify/static is the official static file plugin for the Fastify Node.js web framework; it delegates actual file serving to the send library. The previous incomplete fix rejected parent-directory segments (../) but did not normalize dot segments (.), duplicate slashes (//), percent-encoded dots (%2E), or Windows-style backslashes before route matching. Because the HTTP routing layer and the filesystem resolver handle these non-canonical forms differently, a crafted URL can appear as a distinct, unguarded path to the route matcher while resolving identically to the protected file on disk. The CPE (cpe:2.3:a:@fastify/static:@fastify/static:*:*:*:*:*:*:*:*) covers all versions prior to the fix. Version 10.1.3 addresses this by applying full pathname canonicalization - including explicit backslash rejection - before both routing and send delegation.
RemediationAI
Upgrade @fastify/static to version 10.1.3 or later, which canonicalizes request pathnames - including backslash rejection - before both route matching and file serving, closing the guard bypass entirely. The vendor advisory at https://github.com/fastify/fastify-static/security/advisories/GHSA-423g-23ch-w7c6 confirms this as the authoritative fix. If immediate patching is not feasible, migrate route-based guards to the allowedPath option, which the vendor explicitly identifies as not affected by this vulnerability; note that allowedPath operates on resolved file paths rather than URL routes and may require application logic adjustments to replicate the same access policy. As an additional compensating control, configure an ingress reverse proxy (nginx, Caddy) to normalize request paths before forwarding to Fastify, or deploy a WAF rule that rejects requests containing percent-encoded dots (%2E), double slashes, or backslashes - both approaches have low side-effect risk for most applications but add operational complexity and should not replace patching.
More in Fastify Static
View allA redirect vulnerability in the `fastify-static` module version >= 4.2.4 and < 4.4.1 allows remote attackers to redirect
A redirect vulnerability in the fastify-static module version < 4.2.4 allows remote attackers to redirect users to arbit
Path-traversal-based middleware bypass in @fastify/static versions up to and including 10.1.0 lets an unauthenticated re
Route guard bypass in @fastify/static 8.0.0-9.1.0 exposes files protected by Fastify path-based middleware to unauthenti
Path-based access control in @fastify/static is defeated by non-canonical URL paths, allowing unauthenticated attackers
Path traversal in @fastify/static 8.0.0-9.1.0 allows unauthenticated remote attackers to obtain directory listings for a
Same weakness CWE-22 – Path Traversal
View allSame technique Path Traversal
View allVendor StatusVendor
Share
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-54086