nuxt
4.6.4 · 2 Nov 2026MIT3.6M / weekRepositoryHomepagenpmAtom feed
4.6.4 is the newest release of 4.x.
In short
3 breaking2 removed1 deprecated20 new4 faster19 fixed38 internal
- Breaking
This is also the first breaking change for Nuxt v5.
- Breaking
Please only use this for testing, as this opts in to unlimited future breaking changes, including updating to Nitro v3 once we ship the Nuxt integration.
- Breaking
Only enable if you're prepared for potential breaking changes and want to help shape the future of Nuxt!
- Removed
nuxt: Remove
declarationPathfrom component dirs - Removed
Remove deprecated node version
- Deprecated
schema: Deprecate
extend,extendConfig, andconfigResolvedhooks
Security
20 advisories affect 4.2.0; 4.6.2 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
- LowNuxt: Colliding island props can share one `/__nuxt_island` path (incomplete fix for CVE-2026-46342)GHSA-hf59-9xwc-2g4p · 16 Nov 2026No fix yet
- HighNuxt: Unauthenticated CPU exhaustion parsing and hashing the Nuxt island endpoint body before hash validationGHSA-9pgf-384g-p7mv · 5 Aug 2026Fixed in 4.5.1
15 more
- HighNuxt: Server-Side Remote Code Execution via Runtime Template Injection in Nuxt Server Island PropsGHSA-9473-5f9j-94wq · 5 Aug 2026Fixed in 4.5.1
- HighNuxt: Unauthenticated out-of-memory crash via unbounded v-for expansion in island renderingGHSA-hxcr-hm88-mpq6 · 5 Aug 2026Fixed in 4.5.1
- HighNuxt: Route-rule middleware bypass via case-sensitivity mismatch between vue-router and the routeRules matcherGHSA-mm7m-92g8-7m47 · 16 Jun 2026Fixed in 4.4.7
- ModerateNuxt server islands render `useHeadSafe` input without sanitisationGHSA-xfq5-w38q-pc2x · 22 Oct 2026Fixed in 4.6.2
- ModerateNuxt: Route rules are matched against the raw request path, so a percent-encoded segment can bypass `appMiddleware` on dynamic and catch-all routesGHSA-6gq8-jgmh-3ffp · 22 Oct 2026Fixed in 4.4.4
- ModerateNuxt: Unauthorized Component Instantiation via Server Island PropsGHSA-48hr-524c-v5w3 · 5 Aug 2026Fixed in 4.5.1
- ModerateNuxt: Reflected XSS in `<NuxtLink>` via unsanitised `javascript:` or `data:` URLGHSA-934w-87qh-qr26 · 16 Jun 2026Fixed in 4.4.7
- ModerateNuxt dev server vite-node IPC socket is world-connectable on LinuxGHSA-534h-c3cw-v3h9 · 16 Jun 2026Fixed in 4.4.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 4.4.7
- ModerateNuxt's route middleware is not enforced when rendering `.server.vue` pages via `/__nuxt_island/page_*`GHSA-hg3f-28rg-4jxj · 29 May 2026Fixed in 4.4.6
- ModerateNuxt: Reflected XSS in `navigateTo()` external redirectGHSA-fx6j-w5w5-h468 · 19 May 2026Fixed in 4.4.6
- 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 4.4.7
- LowNuxt: Dev server discloses project absolute path and persistent workspace UUID via `/.well-known/appspecific/com.chrome.devtools.json`GHSA-rq7w-g337-39qq · 15 Jun 2026Fixed in 4.4.7
- LowNuxt: `__nuxt_island` endpoint does not bind responses to request props, enabling shared-cache poisoningGHSA-g8wj-3cr3-6w7v · 19 May 2026Fixed in 4.4.6
Release note
4.2.0 is the next minor release.
Highlights
We're excited to announce Nuxt 4.2, bringing new capabilities for better TypeScript DX, enhanced error handling, and improved control over data fetching! 🎉
Abort Control for Data Fetching
You can now use AbortController signals directly within useAsyncData, giving you fine-grained control over request cancellation (#32531).
This works by passing an internal signal to your useAsyncData handler to cancel any promise that can be canceled, such as $fetch.
<script setup lang="ts">
const controller = new AbortController()
const { data, error, clear, refresh } = await useAsyncData('users', (_nuxtApp, { signal }) => $fetch('/api/users', {
signal
}))
refresh() // will actually cancel the $fetch request (if dedupe: cancel)
refresh() // will actually cancel the $fetch request (if dedupe: cancel)
refresh()
clear() // will cancel the latest pending handler
</script>You also pass an AbortController signal directly to refresh/execute, giving you fine-grained control over request cancellation. This is particularly useful when you need to abort requests based on user actions or component lifecycle events.
const { data, refresh } = await useAsyncData('posts', fetchPosts)
// Abort an ongoing refresh
const abortController = new AbortController()
refresh({ signal: abortController.signal })
// Later...
abortController.abort()Better Error Pages in Development
When an error occurs during development, Nuxt will now display both your custom error page and a detailed technical error overlay (#33359). This gives you the best of both worlds – you can see what your users will experience while also having immediate access to stack traces and debugging information.
Screenshot of the new development error page
The technical overlay appears as a toggleable panel that doesn't interfere with your custom error page, making it easier to debug issues while maintaining a realistic preview of your error handling.
Opt-in Vite Environment API
For those wanting to experiment with cutting-edge features, you can now opt into the Vite Environment API (#33492).
The Vite Environment API is a major architectural improvement in Vite 6. It closes the gap between development and production by allowing the Vite dev server to handle multiple environments concurrently (rather than requiring multiple Vite dev servers, as we have done previously in Nuxt).
This should improve performance when developing and eliminate some edge case bugs.
... and it is the foundation for implementing Nitro as a Vite environment, which should speed up the dev server still further, as well as allowing more greater alignment in development with your Nitro preset.
export default defineNuxtConfig({
experimental: {
viteEnvironmentApi: true
}
})This is also the first breaking change for Nuxt v5. You can opt in to these breaking changes by setting compatibilityVersion to 5:
export default defineNuxtConfig({
future: {
compatibilityVersion: 5
},
})Please only use this for testing, as this opts in to unlimited future breaking changes, including updating to Nitro v3 once we ship the Nuxt integration.
Warning
This is highly experimental and the API may change. Only enable if you're prepared for potential breaking changes and want to help shape the future of Nuxt!
New @nuxt/nitro-server Package
We've extracted Nitro server integration into its own package: @nuxt/nitro-server (#33462). This architectural change allows for different Nitro integration patterns and paves the way for future innovations in server-side rendering.
While this change is mostly internal, it's part of our ongoing effort to make Nuxt more modular and flexible. The new package provides standalone Nitro integration and sets the foundation for alternative integration approaches (such as using Nitro as a Vite plugin in Nuxt v5+).
Note
This is an internal refactor – no changes should be required in your code.
Performance Improvements
We've also shipped several performance enhancements:
Precomputed renderer dependencies – We now compute renderer dependencies at build time rather than runtime, improving cold start and initial render performance
Reduced dependencies – Removed unnecessary dependencies from kit and schema packages
Async Data Handler Extraction
One of the most exciting performance improvements is the new experimental async data handler extraction (#33131). When enabled, handler functions passed to useAsyncData and useLazyAsyncData are automatically extracted into separate chunks and dynamically imported.
This is particularly effective for prerendered static sites, as the data fetching logic is only needed at build time and can be completely excluded from the client bundle.
Note
In testing with a previous version of nuxt.com, this feature reduced JavaScript bundle size by 39%! Of course, your mileage may vary depending on how much data fetching logic you have.
<script setup lang="ts">
// This handler will be extracted into a separate chunk
// and only loaded when needed
const { data: post } = await useAsyncData('post', async () => {
const content = await queryContent(`/blog/${route.params.slug}`).findOne()
// Complex data processing that you don't want in the client bundle
const processed = await processMarkdown(content)
const related = await findRelatedPosts(content.tags)
return {
...processed,
related
}
})
</script>For static/prerendered sites, enable it in your config:
export default defineNuxtConfig({
experimental: {
extractAsyncDataHandlers: true
}
})The extracted handlers are then tree-shaken from your client bundle when prerendering, as the data is already available in the payload. This results in significantly smaller JavaScript files shipped to your users.
Experimental TypeScript Plugin Support
We're introducing experimental support for enhanced TypeScript developer experience through the @dxup/nuxt module.
This module adds a number of TypeScript plugins that aim to improve your experience when using Nuxt-specific features:
Smart component renaming: Automatically updates all references when you rename auto-imported component files
Go to definition for dynamic imports: Navigate directly to files when using glob patterns like
import(\~/assets/${name}.webp`)`Nitro route navigation: Jump to server route handlers from data fetching functions (
$fetch,useFetch,useLazyFetch)Runtime config navigation: Go to definition works seamlessly with runtime config properties
Enhanced auto-import support: Includes the
@dxup/unimportplugin for better navigation with auto-imported composables and utilities
Note
Read more in the documentation.
To enable this feature, set experimental.typescriptPlugin to true in your Nuxt configuration:
export default defineNuxtConfig({
experimental: {
typescriptPlugin: true
}
})Once enabled, the module will be automatically installed and configured by Nuxt.
Important
This feature also requires selecting the workspace TypeScript version in VS Code. Run the "TypeScript: Select TypeScript Version" command and choose "Use Workspace Version".
Other Improvements
Component
declarationPath– You can now specify a custom declaration path for componentsModule resolution extensions – Kit's
resolveModulenow accepts anextensionsoptionGlobal head utility – New
setGlobalHeadutility in kit for easier head management
Important Fixes
Route hash is now preserved when redirecting based on
routeRulesFixed concurrent calls to
loadNuxtConfigwith proper cleanupObject-format
hrefnow works correctly in<NuxtLink>Component auto-imports now work as arguments to Vue's
h()functionFixed app config array handling during HMR
Upgrading
Our recommendation for upgrading is to run:
npx nuxt upgrade --dedupe
This will refresh your lockfile and pull in all the latest dependencies that Nuxt relies on, especially from the unjs ecosystem.
Changelog
Enhancements
nuxt: Allow specifying component
declarationPathkit: Add
extensionsoption forresolveModulenuxt: Add abortController option to
useAsyncDatanuxt: Display youch error page w/ user error page in dev
nuxt: Experimental typescript plugin support
nuxt,schema: Extract asyncData handlers to chunks
schema: Enable setting
future.compatibilityVersionto5kit,vite: Allow enabling vite environment api
kit: Add
setGlobalHeadutility
Performance
nuxt: Precompute renderer dependencies at build time
kit,schema: Remove some unnecessary dependencies
Fixes
nuxt: Preserve hash with redirecting based on
routeRuleskit: Safely cleanup
loadNuxtConfigin concurrent callsnuxt: Allow object-format
hrefin<NuxtLink>nuxt: Remove
mergeModelsfrom auto importsnuxt: Add back
shortPathpropertynuxt: Do not allow native attrs to shadow nuxt link props
- Removed
nuxt: Remove
declarationPathfrom component dirs nuxt: Preserve root route in
isPrerenderedchecknuxt: Exempt webpack vfs from pkg lookup
nitro: Exempt nightly release from import protections
webpack,rspack: Preserve prerender + nitro flags in server builds
nuxt: Support component auto-imports as arguments of
h()vite: Prevent assignment for rolldown's replacement plugin
nuxt: Use sha256 hash for prerender cache keys
nuxt: Add
NuxtTimerelative timenumericpropnuxt: Add
NuxtTimerelative timerelativeStylepropnuxt: Handle arrays in app config correctly during HMR
vite: Unset
optimizeDeps.includefor server environment
Refactors
- Deprecated
schema: Deprecate
extend,extendConfig, andconfigResolvedhooks
Documentation
- Removed
Remove deprecated node version
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.