GHSA-hxvh-4h3w-prp9: High severity npm/nuxt vulnerability
Impact
Nuxt matches route rules case-insensitively by default (mirroring vue-router's default sensitive: false routing). The fix for GHSA-mm7m-92g8-7m47 / CVE-2026-53721 lowercased the lookup path before matching route rules, but the route-rule keys compiled into the matcher were left verbatim. As a result, any route rule whose key contains an uppercase character (for example /Admin, /Dashboard/, or the rules Nuxt derives from PascalCase/camelCase page files such as pages/Admin.vue) never matches, because every lookup is folded to lowercase while the key stays mixed-case.
vue-router still serves the page case-insensitively, so the page renders with none of its Nuxt route-rule protections applied. The most serious consequence is an authorization bypass: an appMiddleware rule used as an auth gate (routeRules: { '/Admin/dashboard': { appMiddleware: 'auth' } }) is dropped, and /Admin/dashboard, /admin/dashboard, and /ADMIN/dashboard all render the protected page (and its SSR-fetched data) to an unauthenticated visitor instead of redirecting to login. The same gap drops Nuxt's other app-side route-rule behaviours for mixed-case keys, including the client redirect middleware, the app-side ssr: false decision, prerender, and payload handling.
Patches
Fixed in nuxt@4.5.1 (4.x) and nuxt@3.21.10 (3.x). The route-rule matcher now case-folds the compiled keys the same way it folds the lookup path, so key and lookup normalisation are symmetric. Both sides are gated on router.options.sensitive: with sensitive: true (case-sensitive routing) configured casing is preserved on both sides.
Scope note: server-emitted per-route headers, server redirect, and proxy are matched by Nitro's own case-sensitive route-rule matcher, not by Nuxt's app-level matcher. They are unchanged by this advisory. The fix covers the app-level protections Nuxt owns (appMiddleware, appLayout, the client redirect middleware, the app ssr decision, prerender, and payload).
Workarounds
If you cannot upgrade immediately, any one of:
- Key all routeRules (and name your page files) in lowercase, so the keys already match the folded lookup path. - Set router: { options: { sensitive: true } } so routing and route-rule matching are both case-sensitive and exact (requests must then use the exact casing). - Enforce the sensitive protections server-side independently of route rules (for example a server middleware that checks auth), which does not rely on case-insensitive route-rule matching.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
npm/nuxtto a version that resolves this vulnerability.Fixed in 3.21.10 - Upgrade
Upgrade
npm/nuxtto a version that resolves this vulnerability.Fixed in 4.5.1 - Upgrade
Upgrade
nuxtto a version that resolves this vulnerability.Fixed in 4.5.1 - Upgrade
Upgrade
nuxtto a version that resolves this vulnerability.Fixed in 3.21.10 - Configuration
Set `router: { options: { sensitive: true } }` so routing and route-rule matching are case-sensitive; ensure incoming requests use the exact casing for any route-rule keys you rely on.
Nuxt router router.options.sensitive = true - Configuration
If you cannot upgrade immediately, key all `routeRules` (and page files) in lowercase so the keys match the folded lookup path.
Nuxt routeRules routeRules keys casing = lowercase - Compensating control
If you cannot upgrade immediately, enforce sensitive protections server-side independently of route-rule matching (e.g., a server middleware that checks auth) rather than relying on case-insensitive route-rule matching.
Event History
Frequently Asked Questions
What is the severity of GHSA-hxvh-4h3w-prp9?
The severity of GHSA-hxvh-4h3w-prp9 is high, rated at 8.2.
How do I fix GHSA-hxvh-4h3w-prp9?
To fix GHSA-hxvh-4h3w-prp9, update your Nuxt version to include the patch addressing the route rule matching.
What impact does GHSA-hxvh-4h3w-prp9 have on Nuxt applications?
GHSA-hxvh-4h3w-prp9 allows for case-insensitive matching of route rules, potentially leading to incorrect routing in Nuxt applications.
Which version of Nuxt is affected by GHSA-hxvh-4h3w-prp9?
GHSA-hxvh-4h3w-prp9 affects previous versions of Nuxt prior to the security update that addresses the routing issue.
Is user intervention required to fix GHSA-hxvh-4h3w-prp9?
Yes, user intervention is required to update the Nuxt framework to mitigate the vulnerability associated with GHSA-hxvh-4h3w-prp9.