Fastify middie and express middleware bypass Flaw CVE-2026-133250: Update Now
Published November 21, 2026 · Last updated November 21, 2026
On November 20, 2026, the Fastify project released fixes for six flaws that let requests slip past middleware in Fastify applications. Middleware is the code that often checks logins, permissions or request limits before a page or API handler runs. Five of the flaws are rated 9.1 out of 10, Critical. The fixes are @fastify/middie 9.3.8 and @fastify/express 4.0.10, or any later release of either package.
The flaws are not in the U.S. Cybersecurity and Infrastructure Security Agency's (CISA) Known Exploited Vulnerabilities catalog, and the advisories do not report attacks.
What is affected
Fastify is a web framework for Node.js. npm counts show about 23.8 million weekly downloads of fastify and about 3.1 million of @fastify/middie, the engine that runs middleware in Fastify apps, in the week ending November 20. @fastify/express, a compatibility layer that lets Express middleware run inside Fastify, had about 110,000. The download figures come from npm; they do not say how many apps use path-scoped middleware.
All six flaws share one root cause. The middleware layer reads the request path differently from Fastify's router. When the two disagree, the router still sends the request to a protected handler, but the middleware mounted on that path never runs. According to the middie advisory, "an unauthenticated client reaches a handler that an authentication, authorization or rate-limiting middleware was meant to protect."
The six CVEs
- CVE-2026-133250, @fastify/middie, 9.1. All releases up to 9.3.7. The CVE record says the mismatch "is triggered by empty parameter or wildcard values, request targets that do not begin with a slash, and literal percent characters in a mount path," with no special configuration required.
- CVE-2026-124626, @fastify/express, 9.1. Versions 4.0.5 through 4.0.9. An empty value in a dynamic path segment matches the Fastify route while skipping middleware mounted on the same pattern.
- CVE-2026-129504, @fastify/express, 9.1. Versions 4.0.0 through 4.0.9. The plugin builds mount paths by joining strings, so a trailing slash on a plugin prefix, or a mount path without a leading slash, makes Express miss the route.
- CVE-2026-133120, @fastify/express, 9.1. All versions before 4.0.10. Differences in how the request address is decoded and normalized let middleware and handler see different paths or parameter values.
- CVE-2026-133867, @fastify/express, 9.1. Versions 4.0.7 through 4.0.9. Middleware mounted with a regular expression inside a plugin under a parameterized prefix never matches.
- CVE-2026-129850, @fastify/express, 7.4. Versions 4.0.0 through 4.0.9. This one applies only when case-insensitive routing is turned on, because certain Unicode characters fold to ordinary letters in the router but not in the middleware matcher.
The records map the flaws to several weakness classes, including CWE-436 (interpretation conflict), CWE-287 (improper authentication), CWE-288 (authentication bypass using an alternate path), CWE-863 (incorrect authorization), CWE-174 (double decoding) and CWE-178 (improper handling of case sensitivity).
What the fixes change
According to the advisories, middie 9.3.8 accepts empty parameter and wildcard values, rejects request targets that do not start with a slash other than the asterisk form, and matches a literal percent sign in a mount path the way the router keeps it encoded. In @fastify/express 4.0.10, "Express now receives the path the router matched," request targets that do not start with a slash are rejected with an HTTP 400 error, and the query string stays encoded. The middie advisory also points to a related change in find-my-way, Fastify's router, that stops it from routing a path that does not begin with a slash, and to an earlier middie advisory, GHSA-hx87-8wv7-pjv8, describing a bypass of the same kind.
Scores
The scores come from the OpenJS Foundation, the CNA (the organization that assigns these CVE numbers), under CVSS 3.1. The 9.1 rating uses AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N: a network attack with low complexity, no login and no user action, with high impact on confidentiality and integrity but none on availability. CVE-2026-129850 scores 7.4 because its attack complexity is rated high. The National Vulnerability Database has not yet published its own scores.
How much damage a bypass does depends on the app. The record for CVE-2026-124626 notes that "the practical impact depends on what the empty value selects in the application." Apps that do not use path-scoped middleware for security checks face less risk.
How to fix it
Who should act: developers and operators of Node.js applications built on Fastify, especially those that mount authentication, authorization or rate-limiting middleware on specific paths, and vendors that ship Fastify-based products.
- Upgrade @fastify/middie to 9.3.8 or later. The advisory says middie "now matches middleware against the path find-my-way routes," referring to Fastify's router.
- Upgrade @fastify/express to 4.0.10 or later if you use it. Newer releases of both packages are already available.
- Use the official workaround if you cannot upgrade yet. Both advisories recommend enforcing authentication in a Fastify hook, such as preHandler, that runs after the router has resolved the request, and basing the decision on the matched route rather than the raw request address. The middie advisory says "This covers all three vectors." For @fastify/express, the advisory adds a narrower option: reject request targets that start with an asterisk, or whose path contains a backslash, in an onRequest hook registered before the plugin. That blocks only two of the bypasses.
- Check what actually deployed. General advice: confirm in your lock file that both packages resolved to fixed versions, since they are often pulled in as indirect dependencies.
- Add regression tests. General advice: write automated tests that request protected paths with empty segments, unusual encodings and mixed case, and confirm they are refused without valid credentials.
- Review access logs. Also general advice: look for unexpected successful requests to protected routes from clients that never signed in.
Timeline
- November 18, 2026: @fastify/middie 9.3.7, the last affected middie release, is published on npm.
- November 20, 2026, 10:47 AM ET: @fastify/middie 9.3.8 is released on GitHub.
- November 20, 2026, 1:00 PM to 1:14 PM ET: @fastify/express 4.0.10 is published, and the six GitHub security advisories go live.
- November 21, 2026: The six CVE records are published.
Sources
- GitHub advisory GHSA-gcf6-j9m3-p97x (@fastify/middie, CVE-2026-133250)
- GitHub advisory GHSA-662w-h4p6-jq4p (CVE-2026-124626)
- GitHub advisory GHSA-f44m-4qwg-5587 (CVE-2026-129504)
- GitHub advisory GHSA-w877-hjcp-88rc (CVE-2026-133120)
- GitHub advisory GHSA-84w6-xrf3-f8q8 (CVE-2026-133867)
- GitHub advisory GHSA-6rmc-f24g-hmp6 (CVE-2026-129850)
- OpenJS Foundation CNA security advisories
- CVE records: CVE-2026-133250, CVE-2026-124626, CVE-2026-129504, CVE-2026-133120, CVE-2026-133867, CVE-2026-129850
Sources
- NVD: CVE-2026-133250
- CVE.org: CVE-2026-133250
- Fastify advisory
- Fastify advisory
- MITRE CWE-288
- MITRE CWE-436
General education only, not security advice. Facts checked against the sources above on the date shown.