Skip to main content

@fastify/middie CVE-2026-85184

| EUVDEUVD-2026-70979 CRITICAL
Interpretation Conflict (CWE-436)
2026-09-04 openjs
9.1
CVSS 3.1 · Vendor: openjs
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify Fastify app using path-scoped middie auth
  2. Delivery
    Craft absolute-form request target for protected route
  3. Exploit
    Middie skips path-scoped auth middleware
  4. Execution
    Router resolves path and invokes handler
  5. Impact
    Access protected data or privileged action

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V4 - API and Web Service Interpretation consistency
Exploitation Conditions

Exploitation requires that the target Fastify application uses @fastify/middie (9.1.0-9.3.3) with PATH-SCOPED middleware - i.e. middleware registered against a specific path/prefix - to enforce authentication or authorization, and that the server accepts absolute-form request targets (targets beginning with a scheme such as 'http://host/...'). The attacker sends such an absolute-form request to a protected route; middie's raw-target match misses while the router resolves the path and dispatches the handler. It is unauthenticated, network-reachable, and needs no user interaction (AV:N/AC:L/PR:N/UI:N). Limiting factors: applications that enforce access control via per-route Fastify hooks (onRequest/preHandler) rather than path-scoped middie middleware, or that reject absolute-form targets at a proxy, are not exploitable; apps using middie only for non-security middleware (logging, body parsing) face no access-control impact.

Impact

The vendor CVSS is 9.1 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N), which is consistent with the description: a network-reachable, unauthenticated, low-complexity request that requires no user interaction and yields high confidentiality and integrity impact by reaching handlers that should have been gated. There is no EPSS score, no CISA KEV listing, and no public proof-of-concept in the provided data, so this is a high-severity-by-design issue rather than a confirmed exploited one - the risk is driven by how easy it is to trigger, not by observed attacks. The A:N rating is appropriate because the bypass exposes/alters protected functionality rather than crashing the service, though downstream availability impact is possible if the now-reachable handlers perform destructive actions. Realistically, any Fastify deployment that enforces authn/authz through path-scoped middie middleware is exposed regardless of size, and such teams should prioritize the upgrade quickly given the trivial exploitation path. The main uncertainty is deployment-specific: apps that authenticate via per-route hooks or Fastify onRequest hooks rather than path-scoped middie middleware are not affected, so blast radius depends on how each application wires its access controls.

Exploit ScenarioDerived

A Fastify app protects /admin with path-scoped middie authentication middleware. An unauthenticated attacker sends a request with an absolute-form target ('GET http://victim.example/admin/users HTTP/1.1'); middie fails to match the /admin scope and skips the auth middleware, while Fastify's router resolves the target to /admin/users and invokes the real handler, returning protected data or performing privileged actions. No authentication, user interaction, or special tooling is required, though no public PoC was identified at time of analysis.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 04, 2026

Path-based access-control bypass in @fastify/middie (Fastify's Express-style middleware engine) versions 9.1.0 through 9.3.3 lets an unauthenticated remote attacker skip path-scoped middleware - including authentication and authorization - by sending an absolute-form request target. Middie matches middleware against the raw request target while the Fastify router resolves absolute-form targets to their path before dispatch, so the handler runs but the guarding middleware does not. No public exploit was identified at time of analysis, but the flaw is trivially triggerable and remediated in 9.3.4.

RemediationAI

Vendor-released patch: upgrade @fastify/middie to 9.3.4 or later (npm install @fastify/middie@^9.3.4, then rebuild and redeploy), per GHSA-hx87-8wv7-pjv8. If an immediate upgrade is not possible, compensating controls include rejecting or normalizing absolute-form request targets before they reach the application - for example, placing a reverse proxy (nginx, HAProxy) in front that only forwards origin-form paths, or adding an early Fastify onRequest hook that inspects req.raw.url / the request target and returns 400 when it is absolute-form (contains a scheme like 'http://'); note this hook must run before route dispatch and can break legitimate proxied traffic if such requests are expected. As a more robust structural fix, move authentication/authorization off path-scoped middie middleware and onto per-route preHandler/onRequest hooks, which evaluate the router-resolved path and are not subject to this mismatch; the trade-off is refactoring effort. Do not rely on WAF path-prefix rules alone, since they may reproduce the same raw-vs-resolved discrepancy.

Affected VersionsENISA

@fastify/middie 9.1.0 <9.3.4

Affected Packages

euvd fastify_middie fix: 9.3.4

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The affected component is @fastify/middie, the plugin that provides Express-style middleware (app.use / path-scoped middleware) inside the Fastify Node.js web framework. The root cause is CWE-436 (Interpretation Conflict): two layers disagree on what string represents the request path. HTTP allows absolute-form request targets (e.g. 'GET http://host/protected/resource HTTP/1.1'), normally seen with proxies. Middie decides whether a path-scoped middleware chain applies by string-matching against that raw, unresolved target, whereas Fastify's router first normalizes the absolute-form target down to its origin-form path ('/protected/resource') before selecting and invoking the route handler. Because the prefix comparison in middie sees 'http://host/...' and fails to match the intended '/protected' scope, the middleware is silently skipped while the router still dispatches to the real handler. The single affected CPE is cpe:2.3:a:@fastify/middie:@fastify/middie:*, i.e. the npm package itself; only apps that rely on middie path-scoped middleware for access control are impacted.

Know when Fastify Middie gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (openjs) PRIMARY 9.1 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
vuln.today AI 9.1 CRITICAL

Unauthenticated network request with no interaction bypasses access control (PR:N/UI:N/AC:L); protected data read and altered give C:H/I:H, no direct availability loss so A:N.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (openjs).

CVSS VectorVendor: openjs

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

Lifecycle Timeline

2
Patch available
Sep 04, 2026 - 11:02 EUVD
CVE Published
Sep 04, 2026 - 09:15 cve.org
CRITICAL 9.1

DescriptionCVE.org

@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.

Technical POC Analysis

CWE-436 Interpretation Conflict.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

A critical authentication bypass vulnerability in @fastify/middie versions 9.1.0-9.3.3 allows unauthenticated remote attackers to skip configured security middleware, potentially gaining unauthorized access to protected application resources. Any organization running Node.js applications with these versions faces immediate risk of complete authentication bypass through trivial exploitation. Urgent patching is required across all affected deployments.

Business Impact: Severe
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.5%
Top 56% exploitable
Prevalence
Medium
widely-used Fastify middleware plugin, but only auth-via-path-scoped-middie apps affected
Social Media
2
Sightings
Data Quality
7 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Total

Priority Score

47
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +46
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy