Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify Fastify app serving guarded static files
-
DeliveryCraft URL with %2F-encoded path separator
-
ExploitRoute guard fails to match encoded URL pattern
-
Execution@fastify/static decodes %2F and resolves filesystem path
-
ImpactServer returns protected file contents to attacker
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization URL encoding handling
|
| Exploitation Conditions | The vulnerable application must use @fastify/static version 8.0.0-9.1.0 and must rely on Fastify route-based middleware or route guards registered at a specific path prefix as the primary or sole access control mechanism for files served by the plugin. The bypass requires that the attacker construct a URL containing a percent-encoded path separator (%2F or %2f) at a position where the encoding causes the guard's pattern to not match. AC:H (high attack complexity per CVSS) reflects this specificity: the attacker must know the protected path structure and which files are gated by route guards. Applications where authentication is enforced globally via Fastify hooks (onRequest/preHandler) applied to all routes, or where session/JWT checks happen outside the route-guard layer, are not bypassed by this technique. Non-default configuration is required: serving sensitive files via @fastify/static behind path-prefix guards is the deployment pattern that creates the exposure. |
| Impact | CVSS 5.9 with vector AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N characterizes this as network-exploitable without authentication but requiring specific conditions (AC:H), with high confidentiality impact and no integrity or availability consequences. EPSS at 0.01% (1st percentile) places exploitation probability extremely low, consistent with SSVC's Exploitation: none and Automatable: no ratings. The AC:H assessment is well-grounded: the bypass only matters when route-based guards are the sole access control layer - applications using session authentication, JWT checks, or global auth middleware are not meaningfully exposed. CISA KEV absence and SSVC Technical Impact: partial together suggest this is a real but narrow architectural flaw rather than a broadly critical one. The vulnerability should be prioritized in applications where @fastify/static route guards are the primary or only authorization mechanism for sensitive file paths; in such deployments the real-world risk is substantially higher than the 5.9 base score implies. No conflicting signals between data sources. |
| Exploit ScenarioDerived | An attacker targeting a Fastify application that serves sensitive files via @fastify/static with a route guard on /private/ sends a crafted GET request to /private%2Fsecret.txt. Fastify's router evaluates the raw string /private%2Fsecret.txt, which does not match the guard's /private/ pattern, so the middleware is skipped entirely. @fastify/static then decodes %2F to a literal slash, resolves /private/secret.txt on the filesystem, and returns the file contents to the unauthenticated attacker. No public exploit code has been identified at time of analysis, but a proof-of-concept for the analogous @fastify/middie issue is published in GHSA-cxrg-g7r8-w69p. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 24, 2026
Route guard bypass in @fastify/static 8.0.0-9.1.0 exposes files protected by Fastify path-based middleware to unauthenticated remote attackers via percent-encoded path separators. The plugin decodes %2F in URLs before filesystem path resolution, while Fastify's router evaluates the raw encoded string - guards checking for a path like /protected/ never fire when the request arrives as /protected%2F, yet @fastify/static serves the file anyway. No public exploit is identified at time of analysis and EPSS is 0.01%, but confidentiality impact is rated High when route guards are the sole access control layer.
RemediationAI
Vendor-released patch: @fastify/static 9.1.1. Upgrade immediately via npm install @fastify/static@9.1.1 or yarn add @fastify/static@9.1.1. The vendor advisory at https://github.com/fastify/fastify-static/security/advisories/GHSA-x428-ghpx-8j92 explicitly states there are no workarounds for this issue, so upgrading is the only remediation path. Additionally, if the application uses @fastify/middie, upgrade it to 9.1.0 or later per GHSA-cxrg-g7r8-w69p (patch commit d44cd56eb724490babf7b452fdbbdd37ea2effba, PR #245). Until patching is possible, deployers should add a defense-in-depth layer: move authorization checks out of route guards and into Fastify hooks (onRequest or preHandler) that normalize the URL before pattern matching, though this is an architectural change with non-trivial development effort and does not replace the vendor fix.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in npm, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
CWE-177 (Improper Neutralization of URL Encoding) describes the root cause: a security decision is made on a URL before normalization completes, leaving a gap exploitable through encoding tricks. In @fastify/static, the affected decode/check ordering means percent-encoded path separators (%2F) are resolved by the plugin into literal forward slashes before the filesystem lookup, while Fastify's internal router - which drives middleware and route-guard matching - never decodes those characters and therefore does not recognize the path as matching a protected route pattern. The related advisory GHSA-cxrg-g7r8-w69p for @fastify/middie exposes the same architectural mismatch: middie matches regex patterns against raw req.url, so %61dmin bypasses a /admin guard while Fastify's decoder still resolves the route handler correctly. Both issues stem from Fastify's consistent choice to pass undecoded URLs to middleware matchers while the underlying plugins decode separately. Affected CPE: cpe:2.3:a:@fastify/static:@fastify/static:*:*:*:*:*:*:*:* for versions 8.0.0 through 9.1.0.
Know when Fastify Static gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
Network-exploitable without authentication but AC:H because exploitation requires route-guard-only authorization architecture; C:H for protected file disclosure; no I/A impact applies.
Primary rating from NVD.
CVSS VectorNVD
Lifecycle Timeline
3DescriptionCVE.org
@fastify/static versions 8.0.0 through 9.1.0 decode percent-encoded path separators (%2F) before filesystem resolution, while Fastify's router treats them as literal characters. This mismatch allows attackers to bypass route-based middleware or guards that protect files served by @fastify/static. For example, a route guard on a protected path can be circumvented by encoding the path separator in the URL. Upgrade to @fastify/static 9.1.1 to fix this issue. There are no workarounds.
Blast Radius
ecosystem impact- 2 npm packages depend on @fastify/static (2 direct, 0 indirect)
Ecosystem-wide dependent count for version 8.0.0.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
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 before 10.1.3 exposes protected static files to unauthenticated remote attackers w
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
Authorization bypass in @fastify/static before 10.1.4 lets an unauthenticated remote attacker read files that a route gu
EUVD-2026-23227
GHSA-x428-ghpx-8j92
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB