/

CVE-2026-129850

Severity:

HIGH RISK

(7.4)

Unicode Case Bypass (CWE-863) in @fastify/express Layer

CVE-2026-129850

Awaiting Analysis

Vulnerability type

Category:

Authorization Bypass

CWE:

CWE-178, CWE-863

Impact:

Bypass of path-scoped security middleware

Severity:

HIGH RISK

(7.4)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

In @fastify/express, inconsistent handling of Unicode characters between Fastify routing and Express mount-path matching can cause path-scoped middleware to be skipped. When case-insensitive routing is enabled and an affected mount-path letter is involved, an unauthenticated request may reach a handler without the intended authentication, authorization, or rate-limiting checks.

Affected context

The issue affects applications using @fastify/express where Fastify is configured for case-insensitive routing. It becomes relevant when a protected handler is reached through a mount path containing a letter affected by Unicode-to-ASCII case folding, and Express middleware compares the decoded path without applying equivalent normalization.

Exploit preconditions

  • Attack surface: An HTTP endpoint served through Fastify with @fastify/express middleware
  • Required access: No authentication is required if the affected route is reachable by an unauthenticated client
  • Trigger point: Request routing and Express mount-path matching
  • Conditions: Case-insensitive routing must be enabled, the mount path must contain an affected letter, and security middleware must be scoped to that path
  • Why exploitation is possible: Fastify and Express interpret the request path differently, allowing routing to select a protected handler while the corresponding middleware does not match

Why this happens

The underlying bug is inconsistent case and Unicode normalization across two routing components. Fastify folds certain non-ASCII characters to ASCII letters during case-insensitive route matching, while @fastify/express matches mount paths against the decoded path without equivalent folding. This can cause a security middleware check to be bypassed, mapping primarily to CWE-863: Incorrect Authorization and also relating to CWE-178: Improper Handling of Case Sensitivity.

Potential impact

  • An unauthenticated client may reach handlers intended to require authentication
  • Authorization checks implemented as path-scoped middleware could be bypassed
  • Rate limits or other middleware controls may not apply to affected requests
  • Exposed handlers could enable unauthorized access to data or operations, depending on application behavior

General mitigation guidance

Defensive approaches focus on consistent path interpretation and ensuring security checks cannot be skipped because of routing differences.

  • Use routing and middleware patterns that apply equivalent normalization and matching rules
  • Avoid relying solely on path-scoped middleware for critical authorization decisions; enforce access checks at the handler or service boundary as well
  • Reduce input ambiguity by validating and canonicalizing paths consistently before routing and policy checks
  • Configure routing securely by default and disable case-insensitive matching when it is not needed
  • Apply least privilege to handlers and downstream operations so a missed middleware check has limited consequences

How teams detect issues like this

  • Review route and middleware registration for security controls mounted only on specific path prefixes
  • Use static analysis or code review checks to flag inconsistent path normalization and case-sensitivity behavior across routing layers
  • Test routing policies with Unicode and case-variant paths, verifying that protected handlers always execute their required checks
  • Enforce policy checks at handler boundaries and include middleware coverage requirements in automated tests

Sources

SourceLink
cna.openjsf.orgcna.openjsf.org/security-advisories.html
github.comgithub.com/fastify/fastify-express/security/advisories/GHSA-6rmc-f24g-hmp6

Frequently asked

questions

The issue applies only when case-insensitive routing is enabled, the relevant mount path contains an affected letter, and path-scoped security middleware protects the handler.

No account is inherently required when the affected route is reachable without authentication. Whether the endpoint is reachable depends on the application's deployment and other controls.

Ensure routing and middleware use consistent path normalization, and enforce authorization at the handler or service boundary rather than relying only on path matching.

Test security middleware coverage against ambiguous Unicode and case variants, review routing behavior across framework integrations, and enforce access-control checks independently of path-scoped middleware.

Find out what's already
exploitable in your codebase.