{"id":"CVE-2026-22037","published":"2026-01-19T16:48:10Z","modified":"2026-01-20T21:34:44Z","title":"@fastify/express vulnerable to Improper Handling of URL Encoding (Hex Encoding)","vendor":"fastify","product":"fastify-express","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.4,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00349,"percentile":0.29322,"provenance":"source"},"cwes":[{"id":"CWE-177","name":"Improper Handling of URL Encoding (Hex Encoding)"},{"id":"CWE-288","name":"Authentication Bypass Using an Alternate Path or Channel"}],"references":[{"url":"https://github.com/fastify/fastify-express/security/advisories/GHSA-g6q3-96cp-5r5m","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/fastify/fastify-express/commit/dc02a3fe1387f945143f22597baa42557d549a40","tags":["x_refsource_MISC"]}],"priority":{"score":11.7,"factors":[{"name":"EPSS percentile","points":5.86},{"name":"CVSS severity","points":5.88}]},"vendorSlug":"fastify","affectedVersions":[{"vendor":"fastify","product":"fastify-express","versions":["< 4.0.3"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2026-01-20T21:34:36.586373Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"@fastify/express","vulnerableRanges":["<4.0.3"],"patched":["4.0.3"],"from":["GHSA-g6q3-96cp-5r5m"],"provenance":"source"}],"summary":{"text":"The @fastify/express plugin, which adds Express compatibility to Fastify, contains a flaw in how its middleware matches request paths against registered path prefixes. The component affected is the plugin's request-to-middleware path matching logic. An attacker with network access and low privileges can send a request using URL-encoded characters (for example, /%61dmin instead of /admin) so that middleware registered for the prefix is skipped while the Fastify router still decodes the path and reaches the protected handler, and exploitation requires a higher attack complexity.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:50:21Z"},"euvd":{"id":"EUVD-2026-3320","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2026-22037","published":"2026-01-19","fixed":"4.0.3","kev":false},{"cve":"CVE-2026-33807","published":"2026-04-15","fixed":"4.0.5","kev":false,"link":{"from":"CVE-2026-22037","to":"CVE-2026-33807","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:@fastify/express","fromFixed":"4.0.3","toFixed":"4.0.5","daysApart":86}]}},{"cve":"CVE-2026-33808","published":"2026-04-15","fixed":"4.0.5","kev":false,"link":{"from":"CVE-2026-22037","to":"CVE-2026-33808","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:@fastify/express","fromFixed":"4.0.3","toFixed":"4.0.5","daysApart":86}]}}],"package":"npm:@fastify/express"}}