@fastify/express: Middleware bypass vulnerability (CVE-2026-124626)
The @fastify/express package is vulnerable to a middleware bypass in versions 4.0.5 through 4.0.9, allowing unauthenticated requests to reach protected handlers via empty dynamic route segments.
CVE search metadata
CVE search record: CVE-2026-124626. Severity: critical. CVSS: 9.1. KEV: no. Product: @fastify/express. Brief: @fastify/express: Middleware bypass vulnerability (CVE-2026-124626). Brief link: https://feed.craftedsignal.io/briefs/2026-11-fastify-express-bypass-cve-2026-124626/
Triage facts
Revision 1- Applicability
- @fastify/express
- Evidence
- Unknown
- Severity
- Critical
- Sources
- 2 public sources
- Freshness
- Revision 1Nov 21, 18:39 UTC
- Vulnerabilities
- 1 CVE
- Source quality
- C3Roughly even chance
Overview
@fastify/express is a compatibility layer that lets Express middleware run inside the Fastify web framework. Versions 4.0.5 through 4.0.9 are affected by a middleware bypass vulnerability where the plugin's matcher expects non-empty dynamic segments, but the Fastify router accepts empty parameters or wildcards.
Attack Chain
When a route and an Express middleware mount share a dynamic pattern, a request with an empty segment matches the Fastify route and executes the handler while the middleware mounted on that pattern is skipped. This permits an unauthenticated request to access a protected handler on a scoped mount without requiring special configuration.
Impact
The practical impact depends on what the empty value selects in the application logic behind the bypassed handler.
Recommendation
The vulnerability is fixed in @fastify/express 4.0.10. Users should upgrade to 4.0.10 or later.