Skip to main content

@fastify/middie CVE-2026-132128

| EUVDEUVD-2026-129780 HIGH
Improper Handling of Case Sensitivity (CWE-178)
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 protected mount path containing 'k'
  2. Delivery
    Encode 'k' as %E2%84%AA (KELVIN SIGN)
  3. Exploit
    Send crafted request to protected route
  4. Execution
    Router folds path, middleware regex misses
  5. Persist
    Auth/rate-limit middleware skipped
  6. Impact
    Reach protected handler unauthenticated

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Case sensitivity handling
Exploitation Conditions

Exploitation requires a specific, non-default deployment: Fastify's router must be configured with caseSensitive:false (the default is case-sensitive, which is not affected), AND a path-scoped middie middleware (authentication, authorization, or rate limiting) must be mounted on a path whose segment contains the ASCII letter 'k' (e.g. /api/keys), AND the application must rely on that path-scoped middleware rather than a post-routing Fastify hook for enforcement. The attacker then substitutes the 'k' with the percent-encoded KELVIN SIGN (%E2%84%AA). Limiting factors: it is inapplicable to any app using the default case-sensitive routing, to mount paths without a 'k', and to apps that enforce authorization in a preHandler hook that runs after routing. No user interaction or authentication is needed once these conditions hold.

Impact

This is a genuine access-control bypass (CWE-178 incomplete case-sensitivity handling, CWE-863 incorrect authorization) rather than a high-CVSS-but-theoretical issue, but its real-world blast radius is tightly scoped by configuration. The CVSS vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N correctly reflects a network, unauthenticated attack (PR:N) with high complexity (AC:H) - the AC:H here is justified not by a race or timing condition (the trigger is fully described and deterministic) but by the compound precondition that the target must run caseSensitive:false AND protect a mount path containing the letter 'k' AND rely on path-scoped middie middleware for enforcement. The vuln.today Decision label is 'this_week', consistent with a serious-but-not-emergency authorization bypass. No EPSS score, no CISA KEV entry, and no SSVC fields were provided in the input, so exploitation probability cannot be quantified from the data; absence of KEV should not be read as proof of non-exploitation, only as unknown. The provided references are the OpenJS/GHSA advisory itself, not a weaponized exploit, so this is best treated as 'no public exploit identified at time of analysis' even though the advisory discloses the exact triggering path (/api/%E2%84%AAeys). Net: a real priority for the narrow population running the vulnerable configuration, lower urgency for the majority who keep the default case-sensitive routing.

Exploit ScenarioDerived

An application uses @fastify/middie (<= 9.3.6) with Fastify configured caseSensitive:false and mounts authentication/authorization middleware on a path containing a 'k', such as /api/keys. An unauthenticated attacker requests /api/%E2%84%AAeys, encoding the 'k' as the Unicode KELVIN SIGN (U+212A); Fastify's Unicode-aware lowercasing folds it to /api/keys and routes to the protected handler, while middie's ASCII-only case-insensitive regex fails to match and skips the auth middleware. No public exploit code is identified in the input, though the advisory discloses the exact payload; AV:N/AC:H means the attack is remote and deterministic but requires the specific vulnerable configuration.

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 up to and including 9.3.6 lets an unauthenticated client reach a protected route handler by spelling a 'k' in the mount path as the percent-encoded Unicode KELVIN SIGN (%E2%84%AA). When Fastify routing is configured with caseSensitive:false, the router lowercases the request path with a Unicode-aware conversion that folds U+212A to ASCII 'k', while middie matches its middleware mount paths with a case-insensitive regular expression that does not fold non-ASCII characters - so the request is routed to the protected handler but the middleware mounted there (authentication, authorization, rate limiting) is skipped. The flaw is only exploitable in a non-default deployment: caseSensitive must be set to false, a path-scoped middie middleware must be mounted on a segment containing the letter 'k' such as /api/keys, and the application must rely on that middleware rather than a post-routing Fastify hook. The package is reported by the OpenJS Foundation and the advisory's fix is the vendor-released patch 9.3.7; no public exploit and no confirmed active exploitation were identified at time of analysis.

RemediationAI

