Path-scoped middleware bypass in @fastify/express skips authentication checks
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-863.
Summary
@fastify/express versions from 4.0.0 before 4.0.10 join a path-scoped middleware's mount path to the Fastify plugin prefix by string concatenation. When the prefix ends with a slash or the mount path omits its leading slash, Express fails to match the route that Fastify still serves, so the middleware is silently skipped (CWE-436). An unauthenticated remote attacker can reach protected routes in applications that use path-scoped Express middleware for authentication or authorization inside a prefixed plugin, and string, array, and regular-expression mount paths are all affected.
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.0 through 4.0.9, the plugin joins a path-scoped middleware's mount path to the Fastify plugin prefix by string concatenation, so when the plugin prefix ends with a slash or the mount path omits its leading slash, the resulting Express mount path does not line up with the route the Fastify router serves. Express then fails to match and passes the request on while the Fastify router still dispatches the route, so the middleware is silently skipped. An application that uses path-scoped Express middleware for authentication or authorization inside a prefixed plugin can expose protected routes to unauthenticated clients, with no crafted request and no non-default option required, and string, array, and regular-expression mount paths are all affected. 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.0 to before 4.0.10 | 4.0.10 | Patch available | CNA |
- @fastify/express Vendor@fastify/express Affected 4.0.0 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 issue.
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-96434 Middleware bypass in @fastify/express via empty route parametersPriority 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-129504
- 2026-11-23 CISA SSVC decision points changed
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-96434 Middleware bypass in @fastify/express via empty route parameters 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