nuxt
4.6.4 · 2 Nov 2026MIT3.6M / weekRepositoryHomepagenpmAtom feed
3.21.11 is the newest release of 3.x.
In short
1 removed22 new9 faster23 fixed46 internal
- Removed
Remove deprecated
loadNuxtoptions
Security
17 advisories affect 3.9.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
3.9.0 is the next minor release.
Highlights
A very merry Christmas to you and yours from all Nuxters involved in this release! 🎁🎄
We have lots of features packed into v3.9.0 and can't wait for you to try them out.
Vite 5
This release comes with Vite 5 and Rollup 4 support. Module authors may need to check to ensure that any vite plugins you're creating are compatible with these latest releases.
This comes with a whole host of great improvements and bug fixes - check out the Vite changelog for more info.
Vue 3.4 ready
This release is tested with the latest Vue 3.4 release candidate, and has the necessary configuration to take advantage of new features in Vue 3.4, including debugging hydration errors in production (just set debug: true) in your Nuxt config.
👉 To take advantage, just update your vue version once v3.4 is released, or try out the release candidate today:
{
"dependencies": {
"nuxt": "3.9.0",
"vue": "3.4.0-rc.1",
"vue-router": "latest"
}
}Interactive Server Components
This is a highly-experimental update, but it's now possible to play around with interactive components within Nuxt server components. You'll need to enable this new feature additionally to component islands:
export default defineNuxtConfig({
experimental: {
componentIslands: {
selectiveClient: true
}
}
})Now, within a server component, you can specify components to hydrate by using the nuxt-client directive:
<NuxtLink :to="/" nuxt-client />
We're pretty excited about this one - so do let us know how you're using it! 🙏
Automatic Server Optimisations
We now use Vite's new AST-aware 'define' to perform more accurate replacements on server-side code, meaning code like this will no longer throw an error:
<script setup lang="ts">
if (document) {
console.log(document.querySelector('div'))
}
</script>This hasn't been possible until now because we haven't wanted to run the risk of accidentally replacing normal words like document within non-JS parts of your apps. But Vite's new define functionality is powered by esbuild and is syntax-aware, so we feel confident in enabling this functionality. Nevertheless, you can opt out if you need to:
export default defineNuxtConfig({
hooks: {
'vite:extendConfig' (config) {
delete config.define!.document
}
}
})Granular Loading API
We now have a new hook-based system for <NuxtLoadingIndicator>, including a useLoadingIndicator composable that lets you control/stop/start the loading state. You can also hook into page:loading:start and page:loading:end if you prefer.
You can read more in the docs and in the original PR (#24010).
Run single events in callOnce
Sometimes you only want to run code once, no matter how many times you load a page - and you don't want to run it again on the client if it ran on the server.
For this, we have a new utility: callOnce (#24787).
<script setup>
const websiteConfig = useState('config')
await callOnce(async () => {
console.log('This will only be logged once')
websiteConfig.value = await $fetch('https://my-cms.com/api/website-config')
})
</script>Note that this utility is context-aware so it must be called in component setup function or Nuxt plugin, as with other Nuxt composables.
Error Types
For a while now, errors returned by useAsyncData and useFetch have been typed pretty generically as Error. We've significantly improved the type possibilities for them to make them more accurate in terms of what you'll actually receive. (We normalise errors with the h3 createError utility under the hood, so they can be serialised from server to client, for example.)
We've tried to implement the type change in a backwards compatible way, but you might notice that you need to update the generic if you're manually configuring the generics for these composables. See (#24396) for more information, and do let us know if you experience any issues.
Schema Performance
We've taken some time in this release to make some minor performance improvements, so you should notice some things are a bit faster. This is an ongoing project and we have ideas for improving initial load time of the Nuxt dev server.
Upgrading
As usual, our recommendation for upgrading is to run:
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
nuxt: Warn when page uses a layout without
<NuxtLayout>kit: Support prepend option for
addComponentsDirkit: Allow customising logger options
nuxt: Allow readonly option for
useCookienuxt: Add path to
error.datawhen throwing 404 errorskit: Load
/moduleor/nuxtmodule subpath if it existsnuxt: Layers support for spa loading template
nuxt: Expose
refreshon islands and server componentsnuxt: Add
dedupeoption for data fetching composablesvite: Replace browser globals with
undefinedon servernuxt: Allow plugins to specify dependencies
kit: Add new
addServerScanDircomposablenuxt: Transform
setupwithindefineComponentoptionsnuxt: Allow customising fallback layout
nuxt:
useRequestHeaderutilitynuxt: Move loading api behind hooks
nuxt: Add
callOnceutil to allow running code only oncenuxt: Allow client components within
NuxtIslandschema: Default to
bundlermodule resolutionkit,nuxt,vite,webpack: Add
toArrayutil
Performance
vite: Avoid duplicate
resolveoperationnuxt: Avoid duplicate iterations over layers
kit: Avoid duplicate
joinoperationvite: Simplify manifest property acccess
nuxt: Don't dedupe fewer than two middleware/plugins
schema: Avoid duplicate
getoperationsschema: Use parallel promises
nuxt: Avoid duplicate
useRuntimeConfigcallvite: Avoid duplicate
JSON.stringifyoperation
Fixes
nuxt: Avoid recursive ssr errors
nuxt: Improve path resolve for
import.d.tsnuxt: Remove experimental
reactivityTransform(vue 3.4)nuxt: Ignore manifest when prerendering
nuxt: Don't strip literals from template in
<DevOnly>vite: Use
isBuiltinpolyfill for greater node supportnuxt: Island components with number prefix
nuxt: Use consistent annotations for tree-shaking
nuxt: Skip prerendering all pages in hash mode
nuxt: Skip router middleware/redirections for islands
nuxt: Remove trailing slash before checking if prerendered
nuxt: Skip check for
<NuxtLayout>usage in islandsvite,webpack: Don't add type checker/analyzer when testing
nuxt: Do not try auto-install outside of a Nuxt context
nuxt: Merge and apply layer hooks
nuxt: Only add/remove trailing slash for http protocols
nuxt: Ensure
errorinuseAsyncDatahas correct typenuxt: Add
appManifestmiddleware after modules runnuxt: Revert async transform of
setupwithindefineComponentnuxt: Eager load island components map
nuxt: Register override hooks separately
nuxt: Add
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__kit: Auto-detect
modefromfilePathforaddComponentschema: Revert
bundlermodule resolution due to lack of supportkit: Don't add local
~/modulesdirs tomodulesDir
Documentation
- Removed
Remove deprecated
loadNuxtoptions
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.