Fastify Middleware Auth Bypass: Six Advisories (CVE-2026-133250 and Four More at CVSS 9.1) Let Requests Skip Auth in @fastify/express and @fastify/middie — Update to 4.0.10 and 9.3.8

DevSecOps · 2026-11-23 · By Reef Administrator - H.A

Fastify Middleware Auth Bypass: Six Advisories (CVE-2026-133250 and Four More at CVSS 9.1) Let Requests Skip Auth in @fastify/express and @fastify/middie — Update to 4.0.10 and 9.3.8

Fastify's Express and Connect compatibility plugins can read a URL differently from Fastify's router, so crafted paths such as /tenant//admin or *admin reach protected handlers without running authentication middleware; fixes are in @fastify/express 4.0.10 and @fastify/middie 9.3.8.

The Fastify team has published a batch of critical advisories for the two plugins that let Fastify applications run Express- and Connect-style middleware: @fastify/express and @fastify/middie. All of them come down to the same weakness. The middleware layer and Fastify's router can read the same URL differently, so a request reaches a protected route handler while the authentication, authorization or rate-limiting middleware meant to guard it never runs.

Five of the six new advisories are rated critical (CVSS 9.1, network, no privileges, no user interaction). The fixes are @fastify/express 4.0.10 and @fastify/middie 9.3.8. Both were published on GitHub on 20 November 2026 and listed by the OpenJS Foundation CNA a day later.

What Happened

The project's lead maintainer published five @fastify/express advisories and one @fastify/middie advisory, each describing a different way to make the middleware matcher and the router disagree:

These are not the first of their kind. The same CNA listing shows three more @fastify/middie bypasses disclosed on 19 November (duplicate-slash mount paths, array mount-path type confusion and Unicode case folding), and an October middie advisory. In the same week, separate fixes landed across the wider ecosystem, including @fastify/swagger-ui (documentation authentication bypass through an unprotected /static route), @fastify/rate-limit (failed-login limit bypass through a race condition), @fastify/reply-from and @fastify/http-proxy.

Two of the @fastify/express reports carry a note on the advisory saying they were submitted with AI assistance. That fits the wider pattern of AI tools uncovering parser-mismatch bugs in bulk.

Technical Details

Fastify routes requests with its own router, find-my-way. The compatibility plugins pass each request through a separate matcher (Express's own or path-to-regexp) to decide which app.use() middleware applies. Whenever the two interpret a path differently, the handler runs and the middleware is skipped. The advisories describe several ways this happens:

The fixes make both plugins match middleware against the path the router actually dispatched. They also reject request targets that do not start with / (except the asterisk form), with a 400 in @fastify/express.

Who Is Affected

You are exposed if your Fastify application relies on @fastify/express or @fastify/middie to enforce security through path-scoped middleware: auth checks, tenant isolation, admin gates, IP allow-lists or rate limits mounted with app.use('/some/path', ...). This is common in projects migrated from Express that kept their old Passport, JWT or session middleware. Applications that enforce access control in Fastify hooks (onRequest, preHandler) on the route itself are not affected by this class of bug.

Affected ranges per the advisories:

At the time of writing we found no reports of exploitation, and none of these CVEs is in CISA's Known Exploited Vulnerabilities catalog. The advisories, however, include working example request paths, so anyone can test for these bypasses.

What To Do Now

npm ls @fastify/express @fastify/middie
npm install @fastify/express@^4.0.10 @fastify/middie@^9.3.8
npm audit --omit=dev

Why It Matters

This is the same bug class seen in the Next.js middleware bypass of 2025 and in many reverse-proxy path confusion flaws: whenever two components each parse a URL, attackers look for the gap between them. Bolting Express-era middleware onto a framework with a different router builds that gap into the architecture, and patching one mismatch at a time is how this plugin family has ended up with more than ten bypass advisories in two months.

The durable fix is architectural, not a version bump. Enforce access control at the point where the routing decision has already been made, on the route itself, and treat path-prefix middleware as a convenience rather than a security boundary.

Sources

REEF SENTINEL