Packages / @fastify/middie / Security

CriticalVulnerabilityGHSA-72c6-fx6q-fr5wCVE-2026-6270Published 16 Apr 2026

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

Affected releases · @fastify/middie

  • 9.x9.0.0 – 9.3.1Fixed in 9.3.2
  • 8.x8.0.0 – 8.3.3No fix on this line yet

On 9.x, the newest line:

npm install @fastify/middie@9.3.2
9.x
  1. Affected

    9.0.0 – 9.3.1

    8 releases

  2. Fixed

    9.3.2 – 9.3.6

    5 releases, latest

8.x
  1. Affected

    8.0.0 – 8.3.3

    7 releases

20 stable releases of @fastify/middie, oldest to newest, one row per major.

Is your project affected?

Paste your package.json, or type the range you declare for @fastify/middie. It is read in your browser and sent nowhere.

What happens

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.