Advisory

GHSA-72c6-fx6q-fr5w

Also known as: CVE-2026-6270

Summary

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

Details

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.

Severity

Critical Basis: The source's own band: CRITICAL

Dates

Published
2026-04-16 22:29 UTC
Modified
2026-07-08 08:14 UTC

Affected packages and fixes

@fastify/middie

npm · All systems

Affected

  • introduced 0, fixed 9.3.2 (semver)

Fixed versions

9.3.2

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences