CVE-2026-22031 in Fastify/Middie
@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 middlewar...
Affects 1 product from 1 vendor. Facts below cite their sources.
Remotely exploitable over the network, low complexity, low privileges required, no user interaction needed, impact contained to the vulnerable component, full confidentiality impact, full integrity impact, full availability impact.
Affected products and versions
| Vendor | Product | Affected versions |
|---|---|---|
| Fastify | Fastify/Middie | < 9.1.0 |
A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.
Fix and vendor advisory
No official vendor advisory link on record. See the CVE record.
Exploitation
| CISA known-exploited | Not in the CISA KEV catalog |
|---|---|
| Public exploit | Not confirmed |
Official description
@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.
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2026-22031 |
|---|---|
| BreachSpider ID | BS-2026-GLOBAL-277018-H |
| CVSS vector | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| Published | 2026-01-19 |
| Last modified | 2026-06-17 |
| Weakness (CWE) | |
| Source | NVD |
Weakness definitions
CWE-177: CWE-177
Related attack patterns (CAPEC)
CAPEC-64 Using Slashes and URL Encoding Combined to Bypass Validation Logic via CWE-177
CAPEC-72 URL Encoding via CWE-177
CAPEC-120 Double Encoding via CWE-177
CAPEC-468 Generic Cross-Browser Cross-Domain Theft via CWE-177
Mapping is CWE to CAPEC per MITRE CAPEC 3.9.
Analysis AI-written, not human-reviewed
A security vulnerability in @fastify/middie prior to version 9.1.0 allows attackers to bypass middleware protection by using URL-encoded characters in the request path.
Attackers can exploit this vulnerability by sending requests with URL-encoded path prefixes that the middleware engine fails to match, thus bypassing intended security checks.
Questions
What is CVE-2026-22031?
A security vulnerability in @fastify/middie prior to version 9.1.0 allows attackers to bypass middleware protection by using URL-encoded characters in the request path.
What is the CVSS score for CVE-2026-22031?
CVE-2026-22031 has CVSS 8.8 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. EPSS: 0.9%.
Is CVE-2026-22031 actively exploited?
No confirmed active exploitation of CVE-2026-22031 as of 2026-09-25.
How do I remediate CVE-2026-22031?
Priority: IMMEDIATE.
What systems are affected by CVE-2026-22031?
CVE-2026-22031 affects Fastify Fastify/Middie.
For developers and AI agents
Run this check from your own code or agent
REST API
curl -s https://breachspider.com/api/v1/assets/correlate-cves \
-H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"assets":[{"asset_id":"dev-1","vendor":"Fastify","product":"Fastify/Middie","version":"1.0"}]}'
MCP for AI agents
# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp
Free trial: 14 days, 750 device checks, no card.
Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-17.