Skip to main content

@fastify/static EUVDEUVD-2026-47870

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

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

2
Patch available
Jul 23, 2026 - 05:17 EUVD
Analysis Generated
Jul 23, 2026 - 04:00 vuln.today

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 27 npm packages depend on @fastify/static (18 direct, 9 indirect)

Ecosystem-wide dependent count for version 10.1.2.

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.

AnalysisAI

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.

Technical ContextAI

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.

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.

Share

EUVD-2026-47870 vulnerability details – vuln.today

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