CVE-2026-132133 @fastify/middie vulnerable to path-scoped middleware bypass via duplicate-slash mount path

Medium 4.8 Published Updated
Exploited in the wild
Not known
Fix
None listed

What is CVE-2026-132133?

CVE-2026-132133 is a medium-severity vulnerability in @fastify/middie, published on 19 Nov 2026.

Official description

@fastify/middie is the middleware engine that adds Express and Connect style middleware support to Fastify. In versions up to and including 9.3.6, middie builds the match regular expression for each path-scoped middleware from its mount path without collapsing duplicate slashes, even when the application enables the ignoreDuplicateSlashes router option. Under that option Fastify's router collapses duplicate slashes in both the registered route and the request path, so a mount path containing a doubled slash is served by the router at its single-slash form while the middleware's compiled match still requires the doubled slash and never matches. A path-scoped middleware such as authentication, authorization, or rate limiting is therefore skipped while the router dispatches the request to the protected handler, without any authentication required. Applications are affected when they enable ignoreDuplicateSlashes and a middleware mount path reaches middie with a duplicate slash, most commonly when a plugin prefix that ends with a slash is joined to a mount path that starts with one. The issue is fixed in @fastify/middie 9.3.7, and users should upgrade to 9.3.7 or later. As a workaround, enforce authorization in a Fastify hook such as preHandler that runs after routing, and avoid mount paths and plugin prefixes that introduce duplicate slashes.

Weakness: CWE-436

Which versions are affected by CVE-2026-132133?

1 open source package ship an affected version, including %40fastify/middie.

PackageAffectedFixed in
%40fastify/middie npm
pkg:npm/%40fastify/middie
All versions9.3.7

How do I fix CVE-2026-132133?

Upgrade each affected package to the fixed version listed for it above. Each package has its own fixed versions.

Is CVE-2026-132133 being exploited?

There is no known exploitation of CVE-2026-132133 in the wild and no public exploit code.

Sources

Also known as GHSA-56jq-34pf-p873.

Is CVE-2026-132133 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free