Vulnerability · Published Apr 15, 2026 · Assigned by openjs

CVE-2026-33807@fastify/express vulnerable to middleware path doubling causing authentication bypass in child plugin scopes

Critical 9.1

In plain English

A critical-severity security flaw in @fastify/express from fastify. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 37% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)9.1Critical
Exploit odds (30 days)0.4%top 62.6% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official description

@fastify/express v4.0.4 and earlier contains a path handling bug in the onRegister function that causes middleware paths to be doubled when inherited by child plugins. When a child plugin is registered with a prefix that matches a middleware path, the middleware path is prefixed a second time, causing it to never match incoming requests. This results in complete bypass of Express middleware security controls, including authentication, authorization, and rate limiting, for all routes defined within affected child plugin scopes. No special configuration or request crafting is required. Upgrade to @fastify/express v4.0.5 or later.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
npm@fastify/express4.0.5GHSA-hrwm-hgmj-7p9c

Affected products (as reported)

VendorProductVersions
fastify @fastify/express 0 – before 4.0.5

Weakness: CWE-436 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

References