Vulnerability · Published Apr 15, 2026 · Assigned by openjs
CVE-2026-33807@fastify/express vulnerable to middleware path doubling causing authentication bypass in child plugin scopes
Critical 9.1
In plain English
A critical-severity security flaw in @fastify/express from fastify. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 37% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
@fastify/express v4.0.4 and earlier contains a path handling bug in the onRegister function that causes middleware paths to be doubled when inherited by child plugins. When a child plugin is registered with a prefix that matches a middleware path, the middleware path is prefixed a second time, causing it to never match incoming requests. This results in complete bypass of Express middleware security controls, including authentication, authorization, and rate limiting, for all routes defined within affected child plugin scopes. No special configuration or request crafting is required. Upgrade to @fastify/express v4.0.5 or later.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| npm | @fastify/express | 4.0.5 | GHSA-hrwm-hgmj-7p9c |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| fastify | @fastify/express | 0 – before 4.0.5 |
Weakness: CWE-436 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N