Skip to main content

@fastify/middie CVE-2026-2880

HIGH
Improper Input Validation (CWE-20)
2026-02-27 ce714d77-add3-4f53-aff5-83d477b104bb GHSA-8p85-9qpw-fwgw
8.2
CVSS 4.0 · NVD
View

Attack ChainAIDerived

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

  1. Recon
    Reconnaissance: Identify Fastify framework via HTTP headers/fingerprints
  2. Delivery
    Path discovery: Enumerate protected endpoints with middleware guards
  3. Exploit
    Craft payload: Generate duplicate-slash or semicolon-delimited URL variants
  4. Install
    Send HTTP request: Submit crafted path to bypass middleware check
  5. C2
    Route normalization: Fastify router normalizes path post-middleware
  6. Execute
    Execute handler: Access protected endpoint without authentication
  7. Impact
    Exfiltrate 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

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

Alert me

AnalysisAIv2 – 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)
v1 Mar 12, 2026 - 21:55

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

npm @fastify/middie fix: 9.2.0

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

NVD PRIMARY 8.2 HIGH
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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
High
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

4
Analysis Updated
May 14, 2026 - 15:57 vuln.today
v2 - CVSS changed
CVSS changed
May 14, 2026 - 15:52 NVD
8.2 (HIGH)
Patch released
Mar 31, 2026 - 21:13 nvd
Patch available
CVE Published
Feb 27, 2026 - 19:16 nvd
N/A

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

Ecosystem-wide dependent count for version 9.2.0.

Executive ViewAI

Why It Matters

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.

Business Impact: High
Compensating 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

EPSS Score
0.2%
Top 62% exploitable
Data Quality
4 sources
Confidence: Medium

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 HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

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

Affected Products (CPE)CVE.org

cpe:2.3:a:fastify:fastify\/middie:*:*:*:*:*:node.js:*:*
CVE-2023-31999 HIGH POC
8.8 Jul 04

All versions of @fastify/oauth2 used a statically generated state parameter at startup time and were used across all req

CVE-2021-22964 HIGH POC
8.8 Oct 14

A redirect vulnerability in the `fastify-static` module version >= 4.2.4 and < 4.4.1 allows remote attackers to redirect

CVE-2025-32442 HIGH POC
7.5 Apr 18

Fastify is a fast and low overhead web framework, for Node.js. Rated high severity (CVSS 7.5), this vulnerability is rem

CVE-2020-8136 HIGH POC
7.5 Mar 20

Prototype pollution vulnerability in fastify-multipart < 1.0.5 allows an attacker to crash fastify applications parsing

CVE-2018-3711 HIGH POC
7.5 Jun 07

Fastify node module before 0.38.0 is vulnerable to a denial-of-service attack by sending a request with "Content-Type: a

CVE-2020-8192 MEDIUM POC
6.5 Jul 30

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

CVE-2021-22963 MEDIUM POC
6.1 Oct 14

A redirect vulnerability in the fastify-static module version < 4.2.4 allows remote attackers to redirect users to arbit

CVE-2026-6556 CRITICAL
9.1 Jun 30

Authorization bypass in the @fastify/express middleware-compatibility plugin (versions 4.0.6 and earlier) lets unauthent

CVE-2026-33808 CRITICAL
9.1 Apr 15

Authentication bypass in @fastify/express v4.0.4 and earlier allows remote unauthenticated attackers to access protected

CVE-2026-33807 CRITICAL
9.1 Apr 15

Middleware bypass in Fastify Express plugin (fastify/express) allows complete circumvention of authentication, authoriza

CVE-2022-41919 HIGH
8.8 Nov 22

Fastify is a web framework with minimal overhead and plugin architecture. Rated high severity (CVSS 8.8), this vulnerabi

CVE-2026-84504 HIGH
8.1 Sep 04

Schema authorization bypass in Fastify before 5.12.2 allows an authenticated low-privilege attacker to substitute an arb

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