Improper Handling of Case Sensitivity Affecting @fastify/express package, versions >=4.0.0 <4.0.10


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.43% (29th 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-22743489
  • published23 Nov 2026
  • disclosed21 Nov 2026
  • creditrootsys-research

Introduced: 21 Nov 2026

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

How to fix?

Upgrade @fastify/express to version 4.0.10 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 Unicode case-folding disagreement between the Fastify router and Express mount-path matching. When caseSensitive: false is configured, find-my-way folds the request path using toLowerCase(), which maps the Unicode character U+212A (KELVIN SIGN, %E2%84%AA) to the ASCII letter k. The normalizeUrl function passes Express the decoded path without applying the same folding, so Express evaluates path-scoped middleware mount paths against a different string than the one the router used to select the handler. A request to /api/%E2%84%AAeys is therefore routed to the /api/keys handler while any authentication, authorization, or rate-limiting middleware mounted at /api/keys never matches and is skipped entirely.

Note: This is only exploitable when the application enables routerOptions.caseSensitive: false and the mount path contains the letter k.

Workaround

Enforce authorization in a Fastify hook (such as preHandler) that runs after the router has resolved the request, rather than relying solely on a path-scoped Express middleware. Leaving routing case-sensitive (the default) also avoids the issue.

CVSS Base Scores

version 4.0
version 3.1