Middleware bypass in @fastify/express with absolute-form URLs
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- High · High · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA.
Summary
@fastify/express versions from 4.0.5 before 4.0.9 are affected. With the non-default ignoreDuplicateSlashes option enabled, the plugin matches scoped Express middleware against a URL whose separator after an absolute-form target's scheme was collapsed (CWE-436). An unauthenticated remote attacker can use an absolute-form request target to reach a handler on a scoped admin route while authentication, authorization or rate limiting middleware is skipped.
Written with Claude Haiku 5.5 from the sources below · 2026-11-04
Description from the CNA
@fastify/express is a Fastify plugin that runs Express middleware inside Fastify. In versions 4.0.5 through 4.0.8, when Fastify runs with the non-default ignoreDuplicateSlashes option enabled, the plugin matches path-scoped Express middleware against a URL whose duplicate-slash normalization has also collapsed the separator after an absolute-form request target's scheme, so Fastify's router resolves the request to the scoped path and runs the handler while the Express layer no longer sees that path. As a result, a request using an absolute-form target can reach a handler on a scoped route such as an admin path while the middleware for authentication, authorization, or rate limiting is skipped. An unauthenticated attacker needs only the non-default ignoreDuplicateSlashes option to be enabled. The issue is fixed in @fastify/express 4.0.9, and users should upgrade to 4.0.9 or later. As a workaround, enforce authentication in a Fastify hook such as preHandler that runs after the router resolves the request, or leave ignoreDuplicateSlashes at its default.
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.9 | 4.0.9 | Patch available | CNA |
- @fastify/express Vendor@fastify/express Affected 4.0.5 to before 4.0.9 Fixed in 4.0.9 Patch available CNA
Remediation
Upgrade @fastify/express to version 4.0.9 or later, which fixes this issue. As a workaround, enforce authentication in a Fastify preHandler hook or leave ignoreDuplicateSlashes at its default.
Written with Claude Haiku 5.5 from the sources below · 2026-11-04
- Fix · CNA @fastify/express (@fastify/express) Fixed in 4.0.9
Timeline
- 2026-10-27 Threatist record created from CVE-2026-112362
- 2026-10-28 Priority changed: MEDIUM → LOW
- 2026-11-04 CISA SSVC decision points changed
- 2026-11-04 Priority changed: LOW → MEDIUM
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences