@fastify/express vulnerable to middleware bypass via non-string mount paths in prefixed plugins
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-285.
Summary
@fastify/express versions 4.0.6 and earlier only rewrite the plugin prefix for middleware mount paths when the path argument is a string. Non-string mount paths (arrays of paths and regular expressions) are left unprefixed inside prefixed plugin scopes, so middleware registered with those forms does not match the actual prefixed request path. Applications that use path-scoped middleware for authentication, authorization, rate limiting, or auditing on routes inside a prefixed scope can be bypassed by sending a request to the prefixed route, because Fastify still matches the route but the middleware is skipped. Patches: upgrade to @fastify/express 4.0.7. Workarounds: use string mount paths instead of arrays or regular expressions in prefixed plugins, or register one use call per path.
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 | before 4.0.7 | 4.0.7 | Patch available | CNA |
- @fastify/express Vendor@fastify/express Affected before 4.0.7 Fixed in 4.0.7 Patch available CNA
Remediation
- Fix · CNA @fastify/express (@fastify/express) Fixed in 4.0.7
Timeline
- 2026-10-02 Threatist record created from CVE-2026-6556
References
More @fastify/express vulnerabilities
- TI-2026-81130 Middleware bypass in @fastify/express with absolute-form URLs CVSS 3.1CRITICAL 9.1
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences