# CVE-2026-6270: Fastify @fastify/middie authentication bypass in child plugin scopes

Source: https://junglewise.ai/threats/cve-2026-6270-fastify-fastify-middie-middleware-bypass-in-child-plugin-scopes  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-04-16. Updated: 2026-05-14  
License: CC BY 4.0 with a link back

CVE-2026-6270 · Severity: critical · CVSS 9.1 · Published 2026-04-16

@fastify/middie is a plugin for the Fastify web framework that allows developers to use Connect and Express middleware. A security flaw in how this plugin handles child components (plugins) causes security checks, such as authentication and authorization, to be silently skipped for certain web routes. This could allow unauthenticated attackers to access sensitive data or administrative functions that were intended to be protected.

Technologies: [Fastify Middie](https://junglewise.ai/threats/technologies/middie), [@fastify/middie (npm)](https://junglewise.ai/threats/technologies/fastify-middie). Vendors: [Fastify](https://junglewise.ai/threats/vendors/fastify), [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2026-6270 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-6270 being exploited in the wild.

**How severe is CVE-2026-6270?** Critical severity, with a CVSS score of 9.1, published 16 April 2026.

**Which products and versions are affected?** Fastify Middie <= 9.3.1; @fastify/middie (npm) <= 9.3.1, SEMVER:introduced=0,fixed=9.3.2.

**Is there a fix for CVE-2026-6270?** Yes. @fastify/middie (npm): upgrade to 9.3.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-6270 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-6270?** Check whether you run Fastify Middie or @fastify/middie (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- @fastify/middie (npm): upgrade to 9.3.2 or later

  ```sh
  npm install @fastify/middie@9.3.2
  ```


## Technical details

A vulnerability in @fastify/middie (v9.3.1 and earlier) occurs during the propagation of middleware from parent 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 incorrectly re-prefixed (doubled) during inheritance. This causes the middleware to fail to match incoming requests for routes defined within the child scope. Consequently, security-critical middleware—including authentication, authorization, and rate limiting—is silently bypassed. The issue is rooted in the onRegister function's handling of prefixed paths and is fixed in version 9.3.2.

## Affected products

- Fastify @fastify/middie <= 9.3.1

## Identifiers

- CVE-2026-6270
- GHSA-72c6-fx6q-fr5w

## Timeline

- 2026-04-16: disclosed
- 2026-04-16: advisory
- 2026-04-16: patched: Fixed in version 9.3.2

## References

- [https://cna.openjsf.org/security-advisories.html](https://cna.openjsf.org/security-advisories.html)
- [https://github.com/fastify/fastify-express/security/advisories/GHSA-hrwm-hgmj-7p9c](https://github.com/fastify/fastify-express/security/advisories/GHSA-hrwm-hgmj-7p9c)
- [https://github.com/fastify/middie/security/advisories/GHSA-72c6-fx6q-fr5w](https://github.com/fastify/middie/security/advisories/GHSA-72c6-fx6q-fr5w)

## Related threats

- [@fastify/middie path-scoped middleware bypass via absolute-form request](https://junglewise.ai/threats/cve-2026-85184-fastify-middie-path-scoped-middleware-bypass-via-absolute-form)
- [Fastify @fastify/middie authorization bypass via encoded slash in path parameters](https://junglewise.ai/threats/cve-2026-14198-fastify-fastify-middie-authorization-bypass-via-encoded-slash-in)
- [Fastify @fastify/middie middleware bypass via duplicate slashes](https://junglewise.ai/threats/cve-2026-33804-fastify-fastify-middie-middleware-bypass-via-duplicate-slashes)
- [Fastify @fastify/middie auth bypass via improper path normalization](https://junglewise.ai/threats/cve-2026-2880-fastify-fastify-middie-auth-bypass-via-improper-path-normalization)
- [Fastify @fastify/middie middleware path bypass via URL encoding](https://junglewise.ai/threats/cve-2026-22031-fastify-fastify-middie-middleware-path-bypass-via-url-encoding)
