CVE-2026-22031 Details
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.
A vulnerability in @fastify/middie prior to version 9.1.0 allows middleware registered with specific path prefixes to be bypassed using URL-encoded characters. The middleware engine fails to match the encoded paths, skipping execution, while the Fastify router correctly decodes the paths and matches the route handlers. This flaw enables access to protected endpoints without the intended middleware constraints.
Users can update to @fastify/middie version 9.1.0 or later, where this vulnerability is fixed.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jan 20, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/fastify/middie/commit/d44cd56eb724490babf7b452fdbbdd37ea2effba | [email protected] | Patch |
| https://github.com/fastify/middie/pull/245 | [email protected] | Issue TrackingPatch |
| https://github.com/fastify/middie/releases/tag/v9.1.0 | [email protected] | ProductRelease Notes |
| https://github.com/fastify/middie/security/advisories/GHSA-cxrg-g7r8-w69p | [email protected] | ExploitVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-177 | Improper Handling of URL Encoding (Hex Encoding) | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| fastify fastify/middie | < 9.1.0 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| May 14, 2026 | CPE Deprecation Remap | [email protected] |
| Mar 13, 2026 | Initial Analysis | [email protected] |
| Jan 19, 2026 | New CVE Received | [email protected] |