GitHub Advisoryadvisory · npm
GHSA-72c6-fx6q-fr5w @fastify/middie vulnerable to middleware authentication bypass in child plugin scopes
CRITICAL
Official page ↗
- Aliases
- CVE-2026-6270
- Ecosystem
- npm
- Packages
- @fastify/middie
- Severity
- Critical
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
- Weaknesses
- CWE-436
- Reviewed
- 2026-04-16
Affected packages
• npm @fastify/middie: < 9.3.2 → fixed in 9.3.2
Description
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.
Related
Alias · CVE (1)
- CVE-2026-6270 @fastify/middie versions 9.3.1 and earlier do not register inherited middleware directly on child plugin engine instances. vulnerability
Weakness · CWE (1)
- CWE-436 Interpretation Conflict weakness
References
- https://github.com/fastify/fastify-express/security/advisories/GHSA-hrwm-hgmj-7p9c web
- https://github.com/fastify/middie/security/advisories/GHSA-72c6-fx6q-fr5w web
- https://nvd.nist.gov/vuln/detail/CVE-2026-6270 advisory
- https://cna.openjsf.org/security-advisories.html web
- https://github.com/fastify/middie package