Technical impact
@fastify/express, a plugin that runs Express middleware inside the Fastify framework, has a logic flaw when middleware is mounted with nested array paths. The plugin rewrites only the top‑level array, leaving nested arrays unchanged. This allows attackers to bypass middleware‑based authentication or other access controls on affected routes. The weakness involves improper handling of nested paths (CWE‑436) and incorrect regular‑expression flag propagation (CWE‑863), which together enable stateful skipping of middleware and case‑sensitivity issues.
Affected Systems
Products affected are the @fastify/express plugin for Fastify. Versions 4.0.7 through 4.0.13, inclusive, are vulnerable. The issue was fixed in release 4.0.14, and users should upgrade to that or later versions. No additional vendor patches are listed beyond the version update.
Risk and Exploitability
The CVSS score of 7.4 indicates a high severity. EPSS is not available, and the vulnerability is not listed in CISA's KEV catalog. Attackers can exploit the flaw by constructing HTTP requests that target routes mounted with nested array paths, allowing them to bypass authentication or other middleware. No special privileges are required beyond the ability to send requests to the application.