CVE-2026-135280: @fastify/express vulnerable to middleware bypass with case-insensitive routing via Unicode mount paths and case-sensitive matchers

Published Nov 26, 2026
·
Updated

@fastify/express is the plugin that lets an application run Express middleware and Express applications inside the Fastify web framework. In versions before 4.0.14, when an application enables case-insensitive routing, middleware mounted on a path can still be skipped in two cases: a string mount path or plugin prefix containing a Unicode character whose case folding differs from a plain lowercase conversion fails to match the lowercased request path, and a matcher that stays case-sensitive inside an Express Router or application, such as a regular expression without the ignore-case flag or an explicitly case-sensitive router, only matches its own casing. In both cases a request reaches the Fastify route handler while the path-scoped middleware does not run. An attacker can use this to bypass authentication or other middleware-based access controls on the affected routes, and only applications that enable case-insensitive routing are affected. The issue is fixed in @fastify/express 4.0.14, and users should upgrade to 4.0.14 or later. As a workaround, enforce authentication in a Fastify hook such as preHandler that runs after routing, avoid such Unicode characters in mount paths, and match case-insensitively inside Express routers and applications.

Affected Software

1 affected component
npm/@fastify/express<4.0.14

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade @fastify/express to a version that resolves this vulnerability.

    Fixed in 4.0.14
  2. Compensating control

    Enforce authentication in a Fastify hook such as preHandler that runs after routing.

  3. Compensating control

    Avoid Unicode characters in middleware mount paths and plugin prefixes.

  4. Compensating control

    Match case-insensitively inside Express routers and applications.

Event History

Nov 26, 2026
CVE Published
via MITRE·05:00 PM
Data Sourced
via MITRE·05:00 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which applications are exposed?

Only applications using @fastify/express before 4.0.14 that have enabled case-insensitive routing are affected. Exposure exists where authentication or other access controls rely on middleware mounted on affected paths.

2

What does an attacker need to exploit this?

The attacker needs network access to send a crafted request; no privileges or user interaction are required. Exploitation depends on either Unicode characters in a string mount path or plugin prefix with unusual case-folding behavior, or a case-sensitive matcher inside an Express Router or application.

3

How can access controls be protected if an immediate upgrade is not possible?

Enforce authentication in a Fastify hook such as preHandler, which runs after routing. Also avoid the affected Unicode characters in mount paths and avoid case-sensitive matchers where case-insensitive routing is enabled.

4

How can teams determine whether they are affected?

Check whether the application uses @fastify/express earlier than 4.0.14 and enables case-insensitive routing. Then review middleware mount paths and plugin prefixes for Unicode characters, and review Express routers or applications for regular expressions without an ignore-case flag or explicitly case-sensitive routing.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203