CVE-2026-22031 json
Fastify Middie Middleware Path Bypass
published 2026-01-19 9 mo ago modified 2026-07-08 4 mo ago also GHSA-cxrg-g7r8-w69p , EUVD-2026-3321
- cvss
- 8.4
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.5%
- EPSS 0.5% chance of exploitation in 30 days, percentile 45%
- public exploits
- 0
- none known
Summary
@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.
Patch / fix
- npm @fastify/middie 9.1.0
- fastify fastify/middie 9.1.0
- github.com/fastify/middie@d44cd56 commit
- github.com/fastify/middie#245 pull request
- github.com/fastify/middie/releases/tag/v9.1.0 release
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- partial
- Assessed
- 9 mo ago
Exploit prediction
0.53% chance of exploitation in the next 30 days, higher than 45% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/fastify/middie/security/advisories/GHSA-cxrg-g7r8-w69p referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 8.4 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:L |
| NVD | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 3.1 | 8.4 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:L |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | @fastify/middie | <9.1.0 |
9.1.0 |
Affected products
- fastify middie
Classification
- Weakness
-
- CWE-177 Improper Handling of URL Encoding (Hex Encoding)
References
-
github.com
/fastify/middie/pull/245
web, issue-tracking, patch
-
github.com
/fastify/middie/commit/d44cd56eb724490babf7b452fdbbdd37ea2effba
web, patch
-
github.com
/fastify/middie/security/advisories/GHSA-cxrg-g7r8-w69p
web, exploit, vendor-advisory
-
github.com
/fastify/middie/releases/tag/v9.1.0
web, product, release-notes
-
nvd.nist.gov
/vuln/detail/CVE-2026-22031
advisory
-
github.com
/fastify/middie
package
Sources
- CVE List CVE-2026-22031
- GitHub Advisory GHSA-cxrg-g7r8-w69p
- NVD CVE-2026-22031
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.