Read the docs
TI-2026-17725 Aliases CVE-2026-22031GHSA-cxrg-g7r8-w69p

Fastify Middie Middleware Path Bypass

Priority HIGH 71CWE-177Published · Updated

Key facts

Attack vector
Network
Privileges required
Low
User interaction
None
Attack complexity
Low
Impact type
—
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub.

Summary

@fastify/middie is the plugin that adds middleware support on steroids to Fastify. A security vulnerability exists in @fastify/middie prior to version 9.1.0 where middleware registered with a specific path prefix can be bypassed using URL-encoded characters (e.g., `/%61dmin` instead of `/admin`). While the middleware engine fails to match the encoded path and skips execution, the underlying Fastify router correctly decodes the path and matches the route handler, allowing attackers to access protected endpoints without the middleware constraints. Version 9.1.0 fixes the issue.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00532 45th percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Fixed middie (fastify): 9.1.0@fastify/middie (npm): 9.1.0

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
fastifymiddiebefore 9.1.09.1.0Patch availableCNA
—@fastify/middie (npm)before 9.1.09.1.0Patch availableGHSA-cxrg-g7r8-w69p
  • middie Vendorfastify Affected before 9.1.0 Fixed in 9.1.0 Patch available CNA
  • @fastify/middie (npm) Vendor— Affected before 9.1.0 Fixed in 9.1.0 Patch available GHSA-cxrg-g7r8-w69p

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:fastify:fastify\/middie:*:*:*:*:*:node.js:*:*before 9.1.0Vulnerablefastify
  • cpe:2.3:a:fastify:fastify\/middie:*:*:*:*:*:node.js:*:* Versions before 9.1.0 Vulnerable ·fastify

Remediation

  • Fix · CNA middie (fastify) Fixed in 9.1.0
  • Fix · GHSA-cxrg-g7r8-w69p @fastify/middie (npm) Fixed in 9.1.0 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-22031
  2. 2026-10-03 Alias added: GHSA-cxrg-g7r8-w69p

References

  • TI-2026-05498 @fastify/middie vulnerable to middleware authentication bypass in child plugin scopes CVSS 3.1CRITICAL 9.1
  • TI-2026-58517 @fastify/middie vulnerable to path-scoped middleware bypass via absolute-form request target CVSS 3.1CRITICAL 9.1
  • TI-2026-12029 @fastify/middie vulnerable to authorization bypass via encoded slash in path parameter values CVSS 3.1CRITICAL 9.1
  • TI-2026-26176 @fastify/middie vulnerable to middleware bypass via deprecated ignoreDuplicateSlashes option CVSS 3.1CRITICAL 9.1
  • TI-2026-12013 @fastify/middie standalone engine vulnerable to Denial of Service via malformed percent-encoded paths CVSS 3.1HIGH 7.5
  • TI-2026-02474 @fastify/middie has an improper path normalization vulnerability CVSS 4.0HIGH 8.2

Sources