Interpretation Conflict 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.52% (38th 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-22743476
  • published23 Nov 2026
  • disclosed21 Nov 2026
  • creditzachariah-mithani, eliteaja11-dev, hwi-yong

Introduced: 21 Nov 2026

NewCVE-2026-129504  (opens in a new tab)
CWE-436  (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 Interpretation Conflict via the path-scoped middleware mount path joining logic in index.js, which concatenates a middleware's mount path to the Fastify plugin prefix by string concatenation. When the plugin prefix ends with a slash or the mount path passed to use() omits its leading slash, the resulting Express mount path does not align with the route the Fastify router serves. Express fails to match and calls the next handler while the Fastify router still dispatches the route, so the middleware is silently skipped. An application using path-scoped Express middleware for authentication or authorization inside a prefixed Fastify plugin exposes protected routes to unauthenticated clients, and string, array, and regular-expression mount paths are all affected.

Workaround

Write the mount path so it aligns with the served route: give the mount path a leading slash and do not end the plugin prefix with a slash, so the two join cleanly (for example, a /api prefix with use('/secret', ...) yields /api/secret).

CVSS Base Scores

version 4.0
version 3.1