Skip to main content

@fastify/middie EUVDEUVD-2026-105361

| CVE-2026-112712 CRITICAL
Interpretation Conflict (CWE-436)
2026-10-20 openjs
9.1
CVSS 3.1 · Vendor: openjs
View

Attack ChainAIDerived

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

  1. Access
    Identify Fastify app using middie
  2. Delivery
    Map path-scoped protected endpoint
  3. Exploit
    Send unauthenticated request to diverged path
  4. Execution
    Security middleware silently skipped
  5. Persist
    Route handler executes unauthorized
  6. Impact
    Access protected resource or action

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V4 - API and Web Service Interpretation consistency
Exploitation Conditions

Exploitation requires an application using @fastify/middie (9.0.0-9.3.5) that relies on path-scoped middleware registered via use() for a security function - authentication, authorization, or rate limiting - AND a mount-path configuration that causes middie's joined path to diverge from the route Fastify's router serves. The specific triggering conditions named in the advisory are: a plugin scope prefix that ends in a slash (the most common case), an array mount path, or a mount path written without a leading slash. No special attacker conditions apply once such a configuration exists - a single unauthenticated remote request suffices (consistent with PR:N/UI:N/AC:L). Limiting factors: applications that enforce authorization in a Fastify preHandler (or other post-routing) hook rather than in middie middleware are not exploitable, and deployments whose mount paths do not match the divergent patterns are unaffected, so this is not exploitable against an arbitrary default middie install.

Impact

This is a genuinely high-priority flaw, but its real-world risk is strongly conditioned on deployment specifics rather than being universally exploitable. The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N, C:H/I:H/A:N) scores 9.1 and describes an unauthenticated, network-reachable, low-complexity security-control bypass with high confidentiality and integrity impact - consistent with CWE-436 (Interpretation Conflict) where @fastify/middie and Fastify's router disagree on the served path. The severity is credible because a single unauthenticated request can slip past path-scoped authentication, authorization, or rate-limiting middleware while the route handler still executes. However, no EPSS score, no CISA KEV listing, and no public exploit were provided in the input, so there is no public exploit identified at time of analysis and no evidence of active or widespread exploitation; the 9.1 reflects worst-case impact, not observed attacks. The critical nuance the raw score hides is that exploitation requires the application to (a) rely on middie path-scoped middleware for security and (b) use one of the specific mount-path patterns that trigger the divergence (scope prefix ending in a slash, array mount paths, or mount paths without a leading slash). Applications that enforce authorization in a Fastify preHandler hook are not affected. Net: treat as an urgent patch for any Fastify deployment using middie for security middleware, but recognize real risk is gated by configuration, so an inventory/config review should accompany prioritization.

Exploit ScenarioDerived

A Fastify service uses @fastify/middie to apply authentication middleware scoped to an admin path, but the plugin scope prefix ends in a slash, causing middie's computed mount path to diverge from the route Fastify actually serves. An attacker sends a single crafted, unauthenticated HTTP request to a protected endpoint; the auth middleware is silently skipped while the underlying route handler executes, granting unauthorized access. No public exploit code is identified in the provided data, but the condition is deterministic once the vulnerable mount-path pattern is present.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.3% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Oct 20, 2026

Authentication, authorization, and rate-limiting middleware bypass in @fastify/middie 9.0.0 through 9.3.5 can let a single unauthenticated remote request reach a route handler while path-scoped middleware registered with use() is silently skipped. The flaw occurs when the middleware mount path joined to the plugin scope prefix diverges from the path Fastify's router serves, particularly when the scope prefix ends in a slash, when array mount paths are used, or when mount paths lack a leading slash. Risk is configuration-dependent: applications that rely on path-scoped middie middleware for security and use those mount-path patterns are exposed, while applications enforcing authorization in a post-routing Fastify hook are not; no public exploit identified at time of analysis, and the vendor patch is 9.3.6.

RemediationAI

