/

CVE-2026-53721

Severity:

HIGH RISK

(8.2)

Route-rule Middleware Bypass (CWE-178) in Nuxt Router

CVE-2026-53721

Analyzed

Vulnerability type

Category:

Authorization Bypass via Routing Mismatch

CWE:

CWE-178, CWE-863

Impact:

Authorization Bypass / Access Control Evasion

Severity:

HIGH RISK

(8.2)

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

Nuxt suffers from a route-rule middleware bypass caused by case-sensitivity mismatches between vue-router and the internal routeRules matcher.

Under certain URL casing patterns, security or logic middleware configured via route rules may not execute as intended, allowing attackers to reach routes that should be protected.

Affected context

This vulnerability affects Nuxt applications built with:

  • Nuxt 3.11.0 to before 3.21.7, and
  • Nuxt 4.0.0 to before 4.4.7.

It is relevant where applications rely on routeRules-based middleware for authentication, authorization, or other security-sensitive checks.

The issue appears when URLs are matched differently by vue-router (with one case-sensitivity behavior) and by the routeRules matcher (with another), creating edge cases where middleware is skipped for certain path casing variants.

Exploit preconditions

  • Attack surface: Public HTTP endpoints exposed by a Nuxt application.
  • Required access: Network access to the affected Nuxt app; no prior authentication is strictly required if the target route is intended to be protected only by route-rule middleware.
  • Trigger point: Crafting requests to routes using alternate letter casing or path variants that confuse the routeRules matcher while still resolving via vue-router.
  • Why exploitation is possible: The framework uses two different matching behaviors—vue-router and routeRules—with inconsistent case sensitivity, allowing route resolution without triggering the intended route-rule middleware.

Why this happens

The core issue is inconsistent case handling between the vue-router path resolution and the Nuxt routeRules matcher.

Routes may be considered equivalent by vue-router but not by the routeRules system, or vice versa, due to different assumptions around case sensitivity and normalization.

This maps to:

  • CWE-178: Improper Handling of Case Sensitivity, where security decisions depend on string comparisons that do not consistently normalize case.
  • CWE-863: Incorrect Authorization, because the authorization logic (middleware executed via route rules) can be bypassed when the framework treats differently cased URLs inconsistently.

Conceptually, the bug reflects a general pattern where access control enforcement relies on multiple components that interpret identifiers (like URLs) differently.

Potential impact

  • Attackers could bypass authentication middleware on routes that rely solely on routeRules for protection.
  • Sensitive endpoints may be accessible without the expected authorization checks.
  • Rate limiting, logging, or request validation middleware could be skipped for certain URL variants.
  • Security assumptions about "protected routes" may be invalid, leading to data exposure or unintended actions.

General mitigation guidance

Mitigation generally focuses on aligning routing and authorization behavior and avoiding ambiguity in path handling:

  • Prefer centralized, path-agnostic authorization checks (e.g., global guards or server-side middleware) rather than relying exclusively on per-route case-sensitive rules.
  • Normalize and canonicalize request paths (e.g., to a consistent case or format) before applying security decisions when designing custom routing logic.
  • Avoid having security posture differ based only on path case; treat URLs case-insensitively in access control design or document and enforce a strict, single canonical form.
  • Apply defense-in-depth by performing critical authorization checks closer to the data or business action, not only in frontend router middleware.
  • Restrict exposure of sensitive functionality by combining route middleware with server-side checks, ensuring that bypassing client-side or edge routing logic is not sufficient.

How teams detect issues like this

Useful detection strategies include:

  • Code review patterns: Look for heavy reliance on Nuxt routeRules or case-sensitive route-based middleware to enforce authentication and authorization. Flag routes where the only protection is a route-rule middleware attached by path string.
  • Static analysis and configuration linting: Enforce policies that disallow or warn on multiple route definitions or security rules that differ only in path case; identify routeRules that protect high-value actions.
  • Dynamic testing and fuzzing: Perform automated scans that request protected routes using different casing (e.g., /Admin, /ADMIN, mixed case) and observe whether middleware or auth flows are triggered consistently.
  • Logging and monitoring: Instrument logs to include both the original request path and the route identifier used for authorization decisions; discrepancies or unusual casing patterns can indicate bypass attempts.
  • Automated CI tools and framework-aware security scanners can be configured to check for inconsistent routing or case-handling behaviors as part of regular testing.

Sources

SourceLink
github.comgithub.com/nuxt/nuxt/commit/07e39cd6f26e407b4192b7865bd17bc44536b9bb
github.comgithub.com/nuxt/nuxt/commit/3f3e3fa7b5eec8e495f4f8ce0a54813a8875a11e
github.comgithub.com/nuxt/nuxt/security/advisories/GHSA-mm7m-92g8-7m47

Frequently asked

questions

Yes. Any remote user who can send HTTP requests to the affected Nuxt application can potentially exploit the issue by manipulating URL casing, as long as the application relies on routeRules middleware for protection.

Typically only network access to the application is required. Exploitation does not require valid credentials if the attacker targets routes that should be protected by route-rule middleware but are not backed by additional server-side authorization.

Use a routing and authorization configuration where path matching for security checks is consistent and canonicalized, and ensure that critical access control logic is enforced by centralized, server-side components rather than solely by routeRules-based middleware.

Design access control so that it does not depend on subtle string-matching details like case; normalize identifiers before comparison, keep a single source of truth for routing and authorization, and include automated tests that verify that all path variants of a protected route still trigger the intended security middleware and backend checks.

Find out what's already
exploitable in your codebase.