nuxt
4.6.4 · 2 Nov 2026MIT3.6M / weekRepositoryHomepagenpmAtom feed
3.21.11 is the newest release of 3.x.
In short
35 new7 faster46 fixed65 internal
Security
17 advisories affect 3.7.0; 4.6.0 fixes the others
- ModerateNuxt exposes the message and data of unhandled errors thrown during server renderingGHSA-96x6-fvhx-49hg · 16 Nov 2026No fix yet
- ModerateNuxt: Incomplete fix for GHSA-6gq8-jgmh-3ffp: an encoded slash (`%2F`) in the request path bypasses route rules on catch-all page routesGHSA-f3x9-2chm-73c8 · 16 Nov 2026No fix yet
- ModerateNuxt: Server-side route rules (`redirect`, `headers`, `proxy`, `ssr`) are skipped for case-variant paths when routing is case-insensitiveGHSA-vjh5-4x84-xrqp · 22 Oct 2026No fix yet
- CriticalNuxt vulnerable to remote code execution via the browser when running the test locallyGHSA-v784-fjjh-f8r4 · 5 Aug 2024Fixed in 3.12.4
- HighNuxt: Unauthenticated CPU exhaustion parsing and hashing the Nuxt island endpoint body before hash validationGHSA-9pgf-384g-p7mv · 5 Aug 2026Fixed in 3.21.10
12 more
- HighNuxt: Server-Side Remote Code Execution via Runtime Template Injection in Nuxt Server Island PropsGHSA-9473-5f9j-94wq · 5 Aug 2026Fixed in 3.21.10
- HighNuxt: Unauthenticated out-of-memory crash via unbounded v-for expansion in island renderingGHSA-hxcr-hm88-mpq6 · 5 Aug 2026Fixed in 3.21.10
- HighNuxt allows DOS via cache poisoning with payload rendering responseGHSA-jvhm-gjrh-3h93 · 19 Mar 2025Fixed in 3.16.0
- ModerateNuxt: Unauthorized Component Instantiation via Server Island PropsGHSA-48hr-524c-v5w3 · 5 Aug 2026Fixed in 3.21.10
- ModerateNuxt: Reflected XSS in `<NuxtLink>` via unsanitised `javascript:` or `data:` URLGHSA-934w-87qh-qr26 · 16 Jun 2026Fixed in 3.21.7
- ModerateNuxt: URL-handling weaknesses in `navigateTo` and `reloadNuxtApp`: SSR open redirect, client-side script execution via the `open` option, and protocol-relative bypass in `reloadNuxtApp`GHSA-c9cv-mq2m-ppp3 · 16 Jun 2026Fixed in 3.21.7
- ModerateNuxt: Reflected XSS in `navigateTo()` external redirectGHSA-fx6j-w5w5-h468 · 19 May 2026Fixed in 3.21.6
- Moderatenuxt vulnerable to Cross-site Scripting in navigateTo if used after SSRGHSA-vf6r-87q4-2vjf · 5 Aug 2024Fixed in 3.12.4
- LowNuxt: Incomplete fix for GHSA-934w-87qh-qr26: a `javascript:` URL prefixed with an ASCII control character executes from `<NuxtLink>` when `pages` is disabledGHSA-jjm6-p2m9-9w4x · 22 Oct 2026Fixed in 4.6.0
- LowCross-site scripting via <NoScript> slot content in Nuxt's head componentsGHSA-m3q2-p4fw-w38m · 16 Jun 2026Fixed in 3.21.7
- LowNuxt: `__nuxt_island` endpoint does not bind responses to request props, enabling shared-cache poisoningGHSA-g8wj-3cr3-6w7v · 19 May 2026Fixed in 3.21.6
- LowNuxt has Client-Side Path Traversal in Nuxt Island Payload RevivalGHSA-p6jq-8vc4-79f6 · 17 Sep 2025Fixed in 3.19.0
Release note
Highlights
A New CLI
We've refactored nuxi using unjs/citty and this marks the first Nuxt release that depends on the new version, safely in its own repository. We have grand plans for this - check out some of the features + roadmap discussions in nuxt/cli and please feel free to contribute!
Project Goals
Feedbacks and Ideas
The journey of Nuxt CLI Generations
Nuxi is now decoupled from the main nuxt version - we plan to iterate and release nuxi more quickly in future so you can expect new things coming soon!
Native Web Streams and Response
With improvements in unjs/h3 and unjs/nitro, it's now possible to directly return a Response object from server routes, meaning it's also possible to return and handle streams natively in Nuxt.
👉 Check out the full detail in the unjs/h3 and unjs/nitro release notes.
HTML Rendering Optimisations
This release comes with a couple of improvements in rendering HTML responses from the server. We now determine whether to preload/prefetch resources at build time (so you can customise this in the build:manifest hook). We also now manage rendering the HTML for them directly in unhead (#22179), which means you can configure the order for <link>, <meta>, <script>, <style>, and more. And - in our preliminary testing - it's even faster!
It's possible to opt-in to upcoming head improvements with the experimental.headNext flag. This currently includes a new ordering algorithm based on capo.js (#22431) and allows enabling future optimisations as they are released in unhead:
export default defineNuxtConfig({
experimental: {
headNext: true
}
})We'd love your thoughts - you can respond with any issues/feedback in this discussion.
Build Environment Shortcuts
In your Nuxt config you can now use $client and $server shortcuts to easily define configuration that is specific to just the Vite client/server (#22302) or webpack client/server (#22304) builds. This previously was only possible with the vite:extendConfig and webpack:config hooks.
For example:
export default defineNuxtConfig({
vite: {
$client: {
build: {
rollupOptions: {
output: {
chunkFileNames: '_nuxt/[hash].js',
assetFileNames: '_nuxt/[hash][extname]',
entryFileNames: '_nuxt/[hash].js'
}
}
}
}
}
})Vite 4.4
We've chosen to unpin Vite from minor versions, meaning whenever Vite releases a new feature version you can opt-in straight away. Vite 4.4 brings a lot of exciting things, including experimental Lightning CSS support - and much more!
👉 Check out the Vite release notes for more.
TypeScript Updates
We now use purely relative paths in the generated tsconfig.json instead of setting a baseUrl. This means better support for dev environments like docker images where the absolute path may not match your IDE (#22410).
We also set a couple of additional compiler flag defaults to match Vite/TS recommendations (#22468).
Plus, you should now get type hinted access to layouts in setPageLayout and also in <NuxtLayout name> (#22363).
Async Context support
If you've ever got an issue with 'Nuxt context unavailable' this might be one for you. We now support native async context for Bun and Node under an experimental flag, in both Nuxt and Nitro (#20918).
This enables using Nuxt composables on the server without needing to ensure they are being called directly in a setup function. It also allows the same in Nitro, with a new useEvent() utility that is usable in server routes.
To try it out, you can enable experimental.asyncContext:
export default defineNuxtConfig({
experimental: {
asyncContext: true
}
})Watcher Updates
We've fixed a couple of issues with watchers, meaning that you should need to restart your server less often - and you should see a significant performance increase if you are using layers.
Nitro 2.6
There lots more exciting features coming directly from Nitro 2.6, including smaller, lighter servers and new persistent data storage in a .data directory.
👉 Read more in the full release article.
Upgrading
As usual, our recommendation for upgrading is to run:
npx nuxi upgrade --force
This will refresh your lockfile as well, and ensures that you pull in updates from other dependencies that Nuxt relies on, particularly in the unjs ecosystem.
Changelog
Enhancements
vite: Unpin vite from minor
nuxt: Polyfill idle callback utils
nuxt: Smooth scroll behavior option
schema,vite: Allow
$clientand$servervite env overridesschema,webpack: Allow
$clientand$serveroverridesnuxt: Allow dynamic
scrollToToppage metanuxt: Expose filtered templates in
app:templatesGeneratedhooknuxt: Render all head tags on server with
unheadnuxt: Auto-install
@nuxt/webpack-builderwhen needednuxt: Allow remote sources for islands
nuxt: Environment-specific plugin execution for islands
kit,nuxi: Add
writeTypesutilitynuxt: Autocomplete layouts in
setPageLayout/<NuxtLayout>nuxt: Allow 'lazy' (non-blocking) server components
nuxt: Use build plugin to access nuxt route injection
vite,webpack: Tree-shakable
import.meta.*build flagsnuxt: Resolve unresolved paths within
node_modulesnuxt: Experimental native async context support
nuxt: Warn on external
webpack/nitro/postcssconfignuxt: Allow experimental
global: 'sync'componentsnuxt: Make
app.rootIdoptionalnuxt: Add
experimental.headNextunhead integrationcli: Detect
bunpackage managernuxt: Upgrade nitro + reduce node-specific usage
nuxt: Add support for
routeRulesdefined within pagesschema: Support setting
hiddensourcemapskit,nuxt: Respect nuxt ignore patterns in nitro
nuxt: Migrate to new
nuxt/clischema: Export
./schema/config.schema.jsonsubpath
Performance
nuxt: Export DefineNuxtConfig interface from
nuxt/confignuxt: Write templates in single sync step + improve logs
nuxt: Render css/inline css higher than resource hints
nuxt: Experimental support of
capo.jshead tag ordernuxt: Use LRU prerender cache and limit cached items
nuxt: Reduce multiple calls to
.toLowerCase()nuxt: Reduce multiple calls to dirname
Fixes
nuxt: Await
prerender:routeshooknuxt: Access resolved
scrollBehaviorTypenuxt: Add overloads for
asyncDatageneric + defaultnuxt: Bind
createClientOnlyrender function to ctxwebpack: Remove legacy support for
build.extendnuxt: Allow
validatereturn typing to be either error or booleankit: Handle tuple-format modules in
hasNuxtModulenuxt: Components auto-import for JSX
nuxt: Pass (and handle) relative paths in
builder:watchnuxt: Use computed path value for
useFetchhashcli: Only strip extensions from files
nuxt: Disallow redirects to more script protocols
nuxt: Test
watchpaths against all layersrcDirsnuxt:
nameis an optional prop for<NuxtLayout>kit: Don't unsubscribe from file writing
nuxt: Support uppercase route methods in
useFetchkit: Remove
baseUrland use relative paths in tsconfignuxt: Print name of missing island component
nuxt: Broken capo.js
injectHeadusagekit: Apply preferred options for esbuild transpilation
nuxt: Correctly update object cookies in
useCookienuxt: Use
internal:nuxtnamespacenuxt: Remove unused
normalizecallcli: Display log when restarting nuxt
nuxt: Resolve type import paths
schema:
webpackoptions should be optionalnuxt: Enable hmr of
app.config.tsfilesvite: Add
hookableto externals listvite: Disable assignement in replace plugin
schema: Ignore empty string in
app.{rootId ([rootTag}(#22543)](github.com/nuxt/nuxt/commit/rootTag%7D%60 (#22543)))vite: Include
import.metabuild vars indefineas wellnuxt: Provide fallback route
nuxt: Trigger immediate DOM update on
page:finishnuxt: Unsub from hooks when unmounting indicator
cli: Only watch
distDirafter first buildnuxt: Use relative paths when augmenting types
nuxt: Don't prompt to install packages in CI
cli: Ignore error if nitro is not enabled on bridge
nuxt: Remove experimental hash hydration
nuxt: Correct revive payload data type
vite: Use
''key for root scope in variable collectornuxt: Warn when ignoring duplicate island/server component
nuxt: Add
excludepaths to nitrotsconfig.server.jsonnuxt: Recreate
asyncDatawhenimmediateis disablednuxt: Respect ignorelist when scanning auto-imports
schema: Mark schema as free of side effects
nuxt: Default
spaLoadingTemplatetofalsenuxt: Fully resolve
unctxwhere possiblevite: Only mark nitro deps as externals when building
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.