Nuxt: Incomplete fix for GHSA-6gq8-jgmh-3ffp: an encoded slash (`%2F`) in the request path bypasses route rules on catch-all page routes
Published 16 Nov 2026 · Updated 16 Nov 2026
Is your project on an affected nuxt?
Look after several JavaScript apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected packages
- Affected
- >=4.0.0 <4.6.4
- Fixed in
- 4.6.4
npm install nuxt@4.6.4- Affected
- >=3.0.0
- Fixed in
- No fix released
- Affected
- >=4.2.0 <4.6.4
- Fixed in
- 4.6.4
npm install @nuxt/nitro-server@4.6.4- Affected
- >=3.20.0
- Fixed in
- No fix released
- Affected
- >=4.6.0 <4.6.4
- Fixed in
- 4.6.4
npm install @nuxt/vite-server@4.6.4Details
Summary
Nuxt matches route rules against the request path with encoded slashes (%2F) left encoded, while the page router decodes them into route params. A request that spells a slash as %2F can therefore render a page through a catch-all route without the route rules configured for the path it resolves to. The fix for GHSA-6gq8-jgmh-3ffp deliberately left reserved escapes such as %2F encoded, so it did not cover this form.
Impact
An unauthenticated attacker can bypass route rules that protect paths served by a catch-all page route, or by a custom route whose param can span several segments.
export default defineNuxtConfig({
routeRules: {
'/docs/internal/**': { appMiddleware: 'auth', headers: { 'X-Frame-Options': 'DENY' } },
'/admin/**': { redirect: '/login' },
},
})With app/pages/docs/[...slug].vue, /docs/internal/guide runs auth, but /docs/internal%2Fguide renders the same page without running auth and without the header. With a root app/pages/[...slug].vue, /admin%2Fsecret is rendered instead of redirected.
The rules skipped include server-side redirect, headers, proxy, ssr and noScripts, and appMiddleware, appLayout and redirect as matched in the app during server rendering and client navigation. getRouteRules returns the same incomplete result.
Whether the page then shows protected content depends on how it reads the route:
- With a route such as
definePageMeta({ path: '/docs/:path(.*)' }),route.params.pathisinternal/guidefor both requests. - With a repeatable catch-all (
[...slug].vue),route.params.slugis['internal/guide']instead of['internal', 'guide'], so a page that joins the segments (slug.join('/')) to load content loads the protected resource. route.pathkeeps the encoding (/docs/internal%2Fguide), so a page that loads content byroute.pathdoes not resolve it.
Not affected:
- Static page routes and params that match a single segment.
/docs%2Finternaldoes not matchapp/pages/docs/internal.vue. - API handlers in
server/apiandserver/routes. As far as we can tell, Nitro matches these against the same path as its route rules, so a handler and the rules for it agree.
Browsers send %2F in a path as written, so a plain link is enough to reach the page.
Patches
Fixed in nuxt@4.6.4, together with @nuxt/nitro-server@4.6.4 and @nuxt/vite-server@4.6.4, which it depends on. Route rules are now resolved for both the request path and the path with each %2F read as a separator, and the rules matched by either apply. Nuxt 3 has reached end of life and will not receive a fix.
Workarounds
Reject page requests whose path contains an encoded slash in a server middleware:
// server/middleware/encoded-slash.ts
export default defineEventHandler((event) => {
if (/%2f/i.test(event.path.split('?')[0])) {
throw createError({ statusCode: 404 })
}
})This also rejects legitimate uses, such as an API route that takes a scoped package name (@scope%2Fname) as a param; narrow the check to the path prefixes your route rules protect if you need those.
A reverse proxy or CDN that rejects or decodes encoded slashes before forwarding the request also removes the mismatch.
Credits
Thanks to Riahi Foudhil for reporting this issue.
Is GHSA-f3x9-2chm-73c8 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected nuxt, and gives you the command that fixes it.
More advisories for nuxt
- LowCVE-2026-128076Nuxt: Colliding island props can share one `/__nuxt_island` path (incomplete fix for CVE-2026-46342) · 16 Nov 2026
- MediumCVE-2026-128075Nuxt exposes the message and data of unhandled errors thrown during server rendering · 16 Nov 2026
- MediumCVE-2026-128074Nuxt payload URL generation has quadratic cost for repeated slashes in the request path · 16 Nov 2026
- MediumCVE-2026-119200Nuxt: Dot segments in the request path bypass `server/middleware` path checks and server route rules on page routes · 30 Oct 2026
- MediumCVE-2026-114132Nuxt: Server-side route rules (`redirect`, `headers`, `proxy`, `ssr`) are skipped for case-variant paths when routing is case-insensitive · 22 Oct 2026
- MediumCVE-2026-114133Nuxt server islands render `useHeadSafe` input without sanitisation · 22 Oct 2026
References
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.