CVE-2026-85184
largeAuth Bypass in @fastify/middie via Absolute-Form Request Targets
@fastify/middie, the middleware engine used to run Express-style middleware inside Fastify, decides whether to run path-scoped middleware by matching the raw request target, while Fastify's router resolves absolute-form request targets to their path before dispatching, so the two layers evaluate different strings (a CWE-436 interpretation conflict). An unauthenticated network attacker can send a request whose request line uses an absolute-form target, which then reaches the route handler while path-scoped middleware such as authentication or authorization is skipped. The attacker gains the ability to bypass path-based access controls in the affected application and reach protected endpoints without credentials. Affected users are operators of Fastify applications running @fastify/middie 9.1.0 through 9.3.3 that rely on middie path-scoped middleware for access control on reachable routes. There is no public proof of concept, the flaw is not in CISA KEV, and EPSS estimates a 0.3% 30-day exploitation probability, so no exploitation is currently known.
What to do: Upgrade to @fastify/middie 9.3.4 or later. As an interim mitigation, do not rely on middie path-scoped middleware for authentication or authorization on internet-facing routes; enforce access control in Fastify's own lifecycle hooks (which see the resolved route) or normalize request targets at the proxy layer. Audit your Fastify applications for @fastify/middie in the 9.1.0-9.3.3 range and check whether any front-end proxy forwards absolute-form request targets to the application.
| Fastify @fastify/middie (npm) | >= 9.1.0 and < 9.3.4 |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
@fastify/middie versions >= 9.1.0 and before 9.3.4 decide whether to run path-scoped middleware by matching against the raw request target, while the Fastify router resolves an absolute-form request target to its path before dispatching. Because the two layers evaluate different strings, a request using an absolute-form target reaches the route handler while the path-scoped middleware, such as authentication or authorization, is skipped. An unauthenticated network attacker can use this to bypass path-based access controls in a Fastify application that relies on middie for those controls. Users should upgrade to @fastify/middie 9.3.4 or later.
- Vendors
- fastify
- Products
- fastify\/middie
- Weakness
- CWE-436
- Vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
In the news0 stories
No ingested article mentions this CVE yet.