Cloudanix VulnDB

CVE-2026-6270

Critical · 9.1

CVSS

9.1

EPSS

0.6%

Published

Apr 16, 2026

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

Some Fastify web applications may accidentally let outsiders access protected features without logging in, and the affected dependency must be upgraded to fix it.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Full Compromise
Component
Web Framework
Class
Authentication Bypass
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

@fastify/middie 9.3.1 and earlier can fail to apply middleware registered in a parent Fastify scope to routes registered inside child plugin scopes. If an application relies on parent-scope middleware for authentication or authorization, routes inside affected child plugin scopes may be reachable without those checks. The flaw is remotely exploitable over the network, requires no prior authentication or user interaction, and can expose protected functionality or data depending on which routes are defined in the child scope.

Why it matters to the business

Applications that use @fastify/middie for access control may unintentionally expose protected API routes to unauthenticated users. This can lead to unauthorized access to sensitive data, unauthorized changes through privileged endpoints, account or tenant data exposure, and compliance-impacting security incidents. The CVSS score is critical, but EPSS is currently low and there is no known KEV listing or public exploit maturity reported; urgency should still be high for internet-facing or sensitive Fastify services because the issue is a design/logic bypass with no workaround other than upgrading or correcting route-level protections.

How an attack unfolds

An attacker identifies a Fastify service that uses @fastify/middie 9.3.1 or earlier and has protected routes registered inside child plugin scopes. The application owner may believe parent-scope authentication middleware protects those child routes, but the vulnerable middleware inheritance behavior means the child plugin engine instance does not directly register the inherited middleware. The attacker sends requests directly to routes defined in the child plugin scope without presenting valid credentials. If those routes lack their own explicit authentication or authorization checks, the service processes the request as though it were allowed, potentially returning protected data or performing state-changing operations. Exploitation success depends on application structure: services that do not rely on parent-scope middleware for child-plugin route protection are not directly exposed to this bypass pattern.

How to fix it

Upgrade @fastify/middie to version 9.3.2 or later. Because the advisory states there are no workarounds, do not rely solely on configuration changes as a permanent fix. After upgrading, redeploy affected services and rebuild lockfiles or container images so runtime dependencies actually include the fixed package. As a defense-in-depth measure, review Fastify plugin structure and ensure sensitive routes have explicit authentication and authorization enforcement in the route scope or plugin scope where they are registered. If immediate upgrade is not possible, temporarily restrict network access to potentially affected APIs through an upstream gateway, WAF, reverse proxy, allowlist, or service mesh policy, and consider disabling high-risk child-plugin routes until patched.

How to confirm the fix worked

Confirm the deployed dependency tree resolves @fastify/middie to 9.3.2 or later using package manager inspection such as `npm ls @fastify/middie`, `pnpm why @fastify/middie`, or `yarn why @fastify/middie`. Verify lockfiles and software composition analysis results no longer show @fastify/middie 9.3.1 or earlier. In a staging or controlled test environment, create or identify a route registered in a child plugin scope that should be protected by parent-scope middleware, then send requests without credentials and confirm the service returns an authentication or authorization failure rather than a successful response. Also confirm authenticated requests still succeed. For containerized deployments, validate the running image digest was rebuilt after dependency upgrade and does not contain an older `node_modules/@fastify/middie` package.

Typical attack path

  1. Identify a Fastify application or API endpoint that may use @fastify/middie.
  2. Enumerate public routes and infer child-plugin route boundaries from URL patterns, API documentation, errors, or behavior differences.
  3. Send unauthenticated requests to routes that are expected to require authentication.
  4. Observe whether protected child-scope routes return successful responses instead of authentication failures such as 401 or 403.
  5. Use the accessible routes to read sensitive information or invoke unauthorized actions, depending on route functionality.
  6. Repeat access across additional child-plugin routes that rely on inherited parent middleware rather than explicit local checks.

How to detect it

There is no universal exploit payload or unique network signature for this vulnerability because exploitation consists of ordinary HTTP requests reaching routes that should have required authentication. Detection should focus on behavioral evidence. Review API gateway, reverse proxy, load balancer, application, and authentication logs for requests to protected endpoints that returned successful 2xx or state-changing 3xx responses without an authenticated user, valid session, bearer token, API key, or authorization context. Compare pre- and post-fix behavior for routes registered under Fastify child plugins. Look for anonymous requests to administrative, user-data, account-management, export, mutation, or internal API paths that normally generate 401 or 403 responses when unauthenticated. Correlate successful unauthenticated requests with downstream data access, updates, deletes, exports, or privilege-changing operations. If threat hunting across the publication window, prioritize activity after 2026-04-16 and any period before services were upgraded to @fastify/middie 9.3.2 or later. Because no named threat actors or KEV exploitation are reported, treat findings as suspicious based on route sensitivity and authentication absence rather than on a known actor-specific indicator.

What your security team should do

  • Prioritize upgrade to @fastify/middie 9.3.2 or later for all Fastify services that expose APIs, especially internet-facing or sensitive business-function services.
  • Inventory applications using @fastify/middie 9.3.1 or earlier through SCA, lockfile scanning, container image scanning, and repository search.
  • Identify Fastify applications that register authentication or authorization middleware in a parent scope and define protected routes inside child plugin scopes; treat those as highest-risk.
  • Perform targeted unauthenticated access testing against sensitive child-plugin routes after patching to confirm authentication is enforced.
  • Review access logs for successful unauthenticated or anonymous requests to routes that should require authentication, especially since publication on 2026-04-16.
  • Add regression tests that verify protected routes return 401 or 403 when credentials are absent or invalid.
  • If patching is delayed, restrict exposure at the gateway or network layer and disable or isolate high-risk routes until the fixed dependency is deployed.

The record

@fastify/middie versions 9.3.1 and earlier do not register inherited middleware directly on child plugin engine instances. When a Fastify application registers authentication middleware in a parent scope and then registers child plugins with @fastify/middie, the child scope does not inherit the parent middleware. This allows unauthenticated requests to reach routes defined in child plugin scopes, bypassing authentication and authorization checks. Upgrade to @fastify/middie 9.3.2 to fix this issue. There are no workarounds.

Affected packages

Ecosystem Package Introduced Fixed
npm @fastify/middie 0 9.3.2

Related vulnerabilities