CVE-2026-85184
CriticalCVSS 9.1Summary
In @fastify/middie versions >= 9.1.0 and before 9.3.4, the decision to run path-scoped middleware is made 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.
Risk Assessment
Risk of bypassing authentication and authorization mechanisms based on path, potentially leading to unauthorized access to protected application resources.
Recommendation
Upgrade @fastify/middie to version 9.3.4 or later to remediate the vulnerability.
Other vulnerabilities in @fastify/middie
See all- CVE-2026-33804High
Versions @fastify/middie 9.3.1 and earlier are vulnerable to middleware bypass when the deprecated ignoreDuplicateSlashes option is enabled. The middleware path matching logic does not account for duplicate slash normalization, allowing requests with duplicate slashes to bypass authentication and authorization checks.
- CVE-2026-22031High
The @fastify/middie plugin prior to version 9.1.0 has a vulnerability that allows bypassing registered middleware using URL-encoded characters. Attackers can access protected endpoints without the constraints imposed by the middleware.
- CVE-2026-14198Critical
A vulnerability in @fastify/middie versions 9.1.0 through 9.3.2 causes a mismatch in handling encoded slashes (%2F) between the middleware and Fastify's router. An attacker can bypass middleware used for authentication, authorization, rate limiting, or auditing by sending a crafted request with an encoded slash in the parameter position.
- CVE-2026-6270Critical
Versions of @fastify/middie up to 9.3.1 do not register inherited middleware directly on child plugin engine instances. This allows unauthenticated requests to bypass authentication and authorization checks for routes defined in child plugins.
- CVE-2026-2880Critical
A vulnerability in @fastify/middie versions < 9.2.0 can result in authentication/authorization bypass when using path-scoped middleware. When Fastify router normalization options are enabled, crafted request paths may bypass middleware checks.
- CVE-2026-14181High
Vulnerability in @fastify/middie versions 9.1.0 through 9.3.2 causes Node.js process termination when processing malformed percent-encoded sequences in request paths. The issue only affects the standalone engine API (middie.run), not the Fastify plugin path.
Original NVD description (English source)
@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.

