CVE-2026-22031
HIGH 8.8CVSS 3.1Fastify Middie Middleware Path Bypass
@fastify/middie is the plugin that adds middleware support on steroids to Fastify. A security vulnerability exists in @fastify/middie prior to version 9.1.0 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. Version 9.1.0 fixes the issue.
- Published
- 19 Jan 2026
- Last modified
- 8 Jul 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-177
- Also known as
- GHSA-cxrg-g7r8-w69p
- Sources
- NVDJSONOSV GHSA-cxrg-g7r8-w69pJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| 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 |
|---|---|---|---|---|
| NVD | fastify | fastify/middiecpe:2.3:a:fastify:fastify\/middie:*:*:*:*:*:node.js:*:* |
< 9.1.0 | 9.1.0 |
| OSV | npm | @fastify/middie | < 9.1.0 | 9.1.0 |
References
- https://github.com/fastify/middie/commit/d44cd56eb724490babf7b452fdbbdd37ea2effba · Patch, WEB
- https://github.com/fastify/middie/pull/245 · Issue Tracking, Patch, WEB
- https://github.com/fastify/middie/releases/tag/v9.1.0 · Product, Release Notes, WEB
- https://github.com/fastify/middie/security/advisories/GHSA-cxrg-g7r8-w69p · Exploit, Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-22031 · ADVISORY
- https://github.com/fastify/middie · PACKAGE
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)