Next.js 16 Upgrade Guide: Moving From 14 or 15 Without Breaking Production
Shakewell ·
To upgrade to Next.js 16, run npx @next/codemod@canary upgrade latest, fix the breaking changes the codemod cannot reach, and move to the newest 16.x release so you receive its security patches. Next.js 16 needs Node.js 20.9 or later, TypeScript 5.1 or later and React 19, and its biggest changes are Turbopack as the default bundler, fully async request APIs and proxy replacing middleware.
This guide covers the 15 to 16 and 14 to 16 paths, the security releases that make staying put risky, and the testing and rollback around the codemod. Checked against nextjs.org, GitHub and nodejs.org in November 2026.
Where each Next.js version stands
Vercel’s support policy keeps one major version in Active LTS and the previous one in Maintenance LTS. Our post on Next.js versions and the support policy has the full history.
| Version | Status (as at November 2026) | What you get |
|---|---|---|
| Next.js 16 | Active LTS | Features, bug fixes and security patches |
| Next.js 15 | Maintenance LTS | Critical fixes and essential security updates, with security releases through 31 January 2027 |
| Next.js 14 and older | Unsupported | No scheduled fixes |
The latest 16 minor is 16.4, released on 6 October 2026, and 16.4.6 was the newest patch on npm when we checked. Node.js 20 reached end of life on 30 April 2026 per nodejs.org, yet Next.js 16 still lists 20.9 as its minimum. Move to Node.js 22 or 24 (both LTS) alongside the framework. Our framework upgrades work treats the two as one project.
The security releases are the reason to move now
If you searched for Next.js 16 vulnerabilities, the short version is this: each security release patches only the newest 16 minor and, for some issues, 15.5, so you need to keep moving to the latest 16.x patch. Vercel moved to a scheduled monthly security release in July 2026, with ad hoc patches for urgent issues. Here is what shipped in the last year, from the official posts.
| Date | What | Fixed in |
|---|---|---|
| 3 Dec 2025 | React2Shell, CVE-2025-66478: critical remote code execution in the React Server Components protocol, App Router apps on 15.x and 16.x | 16.0.7 and 15.x patches |
| 11 Dec 2025 | Denial of service (CVE-2025-55184, completed under CVE-2025-67779) and source code exposure (CVE-2025-55183) | 16.0.10, 15.5.9, 14.2.35 |
| 25 Aug 2026 | Two critical remote code execution issues: Image Optimization with AVIF files (GHSA-2xp9-vwfh-vxw4) and Windows-hosted servers (CVE-2026-75604) | 16.3.3, 15.5.24 |
| 22 Sep 2026 | Critical remote code execution in next/og ImageResponse (CVE-2026-94545) |
16.3.6 |
| 30 Sep 2026 | Scheduled release: one high (Image Optimization SSRF, CVE-2026-94483) and several medium and low issues | 16.3.8, 15.5.27 |
| 14 Oct 2026 | Out-of-band update: critical RCE in use cache functions returning typed arrays (GHSA-673q-mjm6-r5xr), critical RCE in Image Optimization with SVG files (CVE-2026-96889) and a high-severity Server Actions denial of service (GHSA-p3m5-59mp-jv5r) |
16.4.1, with 15.5.28 for the last two |
| 3 Nov 2026 | Scheduled release: one high and several medium issues, mostly around use cache, self-hosted response handling, Edge cookies and SVG handling |
16.4.5, with 15.5.29 for some |
Three points from those posts matter for planning:
- Patches go to the newest minor. The last 16.3 patch was 16.3.8 on 30 September. The October and November releases list only 16.4.x and 15.5.x, and most of the November
use cachefixes are in 16.4.5 only. Move to 16.4.5 or later. - Some issues need specific features. The
use cachefixes affect apps with Cache Components enabled. Read each advisory against your setup. - Next.js 14 does not get the new fixes. The December 2025 post patched 14.2.35, but the 2026 advisories list only 16.x and 15.5.
For exact patched versions, use Vercel’s posts and the GitHub advisories as the source of truth.
What breaks from 15 to 16
The official version 16 upgrade guide lists the changes. These are the ones that tend to hit real applications, with the fix for each.
| Change | What to do |
|---|---|
Synchronous params, searchParams, cookies(), headers() and draftMode() are removed (15 allowed them temporarily) |
await them, or run npx @next/codemod@canary next-async-request-api . |
middleware is deprecated in favour of proxy, which runs on Node.js only |
Rename middleware.ts to proxy.ts and the exported function to proxy. Keep middleware if you need Edge |
Turbopack is the default for next dev and next build |
Drop --turbopack from scripts. A custom webpack config makes next build fail until you pick a route |
next lint is removed and next build no longer lints |
Run ESLint or Biome directly. Codemod: npx @next/codemod@canary next-lint-to-eslint-cli . |
revalidateTag(tag) with one argument is deprecated |
Pass a profile such as revalidateTag('posts', 'max'), or use updateTag in Server Actions |
serverRuntimeConfig and publicRuntimeConfig are removed |
Use environment variables, with NEXT_PUBLIC_ for client values |
Parallel route slots need an explicit default.js |
Add one that calls notFound() or returns null, or the build fails |
| AMP support is removed | Remove useAmp and amp config |
experimental.ppr and experimental_ppr are removed |
Stay on your current 15 canary if you rely on PPR, or read the Cache Components migration guide |
experimental.turbopack moved to top-level turbopack |
The upgrade codemod updates next.config |
Image changes
next/image has five changed defaults, and each can quietly alter output.
images.minimumCacheTTLgoes from 60 seconds to 4 hours. Images behind a CDN may now refresh less often than editors expect.images.qualitiesgoes from every value to[75]. Aqualityprop outside the list is coerced to the nearest allowed value, and direct/_next/imagerequests with otherqvalues return 400.16is removed from the defaultimages.imageSizes.- Local images with query strings need
images.localPatternswith asearchvalue. images.maximumRedirectsgoes from unlimited to 3, and optimising images that resolve to local IPs is blocked unlessimages.dangerouslyAllowLocalIPis set. Only enable that on a private network.
images.domains and next/legacy/image are deprecated, so move to remotePatterns and next/image while you are in there.
Smaller changes that bite
- Smooth scrolling. Next.js no longer overrides
scroll-behavior: smoothduring navigation. Adddata-scroll-behavior="smooth"to<html>to restore the old behaviour. - Build output.
sizeandFirst Load JScolumns are gone fromnext build, so scripts parsing them break. next devoutput directory. Dev now writes to.next/dev. Check Docker, CI cache paths and.gitignorerules.
Moving from 14 to 16
Next.js 14 is unsupported. We take 15 first, then 16, because each guide assumes the one before.
What the 14 to 15 step changes, per the version 15 guide:
- React 19 is the minimum for
reactandreact-dom. Update@types/reactand@types/react-domtoo. Peer dependency conflicts from older UI libraries are the usual snag. - Async request APIs arrived.
params,searchParams,cookies(),headers()anddraftMode()became promises, with temporary synchronous access and a dev warning. - Caching defaults flipped.
fetchrequests,GETroute handlers and page segments in the client router cache are no longer cached by default. - Smaller items.
@next/fontis removed fornext/font,experimental-edgeerrors,NextRequestlosesgeoandip, andserverComponentsExternalPackagesbecomesserverExternalPackages.
The caching flip changes production behaviour without a build error: pages can issue more database and API calls per request. Watch cost and latency before 16 goes live. A direct jump from 14 to 16 is reasonable only for a small app with good tests and few dependencies, and even then you should read both guides.
The order we upgrade in
| Step | Task | Done when |
|---|---|---|
| 1 | Record versions: Next.js, React, Node.js, TypeScript, package manager, hosting, Docker base image | One page everyone agrees on |
| 2 | Move Node.js to 22 or 24 on a branch and run the current tests | Green on the new runtime |
| 3 | Run npx @next/codemod@canary upgrade latest on a clean branch |
Diff reviewed, not merged blind |
| 4 | Run the async request API codemod and resolve any UnsafeUnwrapped casts and codemod error comments |
No synchronous access remains |
| 5 | Decide on webpack or Turbopack: migrate loaders and plugins, or build with --webpack |
next build passes |
| 6 | Fix images, proxy, lint scripts and config removals | Checklist above clear |
| 7 | Check caching: revalidateTag calls, fetch defaults, route handlers |
Pages revalidate when expected |
| 8 | Deploy to staging with production-like data and Node version | Smoke tests pass |
| 9 | Release at a quiet time with the previous build ready | Logs clean after release |
The codemod updates the turbopack config location, migrates next lint and middleware, and drops unstable_ prefixes. It does not run every migration, which is why step 4 is separate. Review its diff like any contribution.
Vercel also documents npx next@canary upgrade --agent=latest. Treat its output as a draft: a green build does not prove checkout or login still works.
Testing and deployment checklist
- Every route that reads
params,searchParams, cookies or headers has been loaded in a browser. - Authentication, redirects and anything in
middlewareorproxybehave the same, including matcher paths. - Images render at the right sizes, and no
/_next/imagerequests return 400. - A cache test: change content, call the revalidation path, and confirm the page updates within the time you expect.
- CI no longer calls
next lint, and any script reading old build output is fixed. - Error monitoring is on, with alerts for the first 48 hours.
Rollback
Keep the last working build deployable for a few days: tag the previous container image, or keep the prior serverless deployment promotable. Rollback is simple only if nothing irreversible shipped with it, so keep database migrations out of the framework release, and clear any CDN cache holding pages built under the new defaults.
Self-hosting notes
If you run next start yourself, update the Node.js base image first (Node.js 18 is unsupported and 20 is end of life), review your HTTP/1.1 reverse proxy against the November response-framing advisory, and remember proxy does not run on Edge. The October image advisory names sharp 0.35.5 or later as a workaround, and upgrading Next.js makes package managers supply a fixed version.
Should you adopt Cache Components now?
No, not as part of the upgrade. Cache Components (cacheComponents: true) and 'use cache' are optional in 16, and the official guide says not to enable them just to complete the migration. Vercel’s 16.4 post recommends Cache Components for every app and says it will become the default in Next.js 17. Upgrade first, then adopt in separate work. Several 2026 advisories involve use cache, so test it properly.
When to get help
A small, tested app on 15 can move to 16 as routine maintenance. An app on 13 or 14 with abandoned packages, no tests and webpack plugins is a project, and the code around the framework is the real cost. We build with Next.js and TypeScript ourselves: Booka, our venue management software, is a Next.js and TypeScript application over Postgres, and our Next.js development work covers builds as well as upgrades.
Our Next.js development agency team can audit what you run and tell you which it is, and our framework upgrades service can do the whole job. If nobody on your side understands the codebase any more, project rescue is the first step. For the PHP side, read our Laravel upgrade guide, and for whether the app should be Next.js at all, see when headless is worth it.
Sources: Next.js 16 upgrade guide, Next.js 15 upgrade guide, Next.js 16 release post, Next.js 16.4, Next.js support policy, security release program, CVE-2025-66478, December 2025 security update, 14 October 2026 security update, September 2026 security release, November 2026 security release, Next.js GitHub security advisories and Node.js releases, checked November 2026.
Common questions
How do I upgrade from Next.js 15 to 16?
Run the upgrade codemod from your project folder with npx @next/codemod@canary upgrade latest, then run the async request API codemod if any synchronous params, cookies() or headers() calls remain. Next.js 16 needs Node.js 20.9 or later and TypeScript 5.1 or later. Work through the breaking changes, run your tests and deploy to staging first.
Can I go straight from Next.js 14 to 16?
You can, but we step through 15 first. Next.js 15 introduced React 19 as the minimum, async request APIs and the end of default fetch caching. Next.js 16 then removed the temporary synchronous access. Landing on 15 with green tests means each failure points at one set of changes. Next.js 14 is unsupported, so the whole path matters.
Is Next.js 15 still supported?
Yes, for now. Next.js 15 is in Maintenance LTS, which gets critical bug fixes and essential security updates only. Vercel's support policy says security releases for 15 continue through 31 January 2027, later than the original end date of 21 October 2026. Next.js 14 and older are unsupported, so security fixes are not published for them.
Do I need to rename middleware to proxy?
Eventually, yes, but only if you do not need the Edge runtime. Next.js 16 deprecates the middleware filename in favour of proxy, which runs on the Node.js runtime and cannot use Edge. The upgrade codemod migrates the convention. If your middleware relies on Edge, keep it as middleware for now and plan the change separately.