Skip to main content

@fastify/static CVE-2026-6414

| EUVDEUVD-2026-23227 MEDIUM
Improper Handling of URL Encoding (Hex Encoding) (CWE-177)
2026-04-16 openjs GHSA-x428-ghpx-8j92
5.9
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify Fastify app serving guarded static files
  2. Delivery
    Craft URL with %2F-encoded path separator
  3. Exploit
    Route guard fails to match encoded URL pattern
  4. Execution
    @fastify/static decodes %2F and resolves filesystem path
  5. Impact
    Server 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

@fastify/static 8.0.0 <9.1.1

Affected Packages

npm @fastify/static fix: 9.1.1
euvd fastify_static fix: 9.1.1

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

NVD PRIMARY 5.9 MEDIUM
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
vuln.today AI 5.9 MEDIUM

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.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
4.0 AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
Red Hat 5.9 MEDIUM

Primary rating from NVD.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

Lifecycle Timeline

3
Patch released
Apr 23, 2026 - 19:41 nvd
Patch available
Patch available
Apr 16, 2026 - 14:02 EUVD
CVE Published
Apr 16, 2026 - 13:09 nvd
MEDIUM 5.9

DescriptionCVE.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
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 2 npm packages depend on @fastify/static (2 direct, 0 indirect)

Ecosystem-wide dependent count for version 8.0.0.

Threat Intelligence Overview

EPSS Score
0.0%
Top 99% exploitable
Prevalence
Low
niche Node.js Fastify ecosystem static-file plugin
Threat Intel
1
1 source
Social Media
3
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor CIRCL GitHub

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy