Middleware bypass in @fastify/express via empty route parameters
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Security bypass
- Confidentiality · integrity · availability
- High · High · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA. Impact type from CWE-287.
Summary
@fastify/express versions from 4.0.5 before 4.0.10 match path-scoped Express middleware with a matcher that requires a non-empty value for a dynamic segment, while Fastify's router accepts an empty parameter or wildcard value. When a route and a middleware mount share a dynamic pattern, a request with an empty segment runs the handler and skips the middleware, so an unauthenticated remote attacker can reach a protected handler on a scoped mount. No special configuration is required, and the practical impact depends on what the empty value selects in the application.
Written with Claude Haiku 5.5 from the sources below · 2026-11-21
Description from the CNA
@fastify/express is a compatibility layer that lets Express middleware run inside the Fastify web framework. In versions 4.0.5 through 4.0.9, the plugin matches path-scoped Express middleware with a matcher that requires a non-empty value for a dynamic segment, while Fastify's router accepts an empty parameter or wildcard value. When a route and an Express middleware mount share a dynamic pattern, a request with an empty segment matches the Fastify route and runs the handler while the middleware mounted on that pattern is skipped, so on a scoped mount an unauthenticated request can reach a protected handler. No special configuration is required, and the practical impact depends on what the empty value selects in the application. The issue is fixed in @fastify/express 4.0.10, and users should upgrade to 4.0.10 or later.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| @fastify/express | @fastify/express | 4.0.5 to before 4.0.10 | 4.0.10 | Patch available | CNA |
- @fastify/express Vendor@fastify/express Affected 4.0.5 to before 4.0.10 Fixed in 4.0.10 Patch available CNA
Remediation
Upgrade @fastify/express to version 4.0.10 or later, which fixes the flaw. The sources list no fixed version for any other product.
Written with Claude Haiku 5.5 from the sources below · 2026-11-21
- Fix · CNA @fastify/express (@fastify/express) Fixed in 4.0.10
Fixed in the same release
Records fixed by the same vendor advisory or release, as the CNA lists them.
- Release ·
@fastify/express 4.0.10
5 records Highest priority Priority MEDIUM 4 MEDIUM, 1 LOW
Other records, highest priority first
- TI-2026-96437 @fastify/express path-scoped middleware bypass via URL decoding mismatchPriority MEDIUM 48
- TI-2026-96435 Path-scoped middleware bypass in @fastify/express skips authentication checksPriority MEDIUM 48
- TI-2026-96433 @fastify/express middleware bypass via RegExp mounts under parameterized prefixPriority MEDIUM 48
Timeline
- 2026-11-21 Threatist record created from CVE-2026-124626
- 2026-11-23 CISA SSVC decision points changed
- 2026-11-25 EPSS moved to the below the 50th percentile
References
More @fastify/express vulnerabilities
- TI-2026-96437 @fastify/express path-scoped middleware bypass via URL decoding mismatch CVSS 3.1CRITICAL 9.1
- TI-2026-96435 Path-scoped middleware bypass in @fastify/express skips authentication checks CVSS 3.1CRITICAL 9.1
- TI-2026-96433 @fastify/express middleware bypass via RegExp mounts under parameterized prefix CVSS 3.1CRITICAL 9.1
- TI-2026-81130 Middleware bypass in @fastify/express via absolute-form URLs CVSS 3.1CRITICAL 9.1
- TI-2026-99002 Middleware bypass via empty route parameters in @fastify/express CVSS 3.1CRITICAL 9.1
- TI-2026-96436 Path-scoped middleware bypass in @fastify/express via Unicode case folding CVSS 3.1HIGH 7.4
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences