SECURITYCRITICALCVE-2026-124626

CVE-2026-124626: @fastify/express Middleware Bypass via Empty Route Parameters (CVSS 9.1)

@fastify/express 4.0.5 through 4.0.9 can skip path-scoped Express middleware, such as auth, when a route parameter is empty. Upgrade to 4.0.10.

Dylan H.

Security Team

November 22, 2026
2 min read
CVE-2026-124626: @fastify/express Middleware Bypass via Empty Route Parameters (CVSS 9.1)

Critical severity

Rated critical. Prioritise patching — see the remediation guidance below.

Affected Products

  • @fastify/express 4.0.5 through 4.0.9

Summary

CVE-2026-124626 is a path-scoped middleware bypass in @fastify/express, the compatibility layer that lets Express middleware run inside Fastify. It was published to NVD on November 21, 2026 with a CVSS score of 9.1.

Details

In versions 4.0.5 through 4.0.9, the plugin matches path-scoped Express middleware with a matcher that requires a non-empty value for a dynamic segment. Fastify's router accepts an empty value, so a request with an empty route parameter or a wildcard can reach the route handler while the middleware mounted on that path is skipped. If that middleware performs authentication, authorization or rate limiting, an unauthenticated attacker can get past it.

ItemDetail
CVECVE-2026-124626
AdvisoryGHSA-662w-h4p6-jq4p
CVSS9.1 (critical)
Package@fastify/express
Affected4.0.5 through 4.0.9
Fixed4.0.10
ExploitationNot confirmed in the sources reviewed

This is one of five path-scoped bypasses fixed in 4.0.10. The others are CVE-2026-129504, CVE-2026-133120, CVE-2026-133867 and CVE-2026-129850 (rated high). A related flaw in the separate @fastify/middie package is covered in CVE-2026-133250.

  1. Upgrade with npm install @fastify/express@^4.0.10.
  2. Find apps that mount auth or access-control middleware on a path with @fastify/express and treat them as exposed until updated.
  3. Do not rely on path-scoped Express middleware as the only access control. Add checks inside the route handler or in a Fastify onRequest hook.
  4. Review access logs for requests with empty path segments or wildcards against protected routes.

References