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 package | Versions | Reported by |
|---|---|---|
| @fastify/middie @fastify/middie | before 9.3.2 Not affected: 9.3.2 | CVE List |
| @fastify/middie (npm) | before 9.3.2 | GitHub Advisory Database |
| fastify fastify/middie | before 9.3.2 | NVD |
All scores
| openjs | 9.1critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
| GitHub | 9.1critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
Classification
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
| https://github.com/fastify/fastify-express/security/advisories/GHSA-hrwm-hgmj-7p9c | exploit, mitigation, vendor-advisory, web | |
| https://github.com/fastify/middie/security/advisories/GHSA-72c6-fx6q-fr5w | vendor-advisory, web | |
| https://cna.openjsf.org/security-advisories.html | vendor-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-6270 | advisory | |
| https://github.com/fastify/middie | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-6270 changed 2026-04-16 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-72c6-fx6q-fr5w changed 2026-07-08 | CC-BY-4.0 |
| NVD | CVE-2026-6270 changed 2026-06-17 | Public domain |