Improper Authentication 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.76% (52nd 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 Learn

Learn about Improper Authentication vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-FASTIFYEXPRESS-23050800
  • published30 Nov 2026
  • disclosed26 Nov 2026
  • creditMatteo Collina

Introduced: 26 Nov 2026

NewCVE-2026-135279  (opens in a new tab)
CWE-287  (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 Authentication via empty dynamic route parameters in Express Routers or sub-applications passed to fastify.use(). When a request contains an empty value for a dynamic route segment (e.g. GET /tenants//admin), Fastify's router (find-my-way) accepts the empty segment and dispatches the request to the route handler, while Express's router (path-to-regexp) requires a non-empty value and therefore skips any middleware - including authentication - mounted inside the Express Router or sub-application for that path. The same bypass applies to unanchored regular-expression mounts passed to fastify.use(), where Express only runs a RegExp mount whose match starts the path but the prior check tested the pattern anywhere in the path. An attacker can exploit this to bypass authentication or other middleware-based access controls on affected routes.

CVSS Base Scores

version 4.0
version 3.1