Skip to content
DayZeroHub
Critical CVSS 9.1CVE-2026-133867

@fastify/express: middleware bypass via RegExp mount paths under parameterized prefixes (CVE-2026-133867)

@fastify/express @fastify/express

Summary

In @fastify/express 4.0.7 through 4.0.9, middleware mounted with a regular expression inside a plugin with a parameterized prefix can be skipped while Fastify still runs the route handler. The source assigns a CVSS 3.1 score of 9.1 (critical severity), and the vendor states it is fixed in version 4.0.10.

What happened

@fastify/express is a compatibility layer that lets Express middleware run inside Fastify. In versions 4.0.7 through 4.0.9, the plugin does not rewrite regular-expression mount paths to account for a parameterized plugin prefix. As a result, when middleware is mounted with a regular expression inside a plugin registered under a parameterized prefix, the Express matcher treats the prefix parameter as literal text and never matches the real request path. Express then silently skips that middleware while Fastify still runs the route handler. No special configuration is needed beyond a parameterized prefix and a regular-expression mount. The associated weaknesses are CWE-287 and CWE-436.

Why it matters

If an application relies on regular-expression mounted middleware for authentication or authorization inside a plugin with a parameterized prefix, protected routes are exposed to unauthenticated clients. The CVSS 3.1 score is 9.1 (vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N, source: CNA openjs) and the severity is critical. CISA's KEV catalog does not list this vulnerability as exploited, and the source does not indicate active exploitation.

Affected products and versions

@fastify/express, versions >= 4.0.7 and < 4.0.10 (that is, 4.0.7 through 4.0.9). Version 4.0.10 is listed as unaffected.

ProductVersionsFixed in
@fastify/express @fastify/express>= 4.0.7, < 4.0.10—
@fastify/express @fastify/express4.0.104.0.10

Action recommended by the source

The vendor recommends upgrading to @fastify/express 4.0.10 or later. More information in the vendor advisory: https://github.com/fastify/fastify-express/security/advisories/GHSA-84w6-xrf3-f8q8

Fixed in: 4.0.10

Information taken from the source or the vendor. Verify it at the original link before acting.

Sources and references

Weaknesses (CWE): CWE-287, CWE-436

Relevant change history

  1. Advisory correction

    The preliminary version was replaced by the full write-up.

  2. Published

    Preliminary advisory published.

Summary written with AI assistance from the source data. See the sources and references for complete information. View sources