CVE-2026-22031

Source
https://cve.org/CVERecord?id=CVE-2026-22031
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-22031.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-22031
Aliases
Published
2026-01-19T15:24:45.899Z
Modified
2026-03-15T14:15:04.894883Z
Severity
  • 8.4 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:L CVSS Calculator
Summary
Fastify Middie Middleware Path Bypass
Details

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

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/22xxx/CVE-2026-22031.json",
    "cwe_ids": [
        "CWE-177"
    ],
    "cna_assigner": "GitHub_M"
}
References

Affected packages

Git / github.com/fastify/middie

Affected ranges

Type
GIT
Repo
https://github.com/fastify/middie
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed

Affected versions

v0.*
v0.2.0
v0.3.0
v1.*
v1.0.0
v1.1.0
v2.*
v2.0.0
v2.1.0
v2.1.1
v3.*
v3.0.0
v3.1.0
v3.2.0
v3.2.1
v4.*
v4.0.0
v4.0.1
v4.1.0
v5.*
v5.0.0
v5.1.0
v5.2.0
v5.3.0
v5.4.0
v6.*
v6.0.0
v7.*
v7.0.0
v8.*
v8.0.0
v8.1.0
v8.2.0
v8.3.0
v8.3.1
v9.*
v9.0.0
v9.0.1
v9.0.2
v9.0.3

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-22031.json"