Upgrade @fastify/middie to 9.3.6 or later (vendor-released patch: 9.3.6), which fixes the path-joining logic so middleware matching aligns with Fastify routing. If immediate upgrade is not possible, move security checks such as authentication, authorization, and rate limiting into a Fastify hook that runs after routing has resolved the request-for example preHandler-and treat any security logic implemented only in path-scoped middie middleware as ineffective; the trade-off is that hook-based checks must be audited to ensure they cover every protected route. Also audit use() registrations for plugin scope prefixes ending in a slash, array mount paths, and mount paths without a leading slash, since these are the named divergence patterns; correcting those mount paths reduces exposure but should not replace upgrading. See https://github.com/fastify/middie/security/advisories/GHSA-5p92-8765-9fv8 and https://cna.openjsf.org/security-advisories.html.

Affected VersionsENISA

@fastify/middie 9.0.0 <9.3.6

Affected Packages

euvd fastify_middie fix: 9.3.6

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

The issue is a path-interpretation conflict (CWE-436) in @fastify/middie, the Express-style middleware layer for Fastify. Middie's use() composes a middleware mount path with the enclosing plugin's scope prefix, then matches incoming requests against that composed path, while Fastify's router uses its own normalization and serving logic. When those two interpretations diverge-most commonly with a scope prefix ending in a slash, but also with array mount paths or mount paths without a leading slash-the middleware matcher does not fire even though the router still dispatches to the intended route handler. Because the handler runs without the skipped middleware, path-scoped authentication, authorization, or rate limiting can be bypassed; the CVSS vector is AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N, so a remote unauthenticated request can affect confidentiality and integrity when a vulnerable configuration exists. CPE data identifies the affected package as @fastify/middie before the fixed release, with the advisory specifying 9.0.0 through 9.3.5.

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 9.1 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
vuln.today AI 9.1 CRITICAL

A single unauthenticated remote request deterministically bypasses path-scoped security middleware (AV:N/AC:L/PR:N/UI:N); high confidentiality/integrity impact on protected resources, no availability impact.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
4.0 AV:N/AC:L/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
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

Lifecycle Timeline

2
Patch available
Oct 20, 2026 - 22:19 EUVD
CVE Published
Oct 20, 2026 - 20:43 cve.org
CRITICAL 9.1

DescriptionCVE.org

@fastify/middie is the Express-style middleware engine for Fastify. In versions from 9.0.0 through 9.3.5, the use() function joined a path-scoped middleware's mount path to the plugin scope prefix in a way that could diverge from the path Fastify's router serves, most often when the scope prefix ended in a slash, and also for array mount paths and for mount paths written without a leading slash. When the two paths disagreed, the middleware was silently skipped while the route handler still ran, so path-scoped middleware such as authentication, authorization, or rate limiting could be bypassed by a single unauthenticated request. The issue is fixed in @fastify/middie 9.3.6, and users should upgrade to 9.3.6 or later. As a workaround, enforce authorization in a Fastify hook such as preHandler that runs after the router has resolved the request.

Technical POC Analysis

Bug class: CWE-436, Interpretation Conflict.

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 bypass in the @fastify/middie library (versions 9.0.0 through 9.3.5) can cause path-scoped middleware to be silently skipped, meaning requests may reach route handlers that teams believe are protected by middleware-based authentication, authorization, or rate limiting. Leadership should care because exposure is configuration-dependent and invisible at runtime: whether a given service is affected depends on how each engineering team mounted its middleware, so the true scope cannot be established from an inventory of internet-facing systems alone. At time of analysis no public exploit identified, and the advisory text references vendor fix version 9.3.6, although this feed's patch-availability field records no patch - that discrepancy must be resolved with the vendor before remediation is considered complete.

Business Impact: High
Compensating Controls

Vendor-released patch identified in the advisory text: 9.3.6 (patch-availability field records no patch - validate against the vendor advisory before relying on it). Where 9.3.6 cannot be deployed immediately: inventory and normalize every use() mount path, eliminating trailing-slash scope prefixes, array mount paths, and mount paths lacking a leading slash; move authentication, authorization, and rate limiting out of path-scoped middie middleware into post-routing Fastify onRequest/preHandler hooks or an upstream gateway/reverse proxy; and add integration tests asserting that each protected route rejects unauthorized requests regardless of mount-path form.

Threat Intelligence Overview

EPSS Score
0.3%
Top 77% exploitable
Prevalence
Medium
popular Fastify ecosystem middleware plugin, common but not universally deployed
Data Quality
5 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 CRITICAL
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
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

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

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