Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
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.
Primary rating from NVD.
CVSS VectorNVD
Lifecycle Timeline
6Blast Radius
ecosystem impact- 4 npm packages depend on @fastify/middie (3 direct, 1 indirect)
Ecosystem-wide dependent count for version 9.3.2.
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.
AnalysisAI
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.
Technical ContextAI
@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.
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.
More in Fastify Middie
View allPath-based access-control bypass in @fastify/middie (Fastify's Express-style middleware engine) versions 9.1.0 through 9
Authentication and authorization bypass in @fastify/middie 9.1.0 through 9.3.2 lets remote unauthenticated attackers rea
Middleware path-matching bypass in @fastify/middie before version 9.1.0 allows authenticated attackers to access protect
Authentication and authorization bypass in @fastify/middie (Node.js middleware library for Fastify) allows remote unauth
Denial of service in @fastify/middie 9.1.0 through 9.3.2 lets remote unauthenticated attackers crash the Node.js process
Authentication and authorization bypass in @fastify/middie 9.3.1 and earlier lets remote unauthenticated attackers reach
Same weakness CWE-436 – Interpretation Conflict
View allSame technique Authentication Bypass
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-23241
GHSA-72c6-fx6q-fr5w