External risk intelligence

Fastify Middie Path Mismatch Allows Unauthenticated Access

CVE advisorySeverity: CRITICAL (CVSS 9.1)

CVE-2026-133250

This vulnerability affects a middleware engine used in the Fastify web framework. Since middleware is core to handling incoming HTTP requests in public-facing web applications and APIs, the vulnerable code path is directly reachable by unauthenticated traffic in any standard deployment of the framework.

Halo Surface Signal: 5 out of 5 — more likely to be public-facing.

External exposure likelihood

Horizon Alert

Summary of the vulnerability and why it matters

The `@fastify/middie` middleware engine for the Fastify web framework has a critical vulnerability that could allow unauthenticated clients to bypass security controls like authentication and rate limiting. This occurs when the path matching used by the middleware differs from the web framework's routing, potentially exposing protected handlers without any special configuration. The issue is fixed in version 9.3.8 and later.

  • Middleware bypasses security for web applications.
  • Potential for unauthorized access to protected services.
  • Confirm relevance and exposure within your Fastify deployments.

Attack Path

How an attacker could exploit the issue

An attacker can bypass authentication or authorization protections by exploiting a mismatch in how @fastify/middie and Fastify's router interpret request paths. This occurs when specific path conditions, such as empty parameters, wildcards, or literal percent signs in the mount path, cause middie to skip middleware that was intended to protect a handler. This bypass allows unauthenticated clients to reach sensitive application handlers without any special configuration, potentially leading to unauthorized access or data manipulation.

  • Unauthenticated network access required.
  • Triggered by specific path patterns.
  • Bypasses security middleware.

Live Threat

Current exploitation, exposure, and threat context

When the path matching in @fastify/middie differs from Fastify's router, unauthenticated requests could bypass intended middleware, such as authentication or authorization checks, when specific path configurations involving empty parameters, wildcards, or literal percent characters are used.

  • Protected application logic.
  • Unauthenticated access to handlers.
  • Unauthorized access to sensitive functions.

Operational Fix

Recommended remediation, mitigation, and detection steps

Real-world response to this critical vulnerability rests with teams managing Fastify applications and their underlying infrastructure, likely application owners, platform engineers, and security operations. The first practical move is to identify all instances of `@fastify/middie` up to version 9.3.7 within your environment, confirm their exposure to unauthenticated access, and assess their criticality to business operations before planning remediation.

  • Application owners should coordinate the upgrade.
  • Verify all Fastify application instances.
  • Plan upgrades during maintenance windows.

Supplementary metadata

Validate whether this threat affects your internet-facing exposure.

Halo Threat Intelligence helps prioritize remediation with Halo Surface Signal and H/A/L/O context. Start exposure validation with a free external attack surface trial.

Frequently asked questions

What is @fastify/middie?

It is a middleware engine for the Fastify web framework in Node.js. Developers use it to run functions like authentication, rate limiting, or logging on incoming HTTP requests before they reach the main application logic. It effectively acts as a gatekeeper that processes traffic based on the URL path.

How does CVE-2026-133250 create a security weakness?

This is a path-related vulnerability (CWE-288, CWE-436) where the middleware engine and the main web framework disagree on how to interpret a URL path. Because of this mismatch, the system may accidentally skip security checks entirely. An unauthenticated request might reach a protected handler because the engine incorrectly decided the middleware did not apply to that specific request.

Do I need special conditions to trigger this path mismatch?

Yes. The vulnerability is triggered by specific URL patterns, including paths containing empty parameters, wildcard characters, or literal percent symbols. Note that standard, simple request paths that do not include these specific elements do not trigger this bypass, though upgrading is still necessary to ensure consistent security across all potential inputs.

Is my application at risk if it is internet-facing?

If your application is reachable from the internet, Halo Surface Signal identifies it as highly likely to be affected. Because middleware runs on every request, the vulnerable code path is directly accessible to unauthenticated traffic. Applications exposing protected APIs or user-facing services via this framework are at the highest risk for unauthorized access.

How do I secure my Fastify deployment?

The most effective way to resolve this is to update your project dependencies to use @fastify/middie version 9.3.8 or later. First, audit your software inventory to locate all applications using version 9.3.7 or earlier, then coordinate with your development team to apply the update and verify that security middleware is once again correctly enforced.

References