CVE-2026-22037
HIGH 8.4CVSS 3.1@fastify/express vulnerable to Improper Handling of URL Encoding (Hex Encoding)
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.
- Published
- 19 Jan 2026
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Deferred
- Weakness
- CWE-177CWE-288
- Also known as
- GHSA-g6q3-96cp-5r5m
- Sources
- NVDJSONOSV GHSA-g6q3-96cp-5r5mJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 8.4 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:L |
| OSV | GitHub | CVSS 3.1 | HIGH 8.4 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:L |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | npm | @fastify/express | < 4.0.3 | 4.0.3 |
References
- https://github.com/fastify/fastify-express/commit/dc02a3fe1387f945143f22597baa42557d549a40 · WEB
- https://github.com/fastify/fastify-express/security/advisories/GHSA-g6q3-96cp-5r5m · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-22037 · ADVISORY
- https://github.com/fastify/fastify-express · PACKAGE
- https://github.com/fastify/fastify-express/releases/tag/v4.0.3 · WEB
History
- 25 Nov 2026 21:01 UTC · NVD: first stored (published 19 Jan 2026)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 20 Jan 2026)