CVE-2026-22031Fastify/middie
High 8.8
Follow: this CVE · Fastify · Fastify/middie We alert you by email or Slack (account required).
- Priority
- 53
- CVSS 3.1
- 8.8
- EPSS
- —
- Auth required
- Yes
- Published
- Jan 19, 2026
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-177
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: no · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
What happens
@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.
What to do
- Apply the vendor's security update for Fastify/middie.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | @fastify/middie |
< 9.1.0 |
9.1.0 |
npm install @fastify/middie@9.1.0 |
Per OSV / GitHub Advisories (GHSA-cxrg-g7r8-w69p). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| fastify | fastify/middie | < 9.1.0 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch
- github.com Issue Tracking Patch
- github.com Product Release Notes
- github.com Exploit Vendor Advisory