Repository navigation
chore(deps): update dependency nuxt to v4.6.2 [security] - #134
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
|
Note renovate[bot] opened this pull request, so PR Lens left it undrawn. Comment
|
renovate
Bot
force-pushed
the
renovate/npm-nuxt-vulnerability
branch
from
October 27, 2026 01:11
f09da62 to
f3a15f6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
This PR body was truncated due to platform limits.
This PR contains the following updates:
4.5.2→4.6.2Nuxt: Incomplete fix for GHSA-934w-87qh-qr26: a
javascript:URL prefixed with an ASCII control character executes from<NuxtLink>whenpagesis disabledCVE-2026-114130 / GHSA-jjm6-p2m9-9w4x
More information
Details
Impact
An application that renders
<NuxtLink :to="...">with a value it does not control can be made to render an anchor whosehrefexecutes script in the application's origin when clicked.This is an incomplete fix for GHSA-934w-87qh-qr26 (CVE-2026-53722). It only affects applications running without a
pages/directory, wherepagesresolves tofalseand Nuxt registers its own router in place of vue-router. Applications using vue-router are not affected.Prefixing
javascript:with an ASCII C0 control character, for example%01, meant the value was not recognised as having a protocol. It was classified as an internal route and so never reached the protocol check added in GHSA-934w-87qh-qr26, and the router used forpages: falsepassed it through to the renderedhrefunchanged. Browsers strip the leading control character and run the result as a script URL.Both
<NuxtLink custom>and the default anchor are affected, and thehrefis present in the server-rendered HTML.Mitigating factors
pagesdisabled (nopages/directory, orpages: false).:to.Affected versions
nuxt<4.6.0, including all Nuxt 3 releases. Versions before4.4.7and3.21.7are also affected by GHSA-934w-87qh-qr26.Patches
Fixed in
nuxt@4.6.0. Nuxt 3 reached end of life on 31 July 2026 and will not receive a fix.Anchor
hrefvalues are now checked for script-capable protocols wherever they are rendered, including the router used whenpagesis disabled. Protocol detection also moved to the platformURLparser, so a URL is classified the same way the browser will read it.Workarounds
Upgrade to
nuxt@4.6.0or later. If you cannot upgrade, including on Nuxt 3, validate values before binding them to:to, for example by rejecting anything that is not a path beginning with a single/.Severity
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Nuxt server islands render
useHeadSafeinput without sanitisationCVE-2026-114133 / GHSA-xfq5-w38q-pc2x
More information
Details
Impact
useHeadSaferestricts head input to an allowlist of safe tags and attributes. For example,bodyAttrsis limited toclassandstyle, event handler attributes are removed, and<script>tags are only kept for JSON types.When
useHeadSafeis called inside a server island (a.server.vuecomponent or page, or a component rendered with<NuxtIsland>), the island renderer serialises the raw input of every head entry into the island response without the option that marks it as safe input.<NuxtIsland>then pushes that input into the page's head as a regular entry, both during server rendering and when hydrating or refetching on the client.As a result, input that
useHeadSafewould normally strip (such asbodyAttrs.onloador executable<script>content) is rendered into the page. If an application passes user-controlled data touseHeadSafeinside a server island, an attacker who controls that data can achieve stored cross-site scripting on the application's origin.Mitigating factors
.server.vuecomponent or page, or enablesexperimental.componentIslandsand renders<NuxtIsland>.useHeadSafeinside a server island.useHeadSafecalled from regular (non-island) components and pages is not affected.Affected versions
nuxt>=3.13.0, when head support for server islands was introduced. Nuxt 2 is not affected.Patches
Fixed in
nuxt@4.6.2. Nuxt 3 reached end of life on 31 July 2026 and will not receive a fix.Patched releases apply Unhead's safe input filtering to
useHeadSafeentries on the server before they are added to the island response, soislandResponse.head(including whatrender:islandhooks see) only contains input thatuseHeadSafeallows.Workarounds
Upgrade to
nuxt@4.6.2. If you cannot upgrade, including on Nuxt 3:useHeadSafewith untrusted input from a regular component or page rather than from inside a server island.useHeadSafeinside a server island.Severity
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Nuxt: Server-side route rules (
redirect,headers,proxy,ssr) are skipped for case-variant paths when routing is case-insensitiveCVE-2026-114132 / GHSA-vjh5-4x84-xrqp
More information
Details
Impact
With the default
router.options.sensitive: false, Nuxt's page router resolves routes case-insensitively, so/Adminrenders the same page as/admin. On the server, however, route rules were resolved with Nitro's route-rule matcher, which matches keys case-sensitively. A request whose path differs from a rule key only in letter case therefore rendered the page with none of that rule applied.Earlier fixes (GHSA-mm7m-92g8-7m47, GHSA-hxvh-4h3w-prp9) case-folded the route rules that the Nuxt app itself reads, such as
appMiddleware. This advisory covers the rules applied on the server:redirect: a rule used to send visitors away from a page, such as'/admin/**': { redirect: '/login' }, was skipped, and the page and its server-fetched data were rendered instead.headers: per-route response headers, including security headers such asContent-Security-PolicyorX-Frame-Options, were not sent.proxy: the request was not proxied.ssr: falseandnoScripts: the page was server-rendered, or shipped scripts, despite the rule.getRouteRules(event)(auto-imported, or fromnuxt/server) andmatchRouteRulesfromnuxt/serverreturned no rules for the case variant.With this configuration,
/admin/secretredirects to/login, but/Admin/secretrenderedapp/pages/admin/secret.vue.Mitigating factors
router.options.sensitive: trueinnuxt.configare not affected, because their pages are only served for the exact case of the route.definePageMeta, or in the page's data fetching are not affected. The issue only affects protections that rely on a server-side route rule matching the request path.Affected versions
nuxt<4.6.2, including all Nuxt 3 releases, and@nuxt/nitro-server<4.6.2.Patches
Fixed in
nuxt@4.6.2. Nuxt 3 reached end of life on 31 July 2026 and will not receive a fix.Nuxt now resolves server-side route rules itself, decoding and case-folding both the rule keys and the request path unless
router.options.sensitiveis set, and applies the result to Nitro'sredirect,headersandproxyhandling, the renderer, and thegetRouteRules/matchRouteRuleshelpers.When routing is case-insensitive, patched releases change some behaviour:
/API/xnow matches a/api/**proxyorheadersrule.The following are not changed by this fix:
cacheandswrresponse caching is attached to server routes by Nitro's router, which matches case-sensitively. A case variant is still rendered with its route rules applied, but its response is not cached.config.jsonor Netlify's_redirectsand_headers) are matched by the platform. Once a request reaches the Nuxt server, the rules are applied as described above.sensitiveis set only inapp/router.options.ts, the server follows thenuxt.configvalue. In that configuration route rules can only apply to more paths, never fewer.Workarounds
Upgrade to
nuxt@4.6.2. If you cannot upgrade, including on Nuxt 3:router: { options: { sensitive: true } }innuxt.config, so pages are only served for the exact case of their route.redirectroute rule, and set security headers for every response rather than per route.Severity
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
nuxt/nuxt (nuxt)
v4.6.2Compare Source
👉 Changelog
compare changes
🩹 Fixes
useHeadSaferules to server island head (493565e99)010f6b43d)f6cfee52c)rawVaporSlotKeyfrom vue (#36614)experimental.typescriptPlugin(#36561)AnyFetchPathfor emitted server route types (#36610)nuxt/appto the app's runtime (#36587)appMiddleware(#36565)render:responselisteners (#36583)vueto its bundler build in dev (#36569)/@id/in dev (#36549)nitroAutoImportsis off (#36548)💅 Refactors
📖 Documentation
H(TTP)toHTTP(#36559)proxyroute rule (4a529be68)definePluginanddefineNitroPluginin server plugin tip (64b8e0334)e551df267)7499a445b)🏡 Chore
3110d6947)fb01db4eb)nuxt/appentry shim from root typecheck (c65cef3a8)test:engines(6ce412822)#build/server-routesstub via root tsconfig paths (8235dd605)✅ Tests
ca784deb7)🤖 CI
inlinedDependenciesin autofix (4b6da3a29)917bdf218)🎉 New Contributors
❤️ Contributors
v4.6.1Compare Source
👉 Changelog
compare changes
🔥 Performance
cffb182d6)🩹 Fixes
baseURLwhen fetch response type is named (#36523)nitropack/typesdeclarations under nodenext (242e1971e)falseinsetPageLayouttypes (#36506)Serializeobject types with JSON (#36503)publishConfigconfig export extension (64fa191cb)RequestEventtonuxtdev server handlers (e6beceea2)$fetchwith nuxt'sTypedFetch(#36492).wranglerdirectory (#36487)BroadcastChannelthrows (#36480)nuxtdev server handler variant (452052793)21657c6fc)unheadfrom nuxt in server bundle (dc1e2d6e6)💅 Refactors
package-manager-detectorworkspace + deno handling (1563a6d25)📖 Documentation
nuxt/serverscope (7c36a1352)🏡 Chore
CLAUDE.md(#36462)bdf98e936)787d0d980)✅ Tests
30742865c)1f22a114d)🤖 CI
latest(682605dba)3b8853489)🎉 New Contributors
❤️ Contributors
v4.6.0Compare Source
📣 Some news
🖥️ Nuxt CLI v4
Alongside the release of Nuxt v4.6, today also brings a new major release of the Nuxt CLI:
@nuxt/cliv4. It ships as a dependency ofnuxt, so you'll get it automatically when you upgrade.Most of what's new is in
nuxt dev:nuxt.configkeys changed, where the time went during a slow start or build, and how long each module took to set upmy-bad(see below), powering things like automatically reloading when a syntax error innuxt.config.tsis fixed.nuxt/, which lets a secondnuxt dev(say, one started by an agent) take over or defer to the one you started, and powers newnuxt curlandnuxt taskcommands that talk to the running serverThere's also a new
nuxt docs "<query>"search, andnuxt preview --takeovercan replace a running preview server. And in generalnuxt/cliis a lot smaller and starts a lot faster:@nuxt/cliinstall size@nuxt/clidependenciesnuxt dev: first paintnuxt dev: port boundnuxt dev: memory at rest (Linux)Although this is a major version, none of the changes should be breaking for Nuxt v4 users: we require Node.js v22.21+, v24.11+ or v26+, we drop
nuxt initand only supportnpm create nuxt@latest, and Nuxt 2 and@nuxt/bridgeare no longer supported.👉 Check out the full Nuxt CLI v4 release notes for everything that's changed.
💡 A server-agnostic Nuxt
The biggest thing about this release is our move towards making Nuxt server-agnostic.
I feel that freedom of choice is very much a fundamental value of the web, and one that unites the whole Nuxt team.
You can use
pages/(with vue-router) or not. You can use Vite, webpack or Rspack to bundle your code. You can pick from dozens of providers to deploy to, pick any image or font provider, choose any database adapter. In every case, the framework is the same.The server side was different.
#appcomposables imported h3 types, server code imported fromh3andnitropack, and every module that touched the server was tied to whichever major version of those packages Nuxt happened to depend on.This has become particularly clear as we have been upgrading to new majors of h3 and nitro, which ship breaking changes with a cascading effect throughout the whole ecosystem.
👉 This release changes that.
Alongside explicitly defining our public API in
nuxt/kit(which now does not refer to external packages), Nuxt now specifies our own types for the request event, route rules and typed$fetch, and we expose an import surface (nuxt/server) for the server utilities that will be needed by most apps.This is the culmination of work we started almost a year ago, making it possible to use any server builder with Nuxt, not just Nitro (#33462).
Of course, under the hood,
nuxt/serveris still powered by Nitro by default - though we are also announcing a second, experimental implementation,@nuxt/vite-server, which allows pure-Vite server builds using the Vite Environment API.🌟 We see a number of key benefits for
nuxt/server.nuxt/serveron 4.6 runs unchanged there, so a module can ship one file for both./appand/server- and the bundler + server that you ultimately want to build your app.... and there are a number of other benefits too, from a single type surface to being able to iterate more quickly on features.
Finally, I want to say a special thank-you to @pi0, whose relentless focus on server agnosticism and work on h3, Nitro and web-standard server primitives over the last few years is what makes a portable
RequestEventpossible at all. Thank you, Pooya. ❤️Almost every feature in this release is already in the Nuxt 5 branch, and most of the remaining Nuxt 5 defaults can be tested today with
future.compatibilityVersion: 5(more details below!).👀 Highlights
🤷 If you've read this far I'm afraid I have bad news for you: there's a lot more still to say! Nuxt 4.6 is one of our biggest minor releases, with over 420 commits since v4.5.2.
... so, you might want to grab a coffee! ☕️
🧩
nuxt/serverIt has been asked for for a long time, and it now exists (#36275)!
nuxt/serveris a new import source for server code: handlers, middleware and utilities - a complement tonuxt/app. Wherenuxt/appis for the part of your application that also runs in the browser,nuxt/serveris for the part that only runs on the server.The utilities use web standards and are typed against a portable
RequestEvent:Under
@nuxt/nitro-serverthey are backed by Nitro and h3, but you never import from either.So the same handler runs under Nitro v2, Nitro v3 or
@nuxt/vite-server, and a module that imports fromnuxt/serverdoesn't need a peer dependency onh3ornitropack.We think this will make a big difference in smoothing out the upgrade to Nuxt v5 and Nitro v3.
There is a typing benefit too. We no longer hoist h3 or Nitro types into your app to type
useRequestEvent,$fetchor route rules, which removes a source of type conflicts when versions differ (#36212, #36214, #36293).The surface is small, and covers what published modules and user code typically need:
defineEventHandler,createError/isNuxtError, request URL, headers, query, body (plain and validated with any Standard Schema library or a function), cookies, redirects, response status,getRouterParam(s),getRequestIP,handleCors,getRouteRules,useRuntimeConfig,useAppConfigand sessions.We encourage you to use web APIs (
event.req.headers, for example), or raise an issue if there's functionality you're missing fromnuxt/server🙏If you do need to step outside
nuxt/serverfor a particular handler, don't worry! Nothing has been taken away: importdefineEventHandlerand the helpers you need fromh3ornitropack/runtimeas before, and that handler works exactly as it did on Nuxt 4.5.A few helpers also behave differently from their h3 v1 namesakes:
sendRedirectreturns the response rather than sending it,createErrortakesstatusandstatusText, and response headers are set throughevent.res.headers. The upgrade guide has a table of the differences.Nothing in this release requires a migration. But if you have server code you'd like to make portable ahead of Nuxt 5, this is the best way.
👉 Read the server imports guide.
🔐
appSecretand sessionsNuxt now has a root application secret:
runtimeConfig.appSecret, set withNUXT_APP_SECRET(#35874, thanks to @onmax). Modules and server features derive purpose-specific secrets from it withderiveSecret(purpose), soNUXT_APP_SECRETis the only secret you need to configure.In development Nuxt generates and persists one if none is configured (and warns the first time a derived secret is used). Builds never generate one.
The first thing to use it is a set of session helpers in
nuxt/server(#36358). Sessions are sealed into a cookie with iron, so there's no server-side storage to configure:🎯 Typed
$fetch, rebuilt$fetchanduseFetchhave been typed from your server routes for a long time. But the types were derived from Nitro'sInternalApiinterface, and past a few hundred routes they hit TypeScript's instantiation limit with the familiarTS2589: Type instantiation is excessively deep and possibly infinite.We've rebuilt typed fetch on top of
fetchdts(#36238). Nuxt compiles your server routes into a route tree with an exact-match table for static paths and accessors specialised to your route set. Resolution cost now scales with call sites, not with route count:TS2589)TS2589)TS2589)Peak memory for the same runs dropped from 946 MB to 140 MB. 🔥
Plus, the route set also carries the
body,queryandheadersa handler validates, so calls are checked more tightly than before:On Nuxt 4 this is opt-in, because there are small changes to type inference, and hand-written
ServerRoutesaugmentations need a small rewrite. It is the default in Nuxt 5.There's also a new
experimental.strictRouteTypesoption to reject calls to paths that don't exist (otherwise these just returnunknown), and an'isomorphic'mode that types your pages asGETroutes too if you want to be able to$fetchfrom the Vue renderer with type safety.👉 Read more in the experimental features docs.
🐛 Better errors in development with
my-badServer-side errors in development used to look like this:
There was no source position or code frame, and the Youch iframe we rendered could not show you the frame in your own source either. Both are now fixed (#36258, nuxt/cli#1518).
Dev SSR stack traces are now mapped before anything reads the error, and the Youch overlay has been replaced with
my-bad. It renders into your app's own error page as an overlay (or as a standalone page when the app can't render one), with the mapped stack trace and a code frame from your source, and the same report is printed in your terminal. We are still working with @atinux, @HugoRCD and @antfu to make these pages nicer still.With Nuxt CLI v4, there is a single live error channel at the CLI level. It survives worker restarts, so (for example) a syntax error in
nuxt.config.tswill live-reload the page once you fix it. Each error is rendered once rather than at every layer it passes through, and the same channel streams build progress and app logs to the dev panel.🎨 A new loading screen, 404 and error pages
@HugoRCD has redrawn the loading screen you see while the dev server starts. It is now a WebGL2 particle field that traces a mountain range behind the Nuxt lockup (#36178), using a single shader and a single draw call. Without WebGL2 it falls back to the static lockup, and with
prefers-reduced-motionthe animation stops. Try hovering over it. 🏔️Hugo also gave the built-in 404 and error pages a neutral palette and lighter type (#36255), and @MirkoJa added a back button to the 404 page (#35688).
⚡️ Vue Vapor support
Nuxt now supports Vue 3.6's Vapor Mode in interop mode (#35759). Your app root stays on the virtual DOM, and you can opt individual components or pages into Vapor by adding the
vaporattribute to<script setup>:Routing,
useAsyncData, layouts and most built-in components keep working unchanged. Along the way we made the auto-import loader,useAsyncData,definePageMetaand slot inspection Vapor-aware, and we now have a Vapor test suite so we can track what's supported.🧩 Addons for
useFetchanduseAsyncData@cernymatej has added an
addonsoption to thecreateUseFetchandcreateUseAsyncDatafactories (#35797). An addon can declare custom call-site options, adjust the merged options, wrap the handler with middleware, and extend what the composable returns, and it can be reused across as many custom instances as you like.This resolves a long list of feature requests for
useAsyncDataanduseFetch(refresh on focus, polling, retries, auth headers and more) without making the core composables opinionated about any of them.👉 Read about
defineUseFetchAddonanddefineUseAsyncDataAddon.🚀 Performance
There is a lot of performance work in this release.
<NuxtLink>renders 58% faster on the server (#36015). Internal links are now rendered as a plain<a>with nouseLink, no computed and no reactive state. Rendering 200 links went from 1.36ms to 0.57ms, which is 1.4x faster than a bare<RouterLink>.experimental.early404, page routes are compiled into a static matcher at build time and requests that can't match any page skip creating the Vue app, running plugins and middleware entirely. On an app with 30 pages and ~23ms of boot work per render, a JSON 404 went from 37.1ms to 0.3ms.builder:watchhook settles in 0.6ms instead of 36ms.useCookieparses the cookie header once per request (or once per microtask on the client) instead of on every call. A nice side effect: a cookie set in a plugin during SSR can now be read by a lateruseCookiein a page.ssr: falsepages are tree-shaken from the server bundle (#35836, thanks to @Austin1serb).definePageMetakeys are extracted at build time (#35919), behindexperimental.extractSerializablePageMeta.unctxis no longer shipped to the browser anddefuis skipped for a singleapp.config(#36371).@nuxt/kitno longer depends onc12,untyped,confbox,pkg-types,ufoormlly, andjitiandgigetare now optional peers loaded only when needed (#35936, #35943, #35946, #36071, #36073, #36083).isVuechecks migrated to plugin filters (#36116) and anflruprerender cache (#36340).Put together, on our benchmark machine (arm64 Linux, Node 24.15, medians of 5 runs):
@nuxt/kitinstall size@nuxt/kittransitive dependenciesnuxt build, starternuxt build, 200 pages / 200 components / 50 routes<NuxtLink>sDev server start-up (spawn to first HTML) on the same machine is about 12% faster on a starter app, with the second request served in roughly half the time, though the CLI major changed alongside so not all of that is Nuxt.
📦 Lighter payloads
useAsyncDataanduseFetchaccept aserialize: falseoption to keep data out of the__NUXT_DATA__payload (#35779). That's most useful inside components that never hydrate, andexperimental.stripNeverHydratedDataapplies it automatically to data fetched withinhydrate-nevercomponent trees.Nuxt also warns in development when a page's payload exceeds 100 kB (#35777) and when a route rendered with
noScriptsrelies on client-side JavaScript (#35780), andnoScriptspages keep their non-script resource hints and attach their styles correctly (#35803, #36356, #36359).<NuxtLink>now prefetches server-page islands (#35808), and @atinux made prefetch hints throttled and prioritised so a page full of links doesn't flood the network (#36261, #36324). Building on that, route chunks, layouts, middleware, payloads, islands and resource hints all now go through one client prefetch scheduler with per-kind concurrency caps, deduplication by key, and cancellation of in-flight work when you navigate away (#36391).🔮 Nuxt 5 features, today
Most of what's new in Nuxt 5 is already in 4.6, either as the default or behind a flag.
future.compatibilityVersion: 5turns on the Nuxt 5 defaults in one go, and every one of them can be enabled (or disabled) individually.Newly gated behind the flag in this release:
experimental.typedPages) (#35789)$fetch(experimental.routeTypedFetch), described abovenavigateTo(experimental.navigateToEarlyReturn):navigateToin<script setup>short-circuits the rest of the setup, so redirects and 404s don't throw on missing data (#36115)experimental.extractSerializablePageMeta)experimental.payloadExtraction: 'client')clearNuxtStateresetting to defaults,experimental.watcher: 'builder', and no auto-imported server-only head composablesbaseUrlin generated tsconfigs (#36040, thanks to @oritwoen)experimental.inlineErrorRendering): when a server render fails,error.vueis rendered in the same request with a plain try/catch, instead of re-entering the server over an internal request to/__nuxt_error. Headers and cookies the failed render had already set are kept, error renders no longer pass through Nitro middleware and route rules a second time, andrender:htmlfires with the original event (#36399).The upgrade guide now lists exactly what the flag changes on Nuxt 4.
🧪 Experimental:
@nuxt/vite-serverSince v4.2
server.builderhas been configurable. This release adds a second server builder:@nuxt/vite-server. It builds a Nuxt app with Vite alone (#36218, #36279, #36288).This is all you need to do
Configuration
📅 Schedule: (in timezone Europe/Warsaw)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.