Interpretation Conflict Affecting @fastify/express package, versions >=4.0.5 <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-23050801
  • published30 Nov 2026
  • disclosed26 Nov 2026
  • creditMatteo Collina

Introduced: 26 Nov 2026

NewCVE-2026-135270  (opens in a new tab)
CWE-436  (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 Interpretation Conflict via mount path handling when a path beginning with an Express 5 optional leading segment written as a group (e.g. {/:lang}/admin) is joined to the plugin prefix. The path is treated as relative and a slash is prepended, transforming the mount pattern into one that no longer matches the real request paths (e.g. {/:lang}/admin becomes /{/:lang}/admin, matching only //admin). The middleware therefore never executes for requests that match the intended routes, while the Fastify route handlers still resolve and respond normally. An attacker can exploit this to bypass authentication or other middleware-based access controls on the affected routes.

Note: At the top level this is a regression introduced in 4.0.10; under a prefix ending in a slash it affects every version since 4.0.5, the first to use Express 5.

Workaround

Mount the middleware on each path spelling explicitly (e.g. fastify.use(['/admin', '/:lang/admin'], auth)), or enforce authentication in a Fastify hook such as preHandler that runs after the router has resolved the request.

CVSS Base Scores

version 4.0
version 3.1