@fastify/middie CVE-2026-2880
HIGHAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconReconnaissance: Identify Fastify framework via HTTP headers/fingerprints
-
DeliveryPath discovery: Enumerate protected endpoints with middleware guards
-
ExploitCraft payload: Generate duplicate-slash or semicolon-delimited URL variants
-
InstallSend HTTP request: Submit crafted path to bypass middleware check
-
C2Route normalization: Fastify router normalizes path post-middleware
-
ExecuteExecute handler: Access protected endpoint without authentication
-
ImpactExfiltrate data or escalate privileges
Vulnerability Assessment
| Weakness |
CWE
|
| Exploitation Conditions | Requires Fastify applications using @fastify/middie for path-scoped middleware (app.use('/path', middleware)) AND Fastify router configured with at least one normalization option enabled: ignoreDuplicateSlashes (allows //path to match /path), useSemicolonDelimiter (treats semicolons as path delimiters), or trailing-slash normalization settings. Specifically affects deployments where authentication or authorization middleware is applied via path prefix matching rather than route-level hooks. Does NOT affect Fastify applications without @fastify/middie, or those using route-level security controls (onRequest/preHandler hooks), or those with all router normalization options disabled. Attack vector is network-based (AV:N) with low complexity (AC:L) against default @fastify/middie configurations when router normalization is enabled, but attack conditions are present (AT:P) due to specific deployment architecture requirement. |
| Impact | Real-world risk is CRITICAL for affected deployments. CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:N/UI:N) indicates network-exploitable attack with low complexity but present attack conditions (AT:P) and no authentication required. High integrity impact (VI:H) reflects unauthorized access to protected resources. Confirmed actively exploited per CISA KEV listing, demonstrating real-world weaponization. However, EPSS score of 0.17% (38th percentile) is notably low despite KEV status, suggesting targeted rather than widespread opportunistic exploitation - likely attackers are focusing on known deployments with public Fastify footprints. Attack conditions are specific: requires Fastify applications using BOTH path-scoped @fastify/middie middleware for auth/authz AND router normalization options enabled. This configuration subset explains the EPSS/KEV divergence. Not automatable at scale (requires reconnaissance to identify Fastify+middie deployments), but trivial to exploit once target is identified (simple path crafting). Priority is IMMEDIATE for organizations using @fastify/middie with path-based security controls, MEDIUM for Fastify users without middie, DEFER for non-Fastify environments. |
| Exploit ScenarioDerived | Attacker identifies a Fastify application using @fastify/middie version <9.2.0 with path-scoped authentication middleware protecting /admin endpoints (app.use('/admin', authMiddleware)). Attacker crafts HTTP request with duplicated slashes (GET //admin/users) or semicolon delimiter (GET /admin;x=y/users). The @fastify/middie middleware evaluates the raw path and fails to match '/admin' prefix, skipping authentication. Fastify's find-my-way router then normalizes the path to /admin/users and successfully routes to the protected handler. Attacker gains unauthorized access to administrative functionality without credentials. Publicly available exploit code exists per GitHub security advisory and patch commit analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – May 14, 2026
Authentication and authorization bypass in @fastify/middie (Node.js middleware library for Fastify) allows remote unauthenticated attackers to access protected endpoints by exploiting path normalization inconsistencies. When Fastify router normalization options (ignoreDuplicateSlashes, useSemicolonDelimiter, trailing-slash handling) are enabled, crafted URL paths bypass path-scoped middleware checks while still routing to protected handlers. Confirmed actively exploited (CISA KEV). Patch available in version 9.2.0. EPSS score of 0.17% (38th percentile) suggests limited widespread exploitation despite active use, likely indicating targeted attacks against known vulnerable deployments.
Earlier versions of this analysis (1)
A vulnerability in @fastify/middie versions < 9.2.0 can result in authentication/authorization bypass when using path-scoped middleware (for example, app.use('/secret', auth)).
RemediationAI
Upgrade @fastify/middie to version 9.2.0 or later (npm update @fastify/middie) as released by vendor. Patch commit available at https://github.com/fastify/middie/commit/140e0dd0359d890fec7e6ea1dcc5134d6bd554d4 and vendor advisory at https://github.com/fastify/middie/security/advisories/GHSA-8p85-9qpw-fwgw. If immediate upgrade is not feasible, implement compensating controls: (1) Move authentication and authorization logic from path-scoped middie middleware (app.use('/prefix', auth)) to route-level Fastify hooks (onRequest, preHandler) which execute after router normalization, ensuring consistent path evaluation - trade-off is code refactoring effort but eliminates bypass vector entirely. (2) Disable Fastify router normalization options (ignoreDuplicateSlashes, useSemicolonDelimiter, trailing slash handling) if not operationally required - trade-off is potential breakage of existing API contracts that rely on path normalization tolerance. (3) Deploy additional perimeter controls like web application firewall rules to block URLs with duplicate slashes or semicolons targeting protected paths - trade-off is maintenance overhead and potential false positives. Vendor explicitly recommends against relying solely on path-scoped middie guards for security boundaries until patched.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability stems from canonicalization drift between @fastify/middie's path matching logic for app.use('/prefix', middleware) and Fastify's find-my-way router normalization. When router options like ignoreDuplicateSlashes or useSemicolonDelimiter are enabled, the middleware layer evaluates a different normalized path than the routing layer. This is a classic CWE-20 (Improper Input Validation) issue where inconsistent path parsing across security boundaries creates a bypass opportunity. The affected package is the official Fastify middleware adapter for Express/Connect-style middleware (npm package @fastify/middie for Node.js, CPE: cpe:2.3:a:fastify:fastify/middie:*:*:*:*:*:node.js:*:*), which enables Express middleware compatibility in Fastify applications.
Know when Fastify 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
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
Primary rating from NVD · only source for this CVE.
CVSS VectorNVD
Lifecycle Timeline
4DescriptionCVE.org
A vulnerability in @fastify/middie versions < 9.2.0 can result in authentication/authorization bypass when using path-scoped middleware (for example, app.use('/secret', auth)).
When Fastify router normalization options are enabled (such as ignoreDuplicateSlashes, useSemicolonDelimiter, and related trailing-slash behavior), crafted request paths may bypass middleware checks while still being routed to protected handlers.
Blast Radius
ecosystem impact- 2 npm packages depend on @fastify/middie (1 direct, 1 indirect)
Ecosystem-wide dependent count for version 9.2.0.
Executive ViewAI
A critical authentication bypass vulnerability in @fastify/middie allows unauthenticated attackers to directly access protected endpoints by manipulating URL paths, exploiting inconsistencies between Fastify's routing normalization and middleware security checks. Organizations using Fastify with path-scoped middleware protection are at immediate risk of unauthorized data access and API manipulation, particularly if middleware relies on path-based access controls.
Apply vendor patch. If immediate patching is not feasible, implement a Web Application Firewall (WAF) rule to block requests with path normalization patterns (duplicate slashes, semicolons in URLs) before they reach Fastify; disable Fastify router normalization options (ignoreDuplicateSlashes, useSemicolonDelimiter, requestIdLogLabel) to enforce strict path matching until patch is applied; conduct immediate access log review for indicators of bypass attempts.
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.
Affected Products (CPE)CVE.org
All versions of @fastify/oauth2 used a statically generated state parameter at startup time and were used across all req
A redirect vulnerability in the `fastify-static` module version >= 4.2.4 and < 4.4.1 allows remote attackers to redirect
Fastify is a fast and low overhead web framework, for Node.js. Rated high severity (CVSS 7.5), this vulnerability is rem
Prototype pollution vulnerability in fastify-multipart < 1.0.5 allows an attacker to crash fastify applications parsing
Fastify node module before 0.38.0 is vulnerable to a denial-of-service attack by sending a request with "Content-Type: a
A denial of service vulnerability exists in Fastify v2.14.1 and v3.0.0-rc.4 that allows a malicious user to trigger reso
A redirect vulnerability in the fastify-static module version < 4.2.4 allows remote attackers to redirect users to arbit
Authorization bypass in the @fastify/express middleware-compatibility plugin (versions 4.0.6 and earlier) lets unauthent
Authentication bypass in @fastify/express v4.0.4 and earlier allows remote unauthenticated attackers to access protected
Middleware bypass in Fastify Express plugin (fastify/express) allows complete circumvention of authentication, authoriza
Fastify is a web framework with minimal overhead and plugin architecture. Rated high severity (CVSS 8.8), this vulnerabi
Schema authorization bypass in Fastify before 5.12.2 allows an authenticated low-privilege attacker to substitute an arb
GHSA-8p85-9qpw-fwgw
NVD
CVE.org
EPSS
Exploit-DB