Skip to main content

@fastify/middie CVE-2026-132131

| EUVDEUVD-2026-129786 HIGH
Improper Validation of Specified Type of Input (CWE-1287)
2026-11-19 openjs
7.4
CVSS 3.1 · Vendor: openjs
View

Attack ChainAIDerived

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

  1. Access
    Identify route behind array-mounted security middleware
  2. Exploit
    Send request to subroute of trailing-slash mount
  3. Execution
    Mount regex fails to match, middleware skipped
  4. Impact
    Fastify dispatches to protected handler unauthenticated

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V2 - Validation and Business Logic Specified type validation
Exploitation Conditions

Exploitation requires the target application to mount path-scoped middleware via @fastify/middie's use() using an ARRAY of mount paths in which at least one element either ends with a trailing slash (e.g. '/secret/', including a slash introduced by joining a plugin prefix that ends in '/') or is exactly '/' (a catch-all mount). Only subroutes of such an element are affected: the generated route-matching regex fails to match them, so the path-scoped middleware (authentication, authorization, or rate limiting) is skipped while Fastify's router still dispatches to the handler. Limiting factors: applications that mount security middleware on single string paths, or on array elements without a trailing slash, are not affected; the bug does not require attacker authentication (PR:N) or user interaction, but it does require this specific, non-default array-with-trailing-slash (or root) mount pattern to be present - which is why real-world exposure is narrow despite the network-facing unauthenticated nature.

Impact

This is a genuine access-control bypass (CWE-1287 type confusion) rather than a theoretical high-CVSS issue, but its real-world severity is strongly gated by a configuration precondition. The supplied CVSS 3.1 vector (AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N = 7.4) is internally consistent: network-reachable and unauthenticated (PR:N), with high confidentiality and integrity impact because skipped auth/authz/rate-limiting middleware exposes protected handlers, and AC:H correctly reflects that the flaw only manifests when the application mounts middleware on an array of paths where an element has a trailing slash (including a plugin prefix ending in '/') or is exactly '/'. No EPSS score was supplied, the input shows no CISA KEV listing, and no PoC/exploit reference is present - only the GHSA advisory and the openJS CNA page - so this is 'no public exploit identified at time of analysis.' The vuln.today Decision label is this_week, not act_now/emergency, which aligns with a serious-but-conditional authorization bypass whose exploitability depends on vulnerable code patterns being present. The main caveat to flag: AC:H here encodes a deployment/coding precondition, not an attacker-side race or timing condition - defenders should treat exposure as binary (either you use array mount paths with a trailing-slash/root element for security middleware, or you do not) rather than as a probabilistic difficulty.

Exploit ScenarioDerived

An application uses @fastify/middie's use() to mount security middleware (authentication/authorization/rate limiting) on an array of mount paths where an element carries a trailing slash - e.g. ['/secret/'] or a path joined to a plugin prefix ending in '/', or an element of exactly '/'. Because the internal sanitizePrefixUrl helper only handles strings and passes arrays through unchanged, the trailing slash survives into the route-matching regex (or the '/' catch-all is dropped), so a request to a subroute such as /secret/data fails to match the middleware and is dispatched straight to the handler. An unauthenticated remote client thereby reaches protected routes; no public exploit code is referenced, and the fixed configuration-dependent trigger (not attacker-controlled) is reflected by AC:H.

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

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

Alert me

AnalysisAIv1 – Nov 19, 2026

Path-scoped middleware bypass in @fastify/middie 8.3.0 through 9.3.6 allows an unauthenticated remote client to reach routes that should be gated by authentication, authorization, or rate limiting when an application mounts middleware using an array of mount paths containing a trailing-slash element (for example '/secret/', including a slash introduced by a plugin prefix) or an element that is exactly '/'. The mount-path normalization helper is written for strings, so array input passes through unnormalized, the compiled route-matching regex fails to match subroutes such as '/secret/data', and the middleware is skipped while Fastify's router still dispatches the request to the handler. The flaw is fixed in 9.3.7; no public exploit code or confirmed active exploitation was identified at time of analysis, and real-world exposure is narrow because it depends on that specific non-default array mount pattern being present.

RemediationAI

