{"id":"CVE-2026-114131","kind":"vulnerability","aliases":["CVE-2026-114131","GHSA-6gq8-jgmh-3ffp"],"related":[],"title":"Nuxt: Route rules are matched against the raw request path, so a percent-encoded segment can bypass `appMiddleware` on dynamic and catch-all routes","description":"### Summary\n\nNuxt compared `routeRules` keys against the raw request path, without decoding percent-encoding, while the router decodes parameters when it resolves a route. A request whose path is percent-encoded can therefore resolve to a page while failing to match the route rule meant to protect it, so the rule's `appMiddleware` never runs, including during server rendering.\n\n### Impact\n\nFor a page served through a dynamic or catch-all route, an attacker can percent-encode a character in the path to skip the rule:\n\n```ts\nexport default defineNuxtConfig({\n  routeRules: {\n    '/users/admin': { appMiddleware: 'auth' },\n  },\n})\n```\n\nRequesting `/users/%61dmin` still renders `app/pages/users/[id].vue` with `id` decoded to `admin`, but the rule keyed `/users/admin` does not match, so `auth` does not run and the server renders and returns the gated page to an unauthenticated visitor. No privileges and no user interaction are required, and only ASCII characters are involved.\n\nPurely static ASCII routes are not affected: static segments are matched without decoding, so a request for `/%61dmin` does not resolve to the page registered at `/admin` and 404s instead of rendering.\n\nThe rule keys affected are the ones carried in the app manifest and consumed by the app: `appMiddleware`, `redirect`, `appLayout`, `ssr`, `prerender`, and the payload flags derived from `cache`, `isr` and `swr`.\n\nIf you have pinned or overridden dependency versions below what your Nuxt release declares, a release outside the affected ranges can still be exposed, so do not conclude from a single reproduction that you are unaffected.\n\n### Patches\n\nReleases from `4.4.4` and `3.21.4` are not affected, because their dependency floor requires a version of the underlying HTTP layer that normalises percent-encoding in the request path before routing, which removes the mismatch in a default install.\n\nThe comparison itself is fixed in `nuxt@4.5.2` and `nuxt@3.21.11`: route-rule keys and lookup paths are now decoded (and, unless `router.options.sensitive` is set, case-folded) before they are compared. Reserved escapes such as `%2F` are left encoded, so decoding cannot introduce extra path segments, and paths that cannot be decoded are matched verbatim. Upgrading to those releases is recommended, since it fixes the comparison rather than relying on a dependency to normalise the input, and it also restores route rules for pages whose paths contain non-ASCII characters.\n\n### Workarounds\n\nIf you cannot upgrade, do not rely on a `routeRules` key alone to protect a route. Attach the middleware to the page itself, which binds it to the resolved route rather than to the raw path string:\n\n```vue\n<script setup lang=\"ts\">\ndefinePageMeta({ middleware: 'auth' })\n</script>\n```\n\n### Credits\n\nThanks to @sushi-gif, whose report that route rules keyed with non-ASCII paths never match the routes generated for those pages prompted the review that found this issue.","summary":"Nuxt matches routeRules keys against the raw, undecoded request path while the router decodes it, so a percent-encoded request like /users/%61dmin can render a dynamic page while skipping the routeRules appMiddleware meant to protect it. An unauthenticated attacker can therefore reach gated pages rendered by the server.","severity":"medium","cvss":6.5,"epss":0.0028899998869746923,"exploited":false,"exploited_at":null,"products":[{"name":"nuxt","fixed":["4.4.4"],"affected":">= 4.0.0, < 4.4.4","ecosystem":"npm"},{"name":"nuxt","fixed":["3.21.4"],"affected":">= 3.11.0, < 3.21.4","ecosystem":"npm"}],"ecosystems":["npm"],"tags":["cwe-436","cwe-863","npm","nuxt","package","self-hosted","ssr"],"not_affected_if":["auth-enforced-elsewhere","managed-hosting","static-ascii-routes","static-export"],"how_to_check":"Check the nuxt version in package.json or the lockfile: npm ls nuxt\nIf you use routeRules with appMiddleware on dynamic or catch-all routes, request a percent-encoded variant of the protected path (for example /users/%61dmin) without a session and see whether the page renders.","fix":"Upgrade nuxt to 4.4.4 or later on the 4.x line, or 3.21.4 or later on the 3.x line; the sources recommend 4.5.2 or 3.21.11 for the comparison fix itself.\nAs a workaround, attach middleware to the page with definePageMeta({ middleware: 'auth' }) instead of relying on a routeRules key alone.","status":"open","published_at":"2026-10-21T18:17:25+00:00","first_seen_at":"2026-10-23T19:11:31+00:00","triaged_at":"2026-10-23T19:56:27+00:00","updated_at":"2026-10-23T21:57:29+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-10-23T19:56:27Z","model":"claude-haiku-5-5","output":{"fix":"Upgrade nuxt to 4.4.4 or later on the 4.x line, or 3.21.4 or later on the 3.x line; the sources recommend 4.5.2 or 3.21.11 for the comparison fix itself.\nAs a workaround, attach middleware to the page with definePageMeta({ middleware: 'auth' }) instead of relying on a routeRules key alone.","summary":"Nuxt matches routeRules keys against the raw, undecoded request path while the router decodes it, so a percent-encoded request like /users/%61dmin can render a dynamic page while skipping the routeRules appMiddleware meant to protect it. An unauthenticated attacker can therefore reach gated pages rendered by the server.","category":"package","who_cares":["nuxt","self-hosted","ssr","npm"],"confidence":0.8,"analyst_note":"Sources conflict on whether 4.4.4 and 3.21.4 are fully safe: the patches section says they are unaffected via the HTTP layer floor, but the affected ranges list them as fixed and the text warns pinned dependencies can still be exposed; confirm at https://github.com/advisories/GHSA-6gq8-jgmh-3ffp and check the Nuxt release notes for 4.5.2 and 3.21.11.","how_to_check":"Check the nuxt version in package.json or the lockfile: npm ls nuxt\nIf you use routeRules with appMiddleware on dynamic or catch-all routes, request a percent-encoded variant of the protected path (for example /users/%61dmin) without a session and see whether the page renders.\nunknown","needs_analyst":true,"not_affected_if":["static-export","managed-hosting","static-ascii-routes","auth-enforced-elsewhere"],"severity_if_unknown":"unknown"},"cost_usd":0.000615,"input_tokens":3060,"output_tokens":617,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-114131':29A,37A '-2026':28A,36A '-436':41B '-863':43B '/admin':277C '/users':73B,199C '/users/admin':195C,215C '2f':428C '3.21.11':401C '3.21.4':356C '3ffp':34A '4.4.4':354C '4.5.2':398C '404s':279C '61dmin':74B,200C,268C '6gq8':32A 'admin':210C 'affect':257C,286C,333C,359C 'alon':496C 'also':471C 'app':293C,299C 'app/pages/users':203C 'applayout':302C 'appmiddlewar':19A,84B,155C,196C,300C 'ascii':247C,253C,482C,538C 'attach':501C 'attack':91B,176C 'auth':197C,220C 'bind':509C 'bypass':18A 'cach':311C 'cannot':434C,442C,487C 'carri':290C 'case':418C 'case-fold':417C 'catch':24A,172C 'catch-al':23A,171C 'charact':182C,248C,483C 'compar':103C,423C 'comparison':392C,458C 'conclud':342C 'consum':296C 'contain':479C 'credit':523C 'cve':27A,35A 'cwe':40B,42B 'declar':328C 'decod':64B,112C,119C,208C,263C,411C,433C,444C 'default':192C,389C 'definenuxtconfig':193C 'depend':321C,362C,464C 'deriv':309C 'dynam':21A,78B,169C 'encod':15A,70B,115C,133C,180C,376C,431C 'escap':425C 'export':191C 'expos':338C 'extra':436C 'fail':141C 'fix':395C,456C 'flag':308C 'floor':363C 'fold':419C 'found':552C 'gate':95B,231C 'generat':544C 'ghsa':31A 'ghsa-6gq8-jgmh-3ffp':30A 'gif':528C 'host':49B 'http':370C 'id':204C,207C 'impact':162C 'includ':158C 'input':468C 'instal':390C 'instead':280C 'interact':242C 'introduc':435C 'involv':250C 'isr':312C 'issu':554C 'jgmh':33A 'key':54B,105C,214C,285C,405C,495C,534C 'layer':371C 'left':430C 'like':72B 'lookup':407C 'manifest':294C 'match':5A,52B,143C,218C,261C,446C,541C 'meant':85B,147C 'middlewar':503C 'mismatch':386C 'never':156C,540C 'non':481C,537C 'non-ascii':480C,536C 'normalis':373C,466C 'npm':44B 'nuxt':1A,38A,39A,45B,51B,102C,326C,397C,400C 'one':289C 'outsid':331C 'overridden':320C 'packag':46B 'page':79B,96B,139C,165C,232C,274C,476C,506C,547C 'paramet':120C 'patch':351C 'path':10A,60B,110C,129C,185C,380C,408C,437C,440C,478C,520C,539C 'payload':307C 'percent':14A,69B,114C,132C,179C,375C 'percent-encod':13A,68B,113C,131C,178C,374C 'pin':318C 'prerend':304C 'privileg':238C 'prompt':548C 'protect':87B,149C,498C 'pure':251C 'rang':334C 'rather':459C,515C 'raw':8A,57B,108C,519C 'reach':94B 'recommend':453C 'redirect':301C 'regist':275C 'releas':327C,330C,352C,451C 'reli':461C,491C 'remov':384C 'render':76B,97B,161C,202C,227C,282C 'report':530C 'reproduct':346C 'request':9A,59B,71B,109C,127C,198C,266C,379C 'requir':244C,364C 'reserv':424C 'resolv':123C,136C,271C,513C 'restor':472C 'return':229C 'review':550C 'rout':2A,26A,125C,145C,174C,254C,382C,403C,473C,500C,514C,532C,543C 'route-rul':402C 'router':63B,118C 'router.options.sensitive':414C 'routerul':53B,83B,104C,194C,494C 'rule':3A,146C,153C,189C,213C,284C,404C,474C,533C 'run':157C,223C 'segment':16A,259C,438C 'self':48B 'self-host':47B 'serv':166C 'server':100B,160C,226C 'set':416C 'sinc':454C 'singl':345C 'skip':81B,187C 'ssr':50B,303C 'static':252C,258C 'still':201C,336C 'string':521C 'summari':101C 'sushi':527C 'sushi-gif':526C 'swr':314C 'thank':524C 'therefor':93B,135C 'ts':190C 'unaffect':350C 'unauthent':90B,235C 'undecod':58B 'under':369C 'unless':413C 'upgrad':448C,488C 'user':241C 'verbatim':447C 'version':322C,366C 'visitor':236C 'vue':205C,522C 'whose':128C,477C,529C 'without':111C,262C 'workaround':484C","nicknames":[],"mitigations":[],"who_affected":null,"tier":"C","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-21T18:17:25+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","cvss_by":"GitHub","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-6gq8-jgmh-3ffp","url":"https://github.com/advisories/GHSA-6gq8-jgmh-3ffp","severity":"medium","published_at":"2026-10-22T16:50:53+00:00","modified_at":"2026-10-22T16:50:54+00:00","first_seen_at":"2026-10-23T19:11:31+00:00","fetched_at":"2026-10-23T19:11:31+00:00","note":null},{"source":"nvd","external_id":"CVE-2026-114131","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-114131","severity":null,"published_at":"2026-10-21T18:17:25+00:00","modified_at":"2026-10-22T16:46:48+00:00","first_seen_at":"2026-10-23T21:57:29+00:00","fetched_at":"2026-10-23T22:29:01+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}