CVE-2026-22031CWE-177

Fastify Middie Middleware Path Bypass

High · published January 19, 2026

CVSS v3.1
8.4
EPSS
1%
Percentile
44.1
In the wild
Unconfirmed
What it is

⚡Just a sneaky URL-encoded character can lead you straight to protected endpoints! A vulnerability in @fastify/middie before version 9.1.0 allows attackers to bypass middleware checks using paths like `/%61dmin` instead of `/admin`. Think of it like a sneaky diner slipping through the kitchen's back door with a fake reservation — the restaurant's checks fail to catch them while the front desk is blissfully unaware. If an attacker exploits this vulnerability, they could easily access restricted areas of your application without any of the usual defenses in place — imagine an intruder gaining entry to the vault that was meant to be locked tight! This means sensitive data could be exposed or manipulated, which is absolutely devastating.

Put simply

Think of it like a sneaky diner slipping through the kitchen's back door with a fake reservation — the restaurant's checks fail to catch them while the front desk is blissfully unaware. The flaw occurs because the middleware engine doesn’t properly decode URL-encoded characters, allowing requests with encoded paths to bypass middleware checks while still reaching the intended route handlers in Fastify.

What to do

If an attacker exploits this vulnerability, they could easily access restricted areas of your application without any of the usual defenses in place — imagine an intruder gaining entry to the vault that was meant to be locked tight! This means sensitive data could be exposed or manipulated, which is absolutely devastating. Upgrade @fastify/middie to version 9.1.0 or higher to close this gap immediately. Additionally, review your middleware configurations and ensure proper path validation is in place. You’ve got this! By updating, you'll lock down your application tighter than a safe! 🛡️

The record
Technical detail
CVSS v3.1
8.4 · HIGH
Vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:L
CVSS v4.0
Not supplied
EPSS
0.00532 · 44.1th percentile
Weakness
CWE-177 · Improper Handling of URL Encoding (Hex Encoding)
Published
2026-01-19T15:24Z
EPSS history
Timeline
  • 19 JAN 15:24Z
    Fastify Middie Middleware Path Bypass
    cvelistv5