Skip to main content

@fastify/static CVE-2026-7120

| EUVDEUVD-2026-47870 MEDIUM
Incorrect Behavior Order: Validate Before Canonicalize (CWE-180)
2026-07-23 openjs GHSA-8pvw-jcv7-9cmj
5.3
CVSS 3.1 · Vendor: openjs
View

Attack ChainAIDerived

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

  1. Access
    Send HTTP request with non-canonical path
  2. Delivery
    allowedPath callback evaluates un-normalized input
  3. Exploit
    Deny rule fails to match crafted path
  4. Execution
    Plugin normalizes path for file resolution
  5. Impact
    Restricted file within static root is served to attacker

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Leading special element handling
Exploitation Conditions

Exploitation requires three concrete conditions: (1) the target application uses @fastify/static version 10.1.1 or earlier; (2) the application configures an allowedPath callback to restrict access to specific files or directories within the static root; and (3) the attacker can reach the Fastify HTTP endpoint over the network. No authentication is required, as confirmed by PR:N in the CVSS vector. What limits the impact is that the bypass does not enable path traversal outside the configured static root - only files already within the root that allowedPath was intended to hide are accessible. Applications that do not use the allowedPath callback at all are not affected. Applications that place no sensitive content within the static root gain no practical exposure even if vulnerable.

Impact

The CVSS 3.1 base score of 5.3 (Medium) with vector AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N accurately reflects the bounded nature of this flaw. The network attack vector and zero-privilege requirement mean any internet-facing or intranet-accessible Fastify application using allowedPath for access control is immediately in scope. However, the scope is unchanged (S:U) and confidentiality impact is Low (C:L) because an attacker cannot escape the static root - only files within it that allowedPath was meant to restrict become accessible. Real-world risk is therefore highly contingent on deployment context: if developers rely on allowedPath as a security boundary to hide sensitive files (e.g., configuration snippets, internal docs, or environment-specific assets) within the static root, this is a meaningful information disclosure risk. If allowedPath is used only for non-security purposes (e.g., cosmetic routing), risk is negligible. No EPSS data was provided in the intelligence feed. No KEV listing exists, and no public exploit code has been identified. SSVC signals point to a narrow technical impact with no confirmed exploitation - this is a real but bounded vulnerability requiring patch prioritization rather than emergency response.

Exploit ScenarioDerived

An attacker identifies a Fastify application serving static files where the allowedPath callback denies access to a path such as '/internal/config.html'. The attacker crafts a request to '//internal/config.html' or '/./internal/config.html', which the allowedPath callback does not match against its deny rule because the pattern comparison fails on the non-canonical form. The file resolver normalizes the path and serves the file as if the request were fully legitimate. No authentication or prior reconnaissance beyond knowing (or guessing) the restricted path is required.

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

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

Alert me

AnalysisAIv1 – Jul 23, 2026

Path-based access control in @fastify/static is defeated by non-canonical URL paths, allowing unauthenticated attackers to retrieve files that the allowedPath callback was configured to deny. Affected are all versions through 10.1.1 of the plugin for the Fastify Node.js framework. Because the allowedPath callback receives the raw, un-normalized pathname - before dot segments and duplicate separators are resolved - an attacker can craft equivalent paths (e.g., using './' sequences or '//' separators) that bypass the callback's deny logic while the underlying file resolver still serves the intended file. No public exploit has been identified at time of analysis, and active exploitation has not been confirmed.

RemediationAI

The primary fix is to upgrade @fastify/static to version 10.1.2 or later, which patches the ordering flaw by normalizing dot segments and duplicate path separators before invoking the allowedPath callback. The advisory is at https://github.com/fastify/fastify-static/security/advisories/GHSA-8pvw-jcv7-9cmj. For applications that cannot immediately upgrade, a compensating control is to implement path normalization within the allowedPath callback itself - callers can normalize the incoming path argument using Node.js's path.posix.normalize() or the URL API before applying any deny logic. A trade-off is that this requires application-layer changes and must be applied consistently across all allowedPath usages to avoid gaps. Additionally, operators should audit whether any files within the static root that are restricted via allowedPath are genuinely sensitive; if so, they should be moved outside the static root entirely as defense in depth, since static root membership is the only remaining effective boundary until patched.

Affected VersionsENISA

@fastify/static 0 <10.1.2

Affected Packages

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

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

The @fastify/static plugin (cpe:2.3:a:@fastify/static:@fastify/static:*:*:*:*:*:*:*:*) is the official static file serving plugin for the Fastify Node.js web framework. It exposes an allowedPath callback hook that application developers use to restrict which files within the configured static root may be served. The root cause is CWE-180: validation is performed before canonicalization. Specifically, the plugin passes the raw URL pathname to the allowedPath callback before resolving dot segments (e.g., '/./file', '/../file' relative sequences) and before collapsing duplicate path separators (e.g., '//file'). The file resolution layer normalizes these inputs afterward, creating a window where a crafted non-canonical path can fool the callback's pattern-matching logic. This is a classic 'validate before canonicalize' ordering flaw. Critically, the bypass is scoped to the allowedPath filter only - it does not enable directory traversal outside the configured static root, so files outside the root remain inaccessible.

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

Vendor (openjs) PRIMARY 5.3 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
vuln.today AI 5.3 MEDIUM

Network-accessible, zero-auth bypass with only low confidentiality impact bounded to the static root; no integrity or availability consequence.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (openjs).

CVSS VectorVendor: openjs

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

Lifecycle Timeline

1
Patch available
Jul 23, 2026 - 05:17 EUVD

DescriptionCVE.org

@fastify/static evaluates the allowedPath callback before normalizing dot segments and duplicate path separators in the pathname used for file resolution. Versions up to and including 10.1.1 are affected. An unauthenticated attacker can bypass allowedPath restrictions by requesting equivalent non-canonical pathnames, causing files that were intended to be denied to be served anyway. The bypass does not allow access outside the configured static root by itself, it defeats path-based filtering only. The issue is patched in @fastify/static 10.1.2.

Threat Intelligence Overview

EPSS Score
0.4%
Top 69% exploitable
Prevalence
Medium
popular Fastify plugin, Node.js ecosystem but not universal
Threat Intel
1
1 sources
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA CIRCL GitHub VulDB

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.4%
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
Yes
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
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.

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