Authentication Bypass in Fastify Plugin for Express Middleware
CVE-2026-135279
What is CVE-2026-135279?
The @fastify/express plugin facilitates the execution of Express middleware within the Fastify web framework. Prior to version 4.0.14, an empty dynamic route parameter could be used in requests, allowing these requests to reach Fastify route handlers while bypassing middleware set within an Express Router or sub-application. This occurs because Fastify's routing mechanism permits empty values, unlike Express, leading to a failure in enforcing middleware checks such as authentication. An attacker may exploit this flaw to circumvent expected access controls, with the severity of the impact varying depending on application context. The issue has been rectified in version 4.0.14, and it is strongly recommended that users upgrade to this version or later. As a temporary measure, developers can implement authentication checks in Fastify hooks like preHandler, mount middleware at a static parent path, or enforce non-empty values in route parameter schemas.
Affected Version(s)
@fastify/express 0 < 4.0.14
@fastify/express 4.0.14
