Read the docs

Middleware bypass in @fastify/express with case-insensitive routing

Priority LOW 33CWE-178Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
High
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 before 4.0.14 can skip path-scoped Express middleware when an application enables case-insensitive routing. A string mount path or plugin prefix containing a Unicode character whose case folding differs from lowercase conversion fails to match, and a case-sensitive matcher inside an Express Router or application matches only its own casing. A request then reaches the Fastify route handler without running the middleware, so an unauthenticated remote attacker can bypass middleware-based authentication or access controls on affected routes (CWE-178). Only applications that enable case-insensitive routing are affected.

Written with Claude Haiku 5.5 from the sources below · 2026-11-26

Description from the CNA

@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.

Why it matters now

EPSS 0.00435 29th percentileScored 2026-11-30
Fix Fixed @fastify/express (@fastify/express): 4.0.14

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
@fastify/express@fastify/expressbefore 4.0.144.0.14Patch availableCNA
  • @fastify/express Vendor@fastify/express Affected before 4.0.14 Fixed in 4.0.14 Patch available CNA

Remediation

Upgrade @fastify/express to 4.0.14 or later, which fixes the issue. Until then, enforce authentication in a Fastify hook such as preHandler that runs after routing, avoid Unicode characters in mount paths, and match case-insensitively inside Express routers and applications.

Written with Claude Haiku 5.5 from the sources below · 2026-11-26

  • Fix · CNA @fastify/express (@fastify/express) Fixed in 4.0.14

Fixed in the same release

Records fixed by the same vendor advisory or release, as the CNA lists them.

  • Release ·

    @fastify/express 4.0.14

    5 records Highest priority Priority MEDIUM 1 MEDIUM, 4 LOW

    Other records, highest priority first

    • TI-2026-99002 Middleware bypass via empty route parameters in @fastify/expressPriority MEDIUM 41
    • TI-2026-99001 Middleware bypass in @fastify/express via optional group mount pathsPriority LOW 33
    • TI-2026-99000 Middleware bypass in @fastify/express via nested mount path arraysPriority LOW 33

Timeline

  1. 2026-11-26 Threatist record created from CVE-2026-135280

References

  • TI-2026-96437 @fastify/express path-scoped middleware bypass via URL decoding mismatch CVSS 3.1CRITICAL 9.1
  • TI-2026-96435 Path-scoped middleware bypass in @fastify/express skips authentication checks 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
See all 10 →

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences