Read the docs

Middleware bypass via empty route parameters in @fastify/express

Priority MEDIUM 41CWE-287Published · Updated

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

Summary

@fastify/express versions before 4.0.14 are affected. An empty dynamic route parameter reaches a Fastify route handler while Express middleware mounted for that path inside a Router or sub-application is skipped, because Fastify accepts an empty value that Express rejects. An unauthenticated remote attacker can bypass authentication or other middleware-based access controls on affected routes.

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, a request with an empty dynamic route parameter reaches a Fastify route handler while middleware mounted for that path inside an Express Router or sub-application is skipped, because Fastify's router accepts an empty value where Express requires a non-empty one, and an unanchored regular-expression mount passed to the plugin is bypassed the same way. An earlier fix covered only the mount paths passed to the plugin directly, not middleware mounted inside a routed Express application. An attacker can use this to bypass authentication or other middleware-based access controls on the affected routes, with the practical impact depending on what the empty value selects in the application. 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, mount the middleware on a static parent path, or require non-empty values in the route params schema.

Why it matters now

EPSS 0.00756 51st 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 version 4.0.14 or later, which fixes the issue. As a workaround, enforce authentication in a Fastify preHandler hook, mount the middleware on a static parent path, or require non-empty values in the route params schema.

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-99003 Middleware bypass in @fastify/express with case-insensitive routingPriority LOW 33
    • 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-135279

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-96436 Path-scoped middleware bypass in @fastify/express via Unicode case folding CVSS 3.1HIGH 7.4
See all 10 →

Sources

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