@fastify/express vulnerable to Improper Handling of URL Encoding (Hex Encoding)
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- High
- Impact type
- Security bypass
- Confidentiality · integrity · availability
- High · High · Low
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-288.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| fastify | fastify-express | before 4.0.3 | 4.0.3 | Patch available | CNA |
| — | @fastify/express (npm) | before 4.0.3 | 4.0.3 | Patch available | GHSA-g6q3-96cp-5r5m |
- fastify-express Vendorfastify Affected before 4.0.3 Fixed in 4.0.3 Patch available CNA
- @fastify/express (npm) Vendor— Affected before 4.0.3 Fixed in 4.0.3 Patch available GHSA-g6q3-96cp-5r5m
Remediation
- Fix · CNA fastify-express (fastify) Fixed in 4.0.3
- Fix · GHSA-g6q3-96cp-5r5m @fastify/express (npm) Fixed in 4.0.3 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-22037
- 2026-10-03 Alias added: GHSA-g6q3-96cp-5r5m
References
More fastify vulnerabilities
- TI-2026-26180 @fastify/express vulnerable to middleware authentication bypass via URL normalization… CVSS 4.0CRITICAL 9.1
- TI-2026-26179 @fastify/express vulnerable to middleware path doubling causing authentication bypass in child plugin scopes CVSS 3.1CRITICAL 9.1
- TI-2026-26177 @fastify/reply-from vulnerable to connection header abuse enabling stripping of proxy-added headers CVSS 4.0CRITICAL 9.0
- TI-2026-05498 @fastify/middie vulnerable to middleware authentication bypass in child plugin scopes CVSS 3.1CRITICAL 9.1
- TI-2023-15307 Cross-site request forgery in npm @fastify/oauth2 CVSS 3.1HIGH 8.8
- TI-2022-18664 Denial of service in Fastify via Content-Type header CVSS 3.1HIGH 7.5
Sources
- CVE-2026-22037 · CVE Program
- CVE-2026-22037 · NVD
- FIRST EPSS
- GHSA-g6q3-96cp-5r5m · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences