CVE-2026-22037 Details
Description
The @fastify/express plugin adds full Express compatibility to Fastify. A security vulnerability exists in @fastify/express prior to version 4.0.3 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. The vulnerability is caused by how @fastify/express matches requests against registered middleware paths. This vulnerability is similar to, but differs from, CVE-2026-22031 because this is a different npm module with its own code. Version 4.0.3 of @fastify/express contains a patch fort the issue.
A vulnerability in the @fastify/express plugin, affecting versions prior to 4.0.3, allows for the bypassing of middleware registered with specific path prefixes. This is achieved by using URL-encoded characters, which the middleware engine fails to decode and match, while the underlying Fastify router correctly interprets the path. As a result, attackers can access protected endpoints without the usual middleware restrictions. The issue arises from the plugin's request path matching process.
Users can upgrade to version 4.0.3 of @fastify/express, which includes a patch for this vulnerability by decoding paths before matching, ensuring that encoded path bypasses are no longer effective.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jan 19, 2026CISA-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/fastify-express/commit/dc02a3fe1387f945143f22597baa42557d549a40 | [email protected] | Source CodeVendor |
| https://github.com/fastify/fastify-express/security/advisories/GHSA-g6q3-96cp-5r5m | [email protected] | AdvisoryExploitRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-177 | Improper Handling of URL Encoding (Hex Encoding) | [email protected] |
| CWE-288 | Authentication Bypass Using an Alternate Path or Channel | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| @fastify/express | All versions |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jan 19, 2026 | New CVE Received | [email protected] |
Volerion