CVE-2026-6270
JSON

9.1critical

@fastify/middie vulnerable to middleware authentication bypass in child plugin scopes

Severity
9.1critical CVSS:3.1 by openjs
Exploit likelihood
0.51% (higher than 44% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
openjs
Also known as
GHSA-72c6-fx6q-fr5w

Description

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

Affected

Product or packageVersionsReported by
@fastify/middie @fastify/middiebefore 9.3.2
Not affected: 9.3.2
CVE List
@fastify/middie (npm)before 9.3.2GitHub Advisory Database
fastify fastify/middiebefore 9.3.2NVD

All scores

openjs9.1critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
GitHub9.1critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

Classification

CWE-436

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.

What each source says

CVE List

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

GitHub Advisory Database
Impact

@fastify/middie v9.3.1 and earlier incorrectly re-prefixes middleware paths when propagating them to child plugin scopes. When a child plugin is registered with a prefix that overlaps with a parent-scoped middleware path, the middleware path is modified during inheritance and silently fails to match incoming requests.

This results in complete bypass of middleware security controls for all routes defined within affected child plugin scopes, including nested (grandchild) scopes. Authentication, authorization, rate limiting, and any other middleware-based security mechanisms are skipped. No special request crafting or configuration is required.

This is the same vulnerability class as GHSA-hrwm-hgmj-7p9c (CVE-2026-33807) in @fastify/express.

Patches

Upgrade to @fastify/middie v9.3.2 or later.

Workarounds

None. Upgrade to the patched version.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-6270 changed 2026-04-16CVE Terms of Use
GitHub Advisory DatabaseGHSA-72c6-fx6q-fr5w changed 2026-07-08CC-BY-4.0
NVDCVE-2026-6270 changed 2026-06-17Public domain