Summary
CVE-2026-133250 is a path-scoped middleware bypass (authentication bypass through an interpretation conflict) in @fastify/middie, the middleware engine for the Fastify Node.js framework. Middie matches path-scoped middleware against its own reading of the request path. That reading can differ from the path Fastify’s router uses to dispatch the request. Unauthenticated clients can then reach handlers that authentication, authorization or rate-limiting middleware was meant to protect. The severity is Critical (CVSS 9.1).
Technical details
- Root cause: Middie’s path matching diverges from the path interpretation of Fastify’s router (find-my-way). A request can be routed to a protected handler without matching the middleware mounted for that path. CWE-288 (Authentication Bypass Using an Alternate Path or Channel) and CWE-436 (Interpretation Conflict).
- Trigger conditions: The advisory describes three request patterns.
- Empty parameter or wildcard values. For example,
/tenant//adminmatches the router’s/tenant/:id/adminroute with an emptyid, but middie’s path matching does not allow empty values. Similar cases are/user/against/user/:idand/files/against/files/*path. - Asterisk-form request targets. A target such as
*adminis routed to/adminby the router, which strips the leading asterisk, while middie processes the target as-is. - Encoded percent signs. A literal
%in a mount path stays encoded as%25in the router, but middie decodes it once more. As a result,/100%25matches a/100%mount.
- Empty parameter or wildcard values. For example,
- Attack vector: Network. The attacker needs no authentication, no privileges and no user interaction. The attack uses crafted HTTP request paths.
- Impact: Handlers protected only by path-scoped middie middleware (authentication, authorization or rate limiting) can be reached without passing that middleware. This leads to high confidentiality and integrity impact.
Affected software
- @fastify/middie versions 0 through 9.3.7 (all versions before 9.3.8)
Severity
- CVSS v3.1 base score: 9.1 (Critical)
- Vector:
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Mitigation and recommended actions
- Immediate: Upgrade @fastify/middie to 9.3.8 or later.
- If you cannot patch immediately: Enforce authentication and authorization in a Fastify lifecycle hook that runs after route resolution, such as
preHandler, instead of relying only on path-scoped middie middleware. Base authorization decisions onrequest.routeOptions.urlrather thanrequest.url. - Review applications that mount authentication, authorization or rate-limiting middleware on specific paths through @fastify/middie, particularly routes with parameters, wildcards or
%in the path.