Upgrade @fastify/middie to 9.3.7 or later, the vendor-released patch that makes middie honor the router's caseSensitive setting and aligns its mount-path matching with the router's canonicalization. If upgrading immediately is not possible, the advisory documents two workarounds: keep routing case-sensitive by leaving caseSensitive at its default value of true, which avoids the divergence between middie and the Fastify router entirely and is the lowest-risk option for applications that do not need case-insensitive routing; or enforce authorization in a Fastify hook such as preHandler that runs after the router has resolved the request, so access control no longer depends on middie's mount-path match - though this requires auditing every path-scoped middie middleware to confirm which ones carry security enforcement, since only the ones moved into hooks are covered. Both workarounds are configuration/code changes with the trade-off of either altering routing behavior expected by clients or requiring per-route code changes. Full details are in the GitHub advisory GHSA-r5h5-r25j-5vhr and the OpenJS Foundation security advisory index at https://cna.openjsf.org/security-advisories.html.

Affected VersionsENISA

@fastify/middie 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

Fastify delegates Express/Connect-style middleware support to @fastify/middie, which mounts middleware on URL paths and, in versions <= 9.3.6, does not read routerOptions.caseSensitive from the Fastify router. Instead it matches mount paths with a case-insensitive regular expression that performs only ASCII-style case insensitivity and does not fold non-ASCII codepoints. Fastify's own router, when caseSensitive is false, canonicalizes the incoming request path with JavaScript's toLowerCase(), which is Unicode-aware and maps U+212A KELVIN SIGN to the ASCII letter 'k'. The two layers therefore derive different canonical paths for the same request: /api/%E2%84%AAeys resolves to the /api/keys route handler at the router layer while the middleware mounted at /api/keys never matches. The root causes are CWE-178 (improper handling of case sensitivity) at the parsing/normalization layer and CWE-863 (incorrect authorization) as the downstream security consequence, because the skipped middleware normally carries the application's authentication, authorization or rate-limiting enforcement. The incompatibility is a canonicalization disagreement between two components rather than an integer or memory-safety issue, and the assessed vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N reflects that exploitation requires this specific non-default configuration and a mount path containing 'k'.

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

Remote unauthenticated bypass (AV:N/PR:N/UI:N); AC:H for the compound non-default precondition (caseSensitive:false plus a 'k' in a middleware-protected path); C:H/I:H as worst-case for the exposed handler, 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:H/AT:N/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:29 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 up to and including 9.3.6, middie does not honor the router's caseSensitive setting and matches path-scoped middleware mount paths with a case-insensitive regular expression that does not fold non-ASCII characters, while Fastify's router, when caseSensitive is set to false, lowercases the request path with a Unicode-aware conversion that maps the KELVIN SIGN character (U+212A) to the ASCII letter k. A request that spells a k in a protected mount path as the percent-encoded KELVIN SIGN is therefore routed to the protected handler while the middleware mounted on that path, such as authentication, authorization, or rate limiting, never matches and is skipped, letting an unauthenticated client reach the handler. Only applications that set caseSensitive to false and protect a mount path containing the letter k are affected. 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, or keep routing case-sensitive, which is the default.

Technical POC Analysis

CWE-178 (Improper Handling of Case Sensitivity), scored additionally as CWE-863 (Incorrect Authorization).

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

CVE-2026-132128 is a high-severity middleware bypass in the @fastify/middie library that allows unauthenticated attackers to reach protected endpoints when specific non-default configuration settings are used. This affects web applications relying on path-scoped middleware for security, potentially exposing sensitive data or functionality. Leadership should prioritize remediation because exploitation could lead to unauthorized access and data breaches, particularly in affected production environments.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: set caseSensitive:true in Fastify routing configuration, avoid mounting security-critical middleware on paths containing 'k', or replace middie middleware with Fastify's native hooks (e.g., preHandler) for authentication and authorization.

Threat Intelligence Overview

EPSS Score
0.5%
Top 58% exploitable
Prevalence
Medium
optional Fastify middleware adapter, moderately popular npm package
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

37
Low Medium High Critical
KEV: 0
EPSS: 0
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-132131 HIGH
7.4 Nov 19

Path-scoped middleware bypass in @fastify/middie 8.3.0 through 9.3.6 allows an unauthenticated remote client to reach ro

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-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