Summary
CVE-2026-112362 is a path-scoped middleware bypass (CWE-436, Interpretation Conflict) in @fastify/express, the Fastify plugin that runs Express middleware inside Fastify. When Fastify runs with the non-default ignoreDuplicateSlashes option, an unauthenticated remote attacker can skip middleware on scoped routes. The CVSS v3.1 base score is 9.1 (Critical).
Technical details
- Root cause: With
ignoreDuplicateSlashesenabled, the plugin matches path-scoped Express middleware against a URL whose duplicate-slash normalization also collapses the separator after the scheme of an absolute-form request target. The Fastify router and the Express middleware layer therefore disagree on the canonical path. - Trigger conditions: Fastify is configured with
routerOptions.ignoreDuplicateSlashes: true, which is not the default. Express middleware is registered on a specific path prefix. The attacker sends an absolute-form request target, for exampleGET http://host/admin/dashboard. - Attack vector: Network. No privileges or user interaction are required, and attack complexity is low.
- Impact: Security middleware on scoped routes can be bypassed. This includes authentication, authorization and rate limiting. Protected handlers can be reached without those checks, which gives high confidentiality and integrity impact. The advisory reports no availability impact.
Affected software
- @fastify/express versions 4.0.5 through 4.0.8, when
ignoreDuplicateSlashesis enabled.
Severity
- CVSS v3.1 base score: 9.1 (Critical)
- Vector:
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Mitigation and recommended actions
- Immediate: Upgrade @fastify/express to 4.0.9 or later.
- If you cannot upgrade immediately:
- Keep
ignoreDuplicateSlashesdisabled, which is the default. - Enforce authentication in a Fastify
preHandlerhook, which runs after routing, instead of relying only on path-scoped Express middleware.
- Keep

