Improper Handling of Case Sensitivity Affecting @fastify/express package, versions <4.0.14


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.44% (30th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-FASTIFYEXPRESS-23050795
  • published30 Nov 2026
  • disclosed26 Nov 2026
  • creditMatteo Collina

Introduced: 26 Nov 2026

NewCVE-2026-135280  (opens in a new tab)
CWE-178  (opens in a new tab)

How to fix?

Upgrade @fastify/express to version 4.0.14 or higher.

Overview

@fastify/express is an Express compatibility layer for Fastify

Affected versions of this package are vulnerable to Improper Handling of Case Sensitivity via middleware bypass with case-insensitive routing when mount paths contain Unicode characters whose case folding differs from toLowerCase() output, or when an Express Router or application uses a case-sensitive matcher internally. In the first case, a string mount path or plugin prefix containing characters such as İ (U+0130) or ẞ (U+1E9E) fails to match the lowercased request path because the i flag of a regular expression does not fold those characters the same way toLowerCase() does. In the second case, a RegExp mount path without the i flag, a Router({ caseSensitive: true }), or an application with case sensitive routing enabled only matches its own casing, so the request reaches the Fastify route handler while path-scoped middleware - including authentication middleware - does not run. An attacker can exploit either path to bypass authentication or other middleware-based access controls on the affected routes.

Note: This is only exploitable when the application sets routerOptions.caseSensitive: false.

CVSS Base Scores

version 4.0
version 3.1