Vendor-released patch: upgrade @fastify/middie to 9.3.7 or later (fixed in 9.3.7; vulnerable range >= 8.3.0, < 9.3.7), as documented in GHSA-hfwp-44m5-9364 (https://github.com/fastify/middie/security/advisories/GHSA-hfwp-44m5-9364) and the OpenJS CNA advisory index (https://cna.openjsf.org/security-advisories.html). Where upgrading cannot be done immediately, the advisory's workaround is to enforce authorization in a Fastify hook such as preHandler that runs after the router has resolved the request - note this duplicates policy outside the middie-mounted middleware, so the hook must be maintained in parallel and any middleware-only protections (for example rate limiting) remain unenforced on the affected subroutes; the advisory also advises avoiding array mount paths with a trailing-slash element for security-relevant middleware, which means restructuring route registration to use a normalized single string path or slash-free array elements.

Affected VersionsENISA

@fastify/middie 8.3.0 <9.3.7

Affected Packages

euvd fastify_middie fix: 9.3.7

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

CVE-2026-132131 is an input-type validation weakness (CWE-1287, improper validation of specified type of input) in @fastify/middie, the plugin that layers Express/Connect-style middleware support onto the Fastify web framework. The plugin's use() method accepts either a single string mount path or an array of mount paths, but it forwards the value to the internal sanitizePrefixUrl helper, whose string operations are only meaningful for string input; when handed an array, normalization silently has no effect. Two consequences follow at route-matching regex compilation time: a trailing slash on an array element survives into the generated regular expression, and an element equal to '/' (a catch-all mount) is dropped entirely. The resulting regex no longer matches subroutes beneath the intended mount, so the path-scoped middleware never runs on those requests even though Fastify's router resolves and dispatches them normally - an access-control gap rather than a memory-safety issue. Per the authoritative assessment the trigger requires the array-with-trailing-slash (or root-element) mount pattern; the assessed vector is AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N, reflecting network reachability without attacker authentication but a high attack-complexity precondition tied to that configuration.

Know when Fastify Middie 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 7.4 HIGH
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
vuln.today AI 7.4 HIGH

Network-reachable and unauthenticated (AV:N/PR:N/UI:N); AC:H because the bypass only occurs under a specific array mount-path/trailing-slash configuration; skipped auth exposes protected routes (C:H/I:H), no availability impact.

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

Primary rating from Vendor (openjs).

CVSS VectorVendor: openjs

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

Lifecycle Timeline

2
Patch available
Nov 19, 2026 - 13:02 EUVD
CVE Published
Nov 19, 2026 - 11:33 cve.org
HIGH 7.4

DescriptionCVE.org

@fastify/middie is the middleware engine that adds Express and Connect style middleware support to Fastify. In versions 8.3.0 through 9.3.6, the internal helper that normalizes a path-scoped middleware's mount path only handles string inputs, but the use method also accepts an array of mount paths and passes it through unchanged, so the normalization silently does nothing. As a result, a trailing slash on an array element survives into the generated route-matching regular expression, and an element that is exactly the root path, meaning a catch-all mount, is dropped entirely. Requests to subroutes of the affected mount paths then skip the path-scoped middleware, such as authentication, authorization, or rate limiting, while Fastify's router still dispatches them to the handler, allowing an unauthenticated client to reach protected routes. Applications are affected when they mount middleware on an array of paths in which an element ends with a slash, including one introduced by a plugin prefix that ends with a slash, or is exactly the root path. The issue is fixed in @fastify/middie 9.3.7, and users should upgrade to 9.3.7 or later. As a workaround, enforce authorization in a Fastify hook such as preHandler that runs after routing, and avoid array mount paths with a trailing slash element for security relevant middleware.

Technical POC Analysis

CWE-1287, Improper Validation of Specified Type of Input (type confusion between a string and an array of strings).

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

A high-severity vulnerability in the @fastify/middie middleware library (versions 8.3.0 through 9.3.6) allows unauthenticated attackers to bypass authentication, authorization, and rate-limiting controls on certain routes, potentially exposing sensitive data or functionality. Applications that mount middleware using an array of mount paths with a trailing slash or root path are at risk, though exposure is limited to configurations using that non-default pattern. Leadership should prioritize remediation because a bypass could enable unauthorized access to protected endpoints, undermining access controls and increasing the risk of data breaches or service abuse.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.5%
Top 56% exploitable
Prevalence
Medium
popular Fastify middleware adapter, but narrower footprint than Fastify core
Data Quality
6 sources
Confidence: High

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.5%
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
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

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

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

CVE-2026-133250 CRITICAL
9.1 Nov 21

Path-scoped middleware bypass in @fastify/middie through 9.3.7 lets unauthenticated remote clients reach route handlers

CVE-2026-85184 CRITICAL
9.1 Sep 04

Path-based access-control bypass in @fastify/middie (Fastify's Express-style middleware engine) versions 9.1.0 through 9

CVE-2026-112712 CRITICAL
9.1 Oct 20

Authentication, authorization, and rate-limiting middleware bypass in @fastify/middie 9.0.0 through 9.3.5 can let a sing

CVE-2026-6270 CRITICAL
9.1 Apr 16

Authentication bypass in @fastify/middie 9.3.1 and earlier lets unauthenticated attackers reach protected routes because

CVE-2026-14198 CRITICAL
9.1 Jul 01

Authentication and authorization bypass in @fastify/middie 9.1.0 through 9.3.2 lets remote unauthenticated attackers rea

CVE-2026-22031 HIGH
8.4 Jan 19

Middleware path-matching bypass in @fastify/middie before version 9.1.0 allows authenticated attackers to access protect

CVE-2026-2880 HIGH
8.2 Feb 27

Authentication and authorization bypass in @fastify/middie (Node.js middleware library for Fastify) allows remote unauth

CVE-2026-14181 HIGH
7.5 Jul 01

Denial of service in @fastify/middie 9.1.0 through 9.3.2 lets remote unauthenticated attackers crash the Node.js process

CVE-2026-132128 HIGH
7.4 Nov 19

Path-scoped middleware bypass in @fastify/middie up to and including 9.3.6 lets an unauthenticated client reach a protec

CVE-2026-33804 HIGH
7.4 Apr 16

Authentication and authorization bypass in @fastify/middie 9.3.1 and earlier lets remote unauthenticated attackers reach

CVE-2026-132133 MEDIUM
4.8 Nov 19

Path-scoped authentication, authorization, or rate-limiting middleware registered through @fastify/middie 9.3.6 and earl

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