Summary
@fastify/express before version 4.0.10 can skip path-scoped Express middleware while the Fastify route handler still runs. The vendor states the fix is in version 4.0.10 (CVE-2026-133120, CVSS 9.1).
What happened
@fastify/express is a compatibility layer that lets Express middleware run inside Fastify. In versions before 4.0.10, the plugin passes Express a request URL that does not always match the path Fastify's router dispatched. As a result, path-scoped Express middleware can be skipped while the route handler still runs. Several request forms trigger the mismatch, including percent-decoding that rewrites a backslash to a slash or double-decodes an encoded percent sign, and a request target that begins with an asterisk; the middleware and the handler then disagree on the path or on parameter and query values. The issue is associated with weaknesses CWE-174 and CWE-436.
Why it matters
According to the source, an unauthenticated client can reach a handler that an authentication, authorization, or rate-limiting middleware was meant to protect, with no special configuration required. The source rates the vulnerability as critical, with a CVSS 3.1 score of 9.1 (vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N, assigned by CNA:openjs). It is not listed as actively exploited in CISA's KEV catalog, and the source does not indicate evidence that it is a zero-day.
Affected products and versions
@fastify/express, versions before 4.0.10 (< 4.0.10). Version 4.0.10 is listed as unaffected.
| Product | Versions | Fixed in |
|---|---|---|
| @fastify/express @fastify/express | < 4.0.10 | — |
| @fastify/express @fastify/express | 4.0.10 | 4.0.10 |
Action recommended by the source
The vendor recommends upgrading to @fastify/express 4.0.10 or later. More information in the project's security advisory: https://github.com/fastify/fastify-express/security/advisories/GHSA-w877-hjcp-88rc
Fixed in: 4.0.10
Sources and references
- https://github.com/fastify/fastify-express/security/advisories/GHSA-w877-hjcp-88rc — CVE Program
- https://cna.openjsf.org/security-advisories.html — CVE Program
Weaknesses (CWE): CWE-174, CWE-436
Relevant change history
Advisory correction
The preliminary version was replaced by the full write-up.
Published
Preliminary advisory published.