Skip to content
Threat Feed
high advisory

@fastify/middie: Authentication bypass via unicode-aware route mismatch (CVE-2026-132128)

The @fastify/middie middleware engine fails to properly handle case-insensitive path matching for routes containing the letter 'k' when using Unicode-aware character folding, allowing unauthenticated access to protected handlers.

CVE search metadata

CVE search record: CVE-2026-132128. Severity: high. CVSS: 7.4. KEV: no. Product: @fastify/middie. Brief: @fastify/middie: Authentication bypass via unicode-aware route mismatch (CVE-2026-132128). Brief link: https://feed.craftedsignal.io/briefs/2026-11-middie-bypass-cve-2026-132128/

Triage facts

Revision 1
Applicability
@fastify/middie
Evidence
Unknown
Severity
High
Action
Elevated
Sources
2 public sources
Freshness
Revision 1Nov 19, 13:46 UTC
Vulnerabilities
1 CVE
Source quality
A1

Overview

@fastify/middie is a middleware engine for the Fastify web framework. In versions 9.3.6 and earlier, the engine fails to correctly honor the Fastify router 'caseSensitive' setting when set to false. Because the engine uses a case-insensitive regular expression that does not account for Unicode-aware character folding, a specifically crafted request can bypass middleware such as authentication, authorization, or rate limiting.

Specifically, the Fastify router performs Unicode-aware conversion when 'caseSensitive' is false, mapping the KELVIN SIGN (U+212A) to the ASCII letter 'k'. An attacker can use a percent-encoded KELVIN SIGN in a request path to bypass security middleware mounted on paths containing the letter 'k', while still reaching the intended application handler.

Impact

Successful exploitation allows unauthenticated remote attackers to bypass path-scoped middleware. This results in unauthorized access to protected application handlers or endpoints that rely on middie-based middleware for security controls, such as authentication and authorization.

Recommendation

  • Upgrade @fastify/middie to version 9.3.7 or later immediately.
  • If an immediate upgrade is not possible, set the Fastify router 'caseSensitive' option to true, which is the default behavior.
  • Alternatively, implement security controls (authentication/authorization) within a Fastify 'preHandler' hook, which executes after routing, to ensure consistent enforcement regardless of path-matching behavior.

Threat Hunt

Search for inbound HTTP requests containing percent-encoded sequences that decode to the KELVIN SIGN (U+212A, %E2%84%AA) within the request URI path, specifically targeting paths containing the letter 'k' that are typically protected by authentication or authorization middleware.

T1190 high high confidence hunt now

Data: web server access logs, HTTP request URI

Mitigations

Upgrade @fastify/middie to version 9.3.7 or later.

immediate

Configure Fastify router to 'caseSensitive: true'.

short_term

Gaps

  • No specific Sigma rule available for this vulnerability as it relates to application-layer logic errors that are not observable via standard system-level process or network logs without high-fidelity application request logging.