Skip to main content

@fastify/middie CVE-2026-6270

| EUVDEUVD-2026-23241 CRITICAL
Interpretation Conflict (CWE-436)
2026-04-16 openjs GHSA-72c6-fx6q-fr5w
9.1
CVSS 3.1 · NVD
View

Attack ChainAIDerived

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

  1. Access
    Identify Fastify app using @fastify/middie
  2. Delivery
    Locate route in child plugin scope
  3. Exploit
    Send unauthenticated HTTP request to protected route
  4. Execution
    Parent middleware not present on child engine
  5. Persist
    Auth/authz check skipped
  6. Impact
    Access or modify protected resource

Vulnerability Assessment

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

The exploitable state is a developer/deployment prerequisite, not an attacker prerequisite: the Fastify application must register authentication or authorization middleware in a parent scope via @fastify/middie AND define the protected routes inside encapsulated child plugins that expect to inherit that middleware. Where that pattern exists, exploitation needs no special conditions - remote unauthenticated requests against default configurations of @fastify/middie reach the child routes with no credentials, user interaction, or non-default settings. What LIMITS exploitation: applications that do not use middie-based parent-scope middleware for security, that enforce auth via per-scope hooks, or that place auth middleware within the same scope as the routes are not vulnerable; the impact is confidentiality/integrity of the exposed routes (A:N, no availability effect).

Impact

Signals are mixed and should be weighed rather than taken at face value. The CVSS vector (AV:N/AC:L/PR:N/UI:N/C:H/I:H/A:N = 9.1) and SSVC's 'Technical Impact: total' both point to a serious, network-reachable auth bypass with no attacker prerequisites, and SSVC confirms 'Exploitation: poc'. However, EPSS is very low (0.03%, 7th percentile) and SSVC marks 'Automatable: no', and the vulnerability is NOT in CISA KEV - so this is currently a publicly-known-but-not-observed-in-the-wild issue rather than a mass-exploited one. Critically, the raw CVSS overstates universality: exploitation depends entirely on a specific application architecture (parent-scope middleware + middie-mounted child plugins). Apps that don't rely on parent-scope middleware for auth, or that don't use middie encapsulation this way, are unaffected. So the honest read is high-severity WHERE the vulnerable pattern exists, but not a blanket 9.1 for every deployment. No public exploit identified as weaponized; only PoC-level code per SSVC.

Exploit ScenarioDerived

An attacker enumerates a Fastify-based API and sends a plain HTTP request directly to a sensitive route defined inside a child plugin (e.g. GET /admin/users) without any credentials. Because the parent-scope auth middleware was never registered on the child engine instance, the request is served without ever hitting the authentication check, returning protected data. A PoC exists (SSVC: poc; the sibling @fastify/express advisory includes working demo code), so exploitation is trivial once the vulnerable route pattern is identified.

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

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

Alert me

AnalysisAIv1 – Jul 24, 2026

Authentication bypass in @fastify/middie 9.3.1 and earlier lets unauthenticated attackers reach protected routes because inherited middleware is not registered directly on child plugin engine instances. When a Fastify app defines auth/authz middleware in a parent scope and mounts child plugins through middie, those child-scope routes silently skip the parent's checks, exposing them to anyone. Rated CVSS 9.1; SSVC lists a public PoC and total technical impact, though EPSS is only 0.03% and there is no evidence of active exploitation.

RemediationAI

Vendor-released patch: upgrade @fastify/middie to 9.3.2 (and, if you also use @fastify/express, upgrade to 4.0.5). The vendor explicitly states there are no workarounds, so patching is the only reliable fix. Until you can upgrade, the practical compensating control is to stop relying on parent-scope middleware inheritance for security: re-register the authentication/authorization middleware explicitly inside each child plugin scope (so the guard runs on the child engine instance directly), or move auth enforcement to a Fastify-native mechanism such as an onRequest/preHandler hook registered per-scope, which does encapsulate correctly. The trade-off is added boilerplate and the risk of missing a scope, so treat it as a stopgap and complete the upgrade. Refer to the advisories at https://github.com/fastify/middie/security/advisories/GHSA-72c6-fx6q-fr5w and https://github.com/fastify/fastify-express/security/advisories/GHSA-hrwm-hgmj-7p9c.

Affected VersionsENISA

@fastify/middie 0 <9.3.2

Affected Packages

npm @fastify/middie fix: 9.3.2
euvd fastify_middie fix: 9.3.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in npm, euvd

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

Technical ContextAI · show details

@fastify/middie is the connect-style middleware engine that adds Express/Connect-compatible .use() middleware support to the Fastify web framework (Node.js). Fastify uses an encapsulation model where child plugins get their own isolated engine instance; the defect is that middie fails to propagate (re-register) parent-scope middleware onto those child engine instances, so route handlers in encapsulated child plugins execute without the guard functions the developer expected to run. This maps to CWE-436 (Interpretation Conflict): the mismatch between Fastify's plugin-encapsulation semantics and how middie registers middleware means a control the developer believed applied globally is silently scoped away. A closely related OpenJS advisory (GHSA-hrwm-hgmj-7p9c) documents the sibling package @fastify/express (<=4.0.4, fixed 4.0.5), where the same class of bug manifests as middleware path-doubling (e.g. /admin inherited into a /admin-prefixed child becomes /admin/admin), producing the same net effect - child-scope routes bypass parent middleware.

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

NVD 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

Remote unauthenticated requests reach protected child routes with no interaction, exposing/altering guarded data (C:H/I:H) but not affecting availability (A:N); scope unchanged.

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

CVSS VectorNVD

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

Lifecycle Timeline

3
Patch released
Apr 22, 2026 - 17:31 nvd
Patch available
Patch available
Apr 16, 2026 - 15:01 EUVD
CVE Published
Apr 16, 2026 - 13:44 nvd
CRITICAL 9.1

DescriptionCVE.org

@fastify/middie versions 9.3.1 and earlier do not register inherited middleware directly on child plugin engine instances. When a Fastify application registers authentication middleware in a parent scope and then registers child plugins with @fastify/middie, the child scope does not inherit the parent middleware. This allows unauthenticated requests to reach routes defined in child plugin scopes, bypassing authentication and authorization checks. Upgrade to @fastify/middie 9.3.2 to fix this issue. There are no workarounds.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 4 npm packages depend on @fastify/middie (3 direct, 1 indirect)

Ecosystem-wide dependent count for version 9.3.2.

Executive ViewAI

Why It Matters

@fastify/middie through version 9.3.1 contains an authentication bypass affecting nested Fastify applications, where unauthenticated attackers can reach protected routes through improper middleware inheritance in child plugins. Public exploit code is available. Organizations relying on parent-scope authentication middleware for API segmentation risk unintended exposure of sensitive data and protected features.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.0%
Top 93% exploitable
Prevalence
Medium
Fastify middleware plugin; common in Node.js APIs but not universal
Threat Intel
1
1 source
Social Media
1
Sightings
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 CRITICAL
CISA KEV No
Public POC No
EPSS 0.0%
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
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

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