@fastify/middie vulnerable to path-scoped middleware bypass via Unicode case folding
Summary
| CVE | CVE-2026-132128 |
|---|---|
| State | PUBLISHED |
| Assigner | openjs |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-11-19 12:18:40 UTC |
| Updated | 2026-11-19 18:18:11 UTC |
| Description | @fastify/middie is the middleware engine that adds Express and Connect style middleware support to Fastify. In versions up to and including 9.3.6, middie does not honor the router's caseSensitive setting and matches path-scoped middleware mount paths with a case-insensitive regular expression that does not fold non-ASCII characters, while Fastify's router, when caseSensitive is set to false, lowercases the request path with a Unicode-aware conversion that maps the KELVIN SIGN character (U+212A) to the ASCII letter k. A request that spells a k in a protected mount path as the percent-encoded KELVIN SIGN is therefore routed to the protected handler while the middleware mounted on that path, such as authentication, authorization, or rate limiting, never matches and is skipped, letting an unauthenticated client reach the handler. Only applications that set caseSensitive to false and protect a mount path containing the letter k are affected. The issue is fixed in @fastify/middie 9.3.7, and users should upgrade to 9.3.7 or later. As a workaround, enforce authorization in a Fastify hook such as preHandler that runs after routing, or keep routing case-sensitive, which is the default. |
Risk And Classification
Primary CVSS: v3.1 7.4 HIGH from ce714d77-add3-4f53-aff5-83d477b104bb
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
Problem Types: CWE-178 | CWE-863 | CWE-178 CWE-178: Improper Handling of Case Sensitivity | CWE-863 CWE-863: Incorrect Authorization
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | ce714d77-add3-4f53-aff5-83d477b104bb | Secondary | 7.4 | HIGH | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N |
| 3.1 | CNA | CVSS | 7.4 | HIGH | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N |
CVSS v3.1 Breakdown
Attack Vector
NetworkAttack Complexity
HighPrivileges Required
NoneUser Interaction
NoneScope
UnchangedConfidentiality
HighIntegrity
HighAvailability
NoneCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | @fastifymiddie | @fastify/middie | affected 9.3.7 semver | Not specified |
| CNA | @fastifymiddie | @fastify/middie | unaffected 9.3.7 semver | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| cna.openjsf.org/security-advisories.html | ce714d77-add3-4f53-aff5-83d477b104bb | cna.openjsf.org | |
| github.com/fastify/middie/security/advisories/GHSA-r5h5-r25j-5vhr | ce714d77-add3-4f53-aff5-83d477b104bb | github.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
Vendor Comments And Credit
Discovery Credit
CNA: rootsys-research (en)
CNA: mcollina (en)
CNA: UlisesGascon (en)
There are currently no legacy QID mappings associated with this CVE.