Description
@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.
Published: 2026-09-04
Score: 9.1 Critical
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

@fastify/middie selects path‑scoped middleware by matching the raw request target, while the Fastify router normalises an absolute‑form request target to a path before dispatching. Because the match strings differ, an attacker can send a request whose request line contains an absolute‑form URL and cause the middleware – for example authentication or authorization – to be skipped while the route handler is executed. The result is that a client can bypass path‑based access controls and gain unauthorized access to data or functionality that should have been protected. This corresponds to CWE‑436 and results in a privilege escalation type of impact.

Affected Systems

Affected by the Fastify middleware package @fastify/middie. All releases from version 9.1.0 up to, but excluding, 9.3.4 are vulnerable. Applications built with Fastify that rely on @fastify/middie for authentication or authorization middleware exposed to network traffic are at risk. No other vendors or products are listed.

Risk and Exploitability

The vulnerability has a CVSS score of 9.1, indicating high severity. EPSS is not provided, and the vulnerability is not listed in the CISA KEV catalog. The attack requires the ability to send an HTTP request with an absolute‑form target to a Fastify server that uses middie; this is usually achievable from any external network client. Because the bypass enables skipping of middleware control, a remote attacker can achieve unauthorized access without needing credentials. Given the high score and the nature of the exploitation path, this vulnerability represents a high‑risk, remote path‑based access‑control bypass.

Generated by OpenCVE AI on September 4, 2026 at 10:22 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update @fastify/middie to version 9.3.4 or later to apply the fixed middleware matching logic.
  • Verify that any route handlers that rely on middie for authentication or authorization remain protected after the upgrade and that middleware ordering has not been inadvertently changed.
  • Until the upgrade is applied, configure the front‑end proxy or load balancer to reject absolute‑form request targets, thereby limiting the attack surface to relative‑path requests.

Generated by OpenCVE AI on September 4, 2026 at 10:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 04 Sep 2026 14:30:00 +0000

Type Values Removed Values Added
First Time appeared Fastify
Fastify fastify/middie
Vendors & Products Fastify
Fastify fastify/middie

Fri, 04 Sep 2026 09:30:00 +0000

Type Values Removed Values Added
Description @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.
Title @fastify/middie vulnerable to path-scoped middleware bypass via absolute-form request target
Weaknesses CWE-436
References
Metrics cvssV3_1

{'score': 9.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N'}


Subscriptions

Fastify Fastify/middie
cve-icon MITRE

Status: PUBLISHED

Assigner: openjs

Published:

Updated: 2026-09-04T19:36:20.968Z

Reserved: 2026-09-03T11:39:08.481Z

Link: CVE-2026-85184

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-04T10:17:13.900

Modified: 2026-09-04T20:17:31.670

Link: CVE-2026-85184

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-04T14:15:07Z

Weaknesses