# CVE-2026-22031: Fastify Middie Middleware Path Bypass

- Severity: High 8.4 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.53%, higher than 46% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-01-19T15:24:45.899Z
- Modified: 2026-07-08T08:14:42.833Z
- Also known as: GHSA-cxrg-g7r8-w69p
- Related: CVE-2026-6414
- Weaknesses: CWE-177
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

@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.

(As written by CVE List.)

## Affected

- fastify middie: < 9.1.0
- @fastify/middie (npm): before 9.1.0
- fastify fastify/middie: before 9.1.0

## Every score

- GitHub_M: CVSS:3.1 8.4 High `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:L`
- GitHub: CVSS:3.1 8.4 High `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:L`
- NVD: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/fastify/middie/security/advisories/GHSA-cxrg-g7r8-w69p> (exploit, vendor-advisory, web)
- <https://github.com/fastify/middie/pull/245> (issue-tracking, patch, web)
- <https://github.com/fastify/middie/commit/d44cd56eb724490babf7b452fdbbdd37ea2effba> (patch, web)
- <https://github.com/fastify/middie/releases/tag/v9.1.0> (product, release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-22031> (advisory)
- <https://github.com/fastify/middie> (package)

## Sources

- CVE List: [CVE-2026-22031](https://www.cve.org/CVERecord?id=CVE-2026-22031), CVE Terms of Use, modified 2026-01-20
- GitHub Advisory Database: [GHSA-cxrg-g7r8-w69p](https://github.com/advisories/GHSA-cxrg-g7r8-w69p), CC-BY-4.0, modified 2026-07-08
- NVD: [CVE-2026-22031](https://nvd.nist.gov/vuln/detail/CVE-2026-22031), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-22031 · Whole record: https://cve.day/CVE-2026-22031.json · Rebuilt by cve.day 2026-11-25T22:59:12.934Z
