nuxt
4.6.4 · 2 Nov 2026MIT3.6M / weekRepositoryHomepagenpmAtom feed
4.6.4 is the newest release of 4.x.
In short
11 new9 faster24 fixed44 internal
Security
Fixes 1 advisory that affected 4.0.3
- LowNuxt has Client-Side Path Traversal in Nuxt Island Payload RevivalGHSA-p6jq-8vc4-79f6 · 17 Sep 2025Fixed in 4.1.0
20 advisories affect 4.1.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
Highlights
Build and Performance Improvements
Enhanced Chunk Stability
Build stability has been significantly improved with import maps (#33075). This prevents cascading hash changes that could invalidate large portions of your build when small changes are made:
<!-- Automatically injected import map -->
<script type="importmap">{"imports":{"#entry":"/_nuxt/DC5HVSK5.js"}}</script>By default, JS chunks emitted in a Vite build are hashed, which means they can be cached immutably. However, this can cause a significant issue: a change to a single component can cause every hash to be invalidated, massively increasing the chance of 404s.
In short:
A component is changed slightly - the hash of its JS chunk changes
The page which uses the component has to be updated to reference the new file name
The entry now has its hash changed because it dynamically imports the page
every other file which imports the entry has its hash changed because the entry file name is changed
Obviously this wasn't optimal. With this new feature, the hash of (otherwise) unchanged files which import the entry won't be affected.
This feature is automatically enabled and helps maintain better cache efficiency in production. It does require native import map support, but Nuxt will automatically disable it if you have configured vite.build.target to include a browser that doesn't support import maps.
And of course you can disable it if needed:
export default defineNuxtConfig({
experimental: {
entryImportMap: false
}
})Experimental Rolldown Support
Nuxt now includes experimental support for rolldown-vite (#31812), bringing Rust-powered bundling for potentially faster builds.
To try Rolldown in your Nuxt project, you need to override Vite with the rolldown-powered version since Vite is a dependency of Nuxt. Add the following to your package.json:
npm:
{
"overrides": {
"vite": "npm:rolldown-vite@latest"
}
}pnpm:
{
"pnpm": {
"overrides": {
"vite": "npm:rolldown-vite@latest"
}
}
}yarn:
{
"resolutions": {
"vite": "npm:rolldown-vite@latest"
}
}bun:
{
"overrides": {
"vite": "npm:rolldown-vite@latest"
}
}After adding the override, reinstall your dependencies. Nuxt will automatically detect when Rolldown is available and adjust its build configuration accordingly.
For more details on Rolldown integration, see the Vite Rolldown guide.
Note
This is experimental and may have some limitations, but offers a glimpse into the future of high-performance bundling in Nuxt.
Improved Lazy Hydration
Lazy hydration macros now work without auto-imports (#33037), making them more reliable when component auto-discovery is disabled:
<script setup>
// Works even with components: false
const LazyComponent = defineLazyHydrationComponent(
'visible',
() => import('./MyComponent.vue')
)
</script>This ensures that components that are not "discovered" through Nuxt (e.g., because components is set to false in the config) can still be used in lazy hydration macros.
Enhanced Page Rules
If you have enabled experimental extraction of route rules, these are now exposed on a dedicated rules property on NuxtPage objects (#32897), making them more accessible to modules and improving the overall architecture:
// In your module
nuxt.hook('pages:extend', pages => {
pages.push({
path: '/api-docs',
rules: {
prerender: true,
cors: true,
headers: { 'Cache-Control': 's-maxage=31536000' }
}
})
})The defineRouteRules function continues to work exactly as before, but now provides better integration possibilities for modules.
Module Development Enhancements
Module Dependencies and Integration
Modules can now specify dependencies and modify options for other modules (#33063). This enables better module integration and ensures proper setup order:
export default defineNuxtModule({
meta: {
name: 'my-module',
},
moduleDependencies: {
'some-module': {
// You can specify a version constraint for the module
version: '>=2',
// By default moduleDependencies will be added to the list of modules
// to be installed by Nuxt unless `optional` is set.
optional: true,
// Any configuration that should override `nuxt.options`.
overrides: {},
// Any configuration that should be set. It will override module defaults but
// will not override any configuration set in `nuxt.options`.
defaults: {}
}
},
setup (options, nuxt) {
// Your module setup logic
}
})This replaces the deprecated installModule function and provides a more robust way to handle module dependencies with version constraints and configuration merging.
Module Lifecycle Hooks
Module authors now have access to two new lifecycle hooks: onInstall and onUpgrade (#32397). These hooks allow modules to perform additional setup steps when first installed or when upgraded to a new version:
export default defineNuxtModule({
meta: {
name: 'my-module',
version: '1.0.0',
},
onInstall(nuxt) {
// This will be run when the module is first installed
console.log('Setting up my-module for the first time!')
},
onUpgrade(inlineOptions, nuxt, previousVersion) {
// This will be run when the module is upgraded
console.log(`Upgrading my-module from v${previousVersion}`)
}
})The hooks are only triggered when both name and version are provided in the module metadata. Nuxt uses the .nuxtrc file internally to track module versions and trigger the appropriate hooks. (If you haven't come across it before, the .nuxtrc file should be committed to version control.)
Tip
This means module authors can begin implementing their own 'setup wizards' to provide a better experience when some setup is required after installing a module.
Enhanced File Resolution
The new ignore option for resolveFiles (#32858) allows module authors to exclude specific files based on glob patterns:
// Resolve all .vue files except test files
const files = await resolveFiles(srcDir, '**/*.vue', {
ignore: ['**/*.test.vue', '**/__tests__/**']
})Layer Directories Utility
A new getLayerDirectories utility (#33098) provides a clean interface for accessing layer directories without directly accessing private APIs:
import { getLayerDirectories } from '@nuxt/kit'
const layerDirs = await getLayerDirectories(nuxt)
// Access key directories:
// layerDirs.app - /app/ by default
// layerDirs.appPages - /app/pages by default
// layerDirs.server - /server by default
// layerDirs.public - /public by defaultDeveloper Experience Improvements
Simplified Kit Utilities
Several kit utilities have been improved for better developer experience:
addServerImportsnow supports single imports (#32289):
// Before: required array
addServerImports([{ from: 'my-package', name: 'myUtility' }])
// Now: can pass directly
addServerImports({ from: 'my-package', name: 'myUtility' })Performance Optimizations
This release includes several internal performance optimizations:
Improved route rules cache management
Optimized app manifest watching
Better TypeScript processing for page metadata
Notable Fixes
Improved
useFetchhook typingBetter handling of TypeScript expressions in page metadata (#32902, #32914)
Enhanced route matching and synchronization
Reduced verbosity of Vue server warnings in development
Better handling of relative time calculations in
<NuxtTime>
Upgrading
As usual, 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
kit: Add
ignoreoption toresolveFileskit: Add
onInstallandonUpgrademodule hooksnuxt,vite: Add experimental support for
rolldown-vitenuxt: Extract
defineRouteRulesto pagerulespropertynuxt,vite: Use importmap to increase chunk stability
nuxt: Lazy hydration macros without auto-imports
kit,nuxt,schema: Allow modules to specify dependencies
kit,nuxt: Add
getLayerDirectoriesutil and refactor to use it
Performance
nuxt: Clear inline route rules cache when pages change
nuxt: Stop watching app manifest once a change has been detected
Fixes
nuxt: Handle
satisfiesin page augmentationnuxt: Type response in
useFetchhooksnuxt: Add TS parenthesis and as expression for page meta extraction
nuxt: Use correct unit thresholds for relative time
nuxt: Handle uncached current build manifests
kit: Resolve directories in
resolvePathand normalize file extensionsschema,vite: Bump
requestTimeout+ allow configurationnuxt: Deep merge extracted route meta
nuxt: Do not expose app components until fully resolved
kit: Only exclude
node_modules/if no customsrcDirnuxt: Transform ts before page meta extraction
nuxt: Compare final matched routes when syncing
routeobjectnuxt: Make vue server warnings much less verbose in dev mode
schema: Allow disabling cssnano/autoprefixer postcss plugins
kit: Ensure local layers are prioritised alphabetically
kit,nuxt: Expose global types to vue compiler
deps: Bump devalue
nuxt: Support config type inference for
defineNuxtModule().with()nuxt: Search for colliding names in route children
nuxt: Delete
nuxtApp._runningTransitionon resolvenuxt: Add validation for nuxt island reviver key
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.