SECURITYCRITICALCVE-2026-129504

CVE-2026-129504: @fastify/express Prefix and Mount Path Mismatch Bypasses Middleware (CVSS 9.1)

@fastify/express 4.0.0 through 4.0.9 joins plugin prefix and mount path by string concatenation, letting requests skip path-scoped middleware. Upgrade to 4.0.10.

Dylan H.

Security Team

November 22, 2026
2 min read
CVE-2026-129504: @fastify/express Prefix and Mount Path Mismatch Bypasses Middleware (CVSS 9.1)

Critical severity

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

Affected Products

  • @fastify/express 4.0.0 through 4.0.9

Summary

CVE-2026-129504 is a path-scoped middleware bypass in @fastify/express. It was published to NVD on November 21, 2026 with a CVSS score of 9.1.

Details

In versions 4.0.0 through 4.0.9, the plugin joins a path-scoped middleware's mount path to the Fastify plugin prefix by string concatenation. When the plugin prefix ends with a slash or similar, the combined path no longer lines up with the path Fastify's router dispatches, so a request can reach the route while the middleware is skipped. Authentication, authorization and rate-limiting middleware mounted this way can be bypassed by an unauthenticated attacker.

ItemDetail
CVECVE-2026-129504
AdvisoryGHSA-f44m-4qwg-5587
CVSS9.1 (critical)
Package@fastify/express
Affected4.0.0 through 4.0.9
Fixed4.0.10
ExploitationNot confirmed in the sources reviewed

It is one of five related bypasses fixed in 4.0.10, alongside CVE-2026-124626, CVE-2026-133120, CVE-2026-133867 and CVE-2026-129850. The separate @fastify/middie package has its own flaw, CVE-2026-133250.

  1. Upgrade with npm install @fastify/express@^4.0.10.
  2. Check apps that register @fastify/express under a plugin prefix, especially one ending in a slash, and that mount middleware on a path.
  3. Add authorization checks in route handlers or Fastify hooks so protection does not rest on path-scoped Express middleware alone.

References