Most teams we talk to are a minor version or two behind on Next.js, and for a long time that was fine. Over the last two months it stopped being fine. Between 14 October and 3 November the Next.js team shipped two security releases, including fixes for two critical remote code execution bugs, and Next.js 16.4 changed how new apps cache data by default. If you've been putting off a Next.js 16.4 upgrade, here's what's in it, where the risk is, and how we'd plan it.
The security releases you can't skip
On 14 October 2026 the team published an out-of-band security update with three advisories, two rated Critical and one High. The critical ones were an unauthenticated RCE through use cache functions that return multiple typed arrays (with no known workaround), and an unauthenticated RCE in the Image Optimization API when handling SVGs on glibc-based Linux, caused by a bug in an upstream image library. The workaround for that second one is making sure Next.js uses sharp 0.35.5 or later. The High was a denial-of-service issue in App Router apps that use Server Actions. The fixes shipped in 16.4.1 and 15.5.28.
Then the November 2026 Security Release on 3 November added seven more advisories (one High, six Medium), fixed in 16.4.5 and 15.5.29. Most of them involve caching: a cross-tenant cache disclosure when unstable_cache and use cache are combined, cache poisoning through binary use cache arguments, and shared shell cache poisoning in self-hosted apps running next start with Cache Components on and Partial Prefetching off. There's also an SVG check bypass in Image Optimization and a cookie exposure issue in Edge routes.
Our view: if you're on 16.x, go to 16.4.5. If you're on 15.5, go to 15.5.29 at the very least. Multi-tenant SaaS apps that use use cache should treat the November release as urgent, even though most items are rated Medium. "Another tenant's data showed up" is the kind of bug that ends up in a customer email.
What's new in Next.js 16.4
The Next.js 16.4 release post (6 October 2026) is mostly about caching and AI agents:
- Cache Components are now recommended for every app. They're on by default in
create-next-appand will become the default in Next.js 17. You opt in withcacheComponents: trueandpartialPrefetching: true. - New APIs, including
ensureStaticand thenavigation()andprefetch()helpers fromnext/cache, give you finer control over what's static and what gets prefetched. next upgrade --agentlets an AI coding agent drive the upgrade, and an experimentalagentUpgradeoption defaults to a security-only policy.- Turbopack's disk cache is 20–25% smaller thanks to Zstandard compression, and server HMR is now lazy.
- It ships with React 19.3, which makes View Transitions and Fragment Refs stable.
- An experimental Rust-based React Compiler reports about 30% less memory use and 15% faster compiles.
Cache Components are the real decision
The security fixes are a straight patch. Cache Components are an architecture choice. They change how you think about what's cached and for whom, and the November advisories show that's exactly where the subtle bugs live. On a new project we'd turn them on. On an existing app with tenant-specific data, we'd patch to 16.4.5 first, then adopt Cache Components route by route, with tests that sign in as two different tenants and compare the responses.
Should an AI agent run your Next.js 16.4 upgrade?
GitHub's Octoverse 2026 report, published 28 October, says that as of September developers start more than 40% of pull requests with an agent, up from 17% in March. TypeScript held on as the most-used language on GitHub. So plenty of teams already work this way, and next upgrade --agent fits right into that habit.
We'd use it, with guardrails. Let the agent handle codemods, dependency bumps and the dull config changes. Keep a human on anything that touches caching, auth or middleware. An agent will happily get the build green. It won't know that a cached function reads a tenant ID from a root parameter unless someone tells it.
Here's a quick scenario. Say you're a B2B SaaS company with a 3-person frontend team, one Next.js app and a few hundred customer workspaces. The agent can probably do 80% of the mechanical changes in an afternoon. The remaining 20%, deciding which cached functions are tenant-aware, is where your senior developer should spend the week.
A step-by-step upgrade plan
- Check your version with
npm ls next. Anything below 16.4.5 or 15.5.29 is missing security fixes. - Patch first, in its own pull request:
npm install next@16.4.5(ornext@15.5.29). Ship it before any feature work. - If you self-host on Linux and use Image Optimization, confirm sharp is on 0.35.5 or later.
- Search the codebase for
unstable_cacheanduse cache, and list every function that reads a root parameter or user-specific data. - Run
next upgrade --agenton a branch for the remaining changes, then review the diff by hand. - Add a two-tenant test for cached routes before you turn on Cache Components.
- Adopt Cache Components and partial prefetching route by route, starting with public pages.
On timing: for a marketing site or small SaaS app, the security patch is usually under a day including QA. Rolling out Cache Components across a mid-sized app typically takes one to three weeks, depending on how much tenant-specific data you cache.
How XpoSync helps
We run upgrades like this for product teams who'd rather keep shipping features. In practice that means a security patch in week one, a caching audit, and a staged rollout of the new features with tests in place. If you just need extra hands for a sprint, we can add a Next.js developer to your team instead.
Wrapping up
Patch to 16.4.5 or 15.5.29 now, then treat Cache Components as a planned migration rather than a checkbox. The tooling, agents included, can do a lot of the work, as long as someone who understands your data reviews it. If you'd like help planning yours, talk to our team.
FAQ
What is the latest secure Next.js version?
As of the 3 November 2026 security release, the patched versions are 16.4.5 and 15.5.29.
Are Cache Components on by default in Next.js 16.4?
They're on by default in new apps created with create-next-app. Existing apps opt in, and Cache Components become the default in Next.js 17.
Is it safe to use next upgrade --agent?
It's a reasonable way to handle routine changes. Review anything involving caching, auth or middleware yourself before you merge.
Which React version does Next.js 16.4 use?
Next.js 16.4 ships with React 19.3.
Sources
- Next.js 16.4, Next.js Blog (Vercel), 6 Oct 2026
- Next.js Security Update for Upstream Vulnerabilities, Next.js Blog, 14 Oct 2026
- November 2026 Security Release, Next.js Blog, 3 Nov 2026
- Octoverse: Commits, pushes, reach new highs in 2026 as developers build with agents, GitHub Blog, 28 Oct 2026


