If you run a Nuxt app behind a page cache, don’t park the Nuxt 4.7 upgrade until next sprint. The release, announced on November 23, fixes three security issues, and one of them can push a signed-in user’s page data into your CDN, where it gets served to someone else. Nuxt 4.7 is also the first release that lets you run Nitro v3, the server layer Nuxt 5 is built on, inside an existing Nuxt 4 project. On top of that you get experimental WebMCP support for in-browser AI agents, schema-validated runtime config and some measurable speed gains. The team counts around 350 commits since 4.6.4.
Nuxt 4.7 closes a cache leak in _payload.json
The most important fix is GHSA-jxc9-w3j6-pwp2, rated medium. For every server-rendered page, Nuxt writes a _payload.json file holding the data the page fetched while rendering. Route rules, the per-path settings in nuxt.config that control caching, redirects and headers, were never applied to that payload URL. So if you had a catch-all rule such as '/**': { swr: 60 } plus a specific exception for a protected section, a request for /account/_payload.json only matched the catch-all. The page rendered anyway, its data came back as cacheable JSON, and the next visitor could receive it.
According to the advisory, every nuxt release from 3.0.0 up to 4.7.0 is affected through one package or another. The Nuxt team explicitly asks you to purge any CDN or edge cache that may already hold a _payload.json once you’ve upgraded. Upgrading does nothing about data that is already sitting in a cache.
The second fix, GHSA-vrh2-cfcx-c3fg (also medium), completes an earlier patch. Route rules were matched against the raw path with doubled slashes intact, while the router still resolved that path to a catch-all page like pages/[...slug].vue. Request /docs//internal/guide instead of /docs/internal/guide and middleware such as appMiddleware: 'auth' simply didn’t run. It’s the same class of bug we covered in the middleware bypasses in Fastify and Livewire: the check and the resolver see different paths. The third issue, GHSA-h5xj-x893-p5f7, is rated low and only matters if your dev server is reachable from an untrusted network. In that case nuxt dev could serve old build output with private runtime config values baked in.
The recommended upgrade path is npx nuxt upgrade --dedupe. It refreshes your lockfile and bumps Vue to at least 3.5.46, which Nuxt 4.7 now requires.
Try Nitro v3 before Nuxt 5 lands
Nitro is the server engine underneath Nuxt: it handles requests, renders pages and produces builds for targets like Node, Cloudflare or Vercel. Nuxt 5 will ship on Nitro v3, and 4.7 lets you start that migration early. You don’t change any config. You add a dependency:
npm install nitro
With nitro in your package.json, Nuxt builds with Nitro v3. Remove it and you’re back on v2. The team is blunt that Nitro v3 is still a release candidate and should be tried on a branch, not in production. Take that at face value.
To keep existing modules from falling over, Nitro v3 runs on Nuxt 4 behind a compatibility layer called nitroLegacy. It keeps old imports from h3 and nitropack resolving, preserves the Nitro v2 auto-imports and emulates a long list of h3 v1 behaviours. The sensible approach has two steps. Get the app running with the layer on, then switch it off to see which code still leans on it.
export default defineNuxtConfig({
nitroLegacy: false,
})
Two changes apply regardless of that layer. Route rules use a different pattern syntax, so /blog/* now also matches /blog/2026/hello. Nuxt warns about every rule whose meaning shifts and refuses to build with rules that contain more than one wildcard, like /api/*/items/**. Rewrite those with a named parameter such as /api/:id/items/**. Given the payload bug above, read each of those warnings carefully: a cache rule that suddenly covers deeper paths is exactly the kind of mistake you don’t want to discover in production. The second change concerns imports. When a package was missing from your project, Nitro v2 quietly fell back to Nuxt’s own dependencies. Nitro v3 doesn’t, and nuxt dev fails with errors like Cannot find package 'ufo'. Every package your server code imports has to be listed in your own package.json.
The payoff, by the team’s own benchmark on an app with about 170 pages: requests per second on the home page went from 926 to 1,236 with Nitro v3, and from 219 to 316 on a page with 1,000 links, with identical HTML. Those are vendor numbers from a single test setup.
staticRoutes is a free speed-up for most apps
Separate from Nitro v3, there’s an option many projects can switch on today. By default Nuxt creates a fresh vue-router matcher for every server request, in case your app adds routes at runtime. If yours doesn’t, set experimental.staticRoutes: true and the matcher is built once. On the same benchmark app, throughput for a small page rose from 890 to 1,976 requests per second. The catch is that router.addRoute(), removeRoute() and clearRoutes() now throw, so extra routes have to come in through the pages:extend hook. Before flipping the switch, grep your project and your modules for addRoute.
Compared with 4.6.4, the team also reports 43 percent less server output on the starter app and 35 percent less total blocking time on the Nuxt UI landing page. Part of that comes from V8 compile hints, which let Chrome compile the key chunks in the background while they download instead of stalling the main thread on first run.
Runtime config gets real validation
A smaller change that will save some head-scratching: runtime config. Environment variables used to be coerced with destr, which occasionally backfired, turning a string like 4848e0 into a number. There was also no way to mark a value as required. Now any entry can be a Standard Schema from Zod, Valibot or ArkType:
import { z } from 'zod'
export default defineNuxtConfig({
runtimeConfig: {
apiSecret: z.string(),
public: {
mode: z.enum(['preview', 'production']).default('production'),
},
},
})
If apiSecret is missing at startup or a value can’t be converted, the server refuses to start and prints one error listing everything that’s wrong. According to the team the schema itself stays out of the server bundle and is compiled into a compact description at build time. In practice, a forgotten secret now shows up at deploy time rather than on the first failed login.
WebMCP in Nuxt 4.7: tools for agents in the browser
The feature most people will talk about is experimental WebMCP support. WebMCP is a proposed browser API that lets a page expose tools to AI agents running in the browser, so the agent doesn’t have to guess which button to press. We looked at the same idea when Shopify opened its checkout to AI agents.
Once you enable experimental: { webmcp: true }, a JSDoc comment with @tool above a function bound to a click handler is enough. addToCart becomes an add_to_cart tool. The clever part is the safety model. Arguments come from the template, so an agent can only trigger what a user could click, and the tool won’t run while its button is disabled. A function bound to @submit becomes a form tool: the call fills in the form and really submits it, so your own validation runs. For actions without a matching control there’s defineAgentTool(), and useAgentActivity() shows users what the agent is doing, with a stop button.
The announcement is upfront about the limits. The spec is still moving, and Chrome only offers the API as an early preview behind a flag. In other browsers Nuxt registers nothing and your app behaves exactly as before. For production sites this is an experiment for now. It’s still worth a look, because Nuxt warns at build time about bindings that can’t become tools and, in development, writes each visited page’s tools to .nuxt/webmcp/schema.json. That gives you an early view of what your UI looks like to an agent.
Other things to check when you upgrade
Nuxt DevTools no longer comes bundled. If you use them, add @nuxt/devtools to your devDependencies. Template diagnostics are on by default, so a <NuxtLink> whose static target matches no page now triggers warning NUXT_B4025; add the external prop for links to server routes or files in public/. Type errors, ESLint findings and Vue compiler warnings are now collected in a single badge on the page, and you can limit type checking to development with typeCheck: 'dev'. With experimental.ssrErrorBoundary, <NuxtErrorBoundary> catches errors during server rendering as well, and <NuxtClientFallback> is deprecated. Rspack users should look at the new Rsbuild builder, which replaces the old one. As with the move to Nuxt 4.6 and its server-agnostic architecture, the Nuxt 4.7 release announcement is worth reading in full, since it links every change to its pull request.
Our take
The order of work is fairly obvious. Upgrade to 4.7.0 first and purge your CDN cache afterwards, especially if swr, isr or cache rules sit on pages with per-user data. Then turn on staticRoutes for any project that doesn’t add routes at runtime; it’s throughput for free. Nitro v3 belongs on its own branch, with a close look at the changed route-rule patterns and any missing dependencies. Doing that now will make the jump to Nuxt 5 much less painful. WebMCP is interesting but still tied to a Chrome flag. A shop page or contact form in your dev environment is enough to see which tools Nuxt derives from it.



