npm / next
next
What changed in next 15 to 16, from its official release notes, upgrade guides and advisories. Sources checked 2026-12-05.
89 breaking52 security5 deprecations29 new APIs and options4 performance16 behavior and defaults17 tooling5 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initnext 16184 changes
Breaking changes 71
The inert experimental.viewTransition flag was removed.
Server Action submissions from privacy-sensitive contexts are disallowed by default.
Built-in AMP support and its codemod are removed.
The amp configuration and page-level AMP configuration are removed.
next build no longer runs linting automatically.
Supported browser minimums are Chrome 111, Edge 111, Firefox 111, and Safari 16.4.
Top-level option for migrating active dynamicIO or useCache usage to the Cache Components model.
PPR is enabled through the cacheComponents configuration instead of the experimental PPR flag.
Enables Cache Components, making caching opt-in and supporting Partial Pre-Rendering.
Synchronous access is removed; cookies can only be accessed asynchronously in Next.js 16.
Next.js no longer overrides smooth scrolling during navigation by default; this attribute restores the previous override behavior.
All parallel route slots now require an explicit default.js file or builds fail; it can call notFound() or return null.
The appIsrStatus, buildActivity, and buildActivityPosition options have been removed; the indicator remains.
The appIsrStatus option was removed; the development indicator itself remains available.
The buildActivity option was removed; the development indicator itself remains available.
The buildActivityPosition option was removed; the development indicator itself remains available.
Synchronous access is removed; draftMode can only be accessed asynchronously in Next.js 16.
The dynamicIO flag is removed.
proxy runs on the Node.js runtime and cannot be configured to use the Edge runtime.
eslint-config-next version 16 requires ESLint 9 or later, while existing configurations may retain a compatible ESLint version.
The eslint option in the Next.js config file is removed.
The deprecated route-level experimental_ppr configuration is removed.
The experimental Partial Prerendering flag and route-level segment option are removed.
The route-level PPR export has been removed in favor of the Cache Components programming model.
Removed and renamed to cacheComponents.
The PPR flag and configuration options have been removed in favor of the Cache Components programming model.
The configuration location was removed; move the configuration to top-level turbopack.
Removed; migrate active usage to the top-level cacheComponents option or remove the flag.
The First Load JS metric is removed from next build output because it was inaccurate for server-driven architectures.
Synchronous access is removed; headers can only be accessed asynchronously in Next.js 16.
Image-generating functions receive id as a Promise when using generateImageMetadata.
Local IP image optimization is blocked by default and can be enabled only for private networks.
The 16-pixel value is removed from the default imageSizes array, reducing the shipped srcset size.
Local image sources with query strings require images.localPatterns configuration.
The default maximum image redirects changes from unlimited to 3.
The default minimum image cache TTL increases from 60 seconds to 4 hours, reducing revalidation cost.
The default image qualities value changes from allowing all qualities to only [75].
The default changed from [1..100] to [75], and the quality prop is coerced to the closest configured value.
A lockfile prevents multiple next dev or next build instances from running on the same project.
Proxy only supports the Node.js runtime.
The next/amp hook imports and useAmp usage are removed.
The next build output no longer includes the size and First Load JS metrics because they were inaccurate for server-driven architectures.
Flat config becomes the default ESLint configuration format.
Local src values with query strings now require images.localPatterns configuration to prevent enumeration attacks.
The next lint command is removed; use Biome or ESLint directly.
Removed; replace next lint scripts with ESLint CLI commands.
next/root-params replaces the removed unstable_rootParams function.
Next.js 16 requires Node.js 20.9.0 or newer; Node.js 18 is unsupported.
Route params become Promises.
Image-generating functions receive params as a Promise and must await it.
Synchronous params access is removed in layouts, pages, routes, defaults, and metadata image conventions.
During next dev, process.argv no longer includes dev when loaded from the Next config file.
Replaces middleware.ts for request interception and runs on the Node.js runtime; rename the exported function to proxy.
The middleware function should be renamed to proxy, including named exports.
Removed; use NEXT_PUBLIC_ environment variables for client-accessible configuration instead.
An image quality value absent from images.qualities is coerced to the closest configured value.
revalidateTag now requires a cacheLife profile; the single-argument form is deprecated and causes a TypeScript error.
Turbopack fully supports importing Sass files from node_modules, but does not support the legacy tilde prefix.
Next.js no longer overrides scroll-behavior during navigation by default; the previous behavior is opt-in.
Route searchParams become Promises.
serverRuntimeConfig is removed; server-only values should use environment variables instead.
The sitemap generating function receives id as a promise and must await it.
The size metric is removed from next build output because it was inaccurate for server-driven architectures.
The middleware URL normalization flag is renamed to skipProxyUrlNormalize.
Deprecated synchronous access to Dynamic APIs is removed.
Turbopack configuration moves from experimental.turbopack to a top-level nextConfig option.
The minimum supported TypeScript version is increased to 5.1.0.
The unstable_rootParams function has been removed; use next/root-params instead.
Removed; an alternative API is planned for an upcoming minor release.
The useAmp API is removed as part of AMP support removal.
next build fails when it detects a custom webpack configuration while Turbopack is the default.
Security 52
Fixes cache poisoning of shared fallback shells through request-supplied placeholder route parameters.
Fixes cross-client response injection and disclosure in self-hosted applications forwarding fetched responses.
Fixes HttpOnly cookie exposure through an internal response header on Edge runtime routes.
Fixes an SVG rejection bypass in Next.js image optimization.
Fixes cross-tenant sensitive information disclosure when use cache is called through unstable_cache.
Fixes cross-user cache disclosure and poisoning involving binary arguments.
Security fixes prevent cache leaks across root parameter values in nested use cache functions.
Security fixes address unauthenticated remote code execution when SVG files are used with the Image Optimization API.
Fixes a denial-of-service vulnerability in the App Router when using Server Actions.
Security fix for unauthenticated remote code execution in functions returning typed arrays.
Security fix prevents information disclosure through App Router metadata image routes when dynamicParams is bypassed.
Security fixes address a server-side request forgery vulnerability in image optimization.
Security fix prevents cache poisoning of ISR pages in self-hosted Next.js applications.
Security fixes address information disclosure in the Next.js development server's Model Context Protocol endpoint.
Security fix prevents cross-user content substitution and persistent denial of service from cache poisoning during SSG/ISR rendering.
Security fixes prevent pending use cache fills from leaking Draft Mode content into regular responses and persisted pages.
Fixed a remote code execution vulnerability in next/og ImageResponse.
Security fixes address unauthenticated remote code execution when AVIF files are used.
Security fixes address unauthenticated remote code execution on Windows-hosted servers.
Fixes unbounded Server Action payloads in the Edge runtime.
Fixes a denial-of-service vulnerability in the Image Optimization API when processing SVGs.
Fixes a Middleware / Proxy bypass affecting App Router applications using Turbopack and a single locale.
Fixes cache confusion of response bodies for requests with bodies.
Fixes cache confusion for request bodies containing invalid UTF-8 byte sequences.
Fixes server-side request forgery through rewrites with attacker-controlled destination hostnames.
Fixes server-side request forgery in Server Actions on custom servers.
Fixes unauthenticated disclosure of internal Server Function endpoints.
An incomplete prior fix for App Router middleware or proxy bypass through segment-prefetch routes was addressed.
Fixes a moderate cross-site scripting vulnerability when beforeInteractive scripts use untrusted input.
Fixes a high-severity denial-of-service vulnerability caused by connection exhaustion.
Fixes a moderate cross-site scripting vulnerability in App Router applications using CSP nonces.
Fixes a moderate denial-of-service vulnerability in the Image Optimization API.
Fixes a high-severity bypass affecting App Router applications through segment-prefetch routes.
Fixes low-severity cache poisoning affecting Middleware / Proxy redirects.
Fixes a high-severity bypass through dynamic route parameter injection.
Fixes a high-severity bypass in Pages Router applications using i18n.
Fixes low-severity cache poisoning caused by collisions in React Server Component cache-busting.
Fixes moderate cache poisoning affecting React Server Component responses.
Fixes a high-severity denial-of-service vulnerability affecting Server Components.
Fixes a high-severity server-side request forgery vulnerability in applications using WebSocket upgrades.
Patched a high-severity vulnerability where specially crafted requests to Server Function endpoints could trigger excessive CPU usage and denial of service.
Cross-site development-only WebSocket connections from privacy-sensitive origins can now be blocked.
Adds images.maximumDiskCacheSize to control the next/image LRU disk cache size.
Patched http-proxy to prevent request smuggling in rewrites.
The maxPostponedStateSize limit is now always respected.
Next.js HTTP request deserialization can lead to DoS when using insecure React Server Components
Minimal-mode PPR resume handling now prevents unbounded request buffering or decompression from exhausting memory.
The Image Optimizer now prevents unrestricted memory use when optimizing external images, avoiding denial-of-service conditions.
Next has a Denial of Service with Server Components - Incomplete Fix Follow-Up
The hardened React Server Components implementation fixes a critical remote-code-execution vulnerability; upgrading to 16.0.7 is required.
The images.domains configuration is deprecated and warns; image remote patterns are preferred.
Remote image hosts should be configured with remotePatterns for improved security.
Deprecations 4
Middleware is deprecated and developers are directed to use Proxy.
The named middleware export is deprecated and should be renamed to proxy.
Use of the legacy image component emits a deprecation warning.
The single-argument form is deprecated; use a profile for SWR or updateTag in Server Actions for read-your-writes semantics.
New APIs and options 23
React 19.2 adds Activity for hiding background UI while preserving state and cleaning up effects.
The alpha Build Adapters API lets custom adapters hook into builds to modify Next.js configuration or process build output.
Call before reading process.env when environment variables must be evaluated at runtime rather than bundled during build.
Adding data-scroll-behavior="smooth" restores the previous scroll override during navigation.
Turbopack adds the debugIds configuration option.
The native TypeScript resolver for Next.js configuration requires an explicit experimental flag.
The alpha Build Adapters API adds experimental.adapterPath for custom build-process adapters.
The next/cache module adds a refresh API.
The recommended named export for the renamed routing file is proxy.
Proxy replaces the deprecated Middleware file convention, with a codemod available for migration.
The renamed proxy.ts file is the recommended replacement for middleware.ts.
The App Router uses React 19.2 features including View Transitions, useEffectEvent, and Activity.
Next.js adds a configuration option for enabling React Compiler integration, which is stable.
Allows refreshing the client router from within a Server Action after performing an action.
Generated globally available RouteContext types help migrate route handlers to async params with type safety.
Turbopack provides resolveAlias for mapping imports such as browser requests for Node.js modules.
Turbopack provides resolveAlias for browser-side aliases such as mapping Node.js modules to empty modules.
Enables beta filesystem caching in development to retain compiler artifacts between runs and speed up compile times.
updateTag provides Server Actions with read-your-writes cache expiration and immediate refresh semantics.
Caches pages, components, and functions, with the compiler automatically generating cache keys.
React 19.2 adds useEffectEvent for extracting non-reactive effect logic into reusable Effect Event functions.
React 19.2 adds View Transitions for animating elements updated inside a transition or navigation.
The --webpack flag opts out of the default Turbopack build and uses Webpack.
Performance 4
Prefetching multiple URLs with a shared layout downloads the layout once.
Performance improvements were made to the next dev command.
Performance improvements were made to the next start command.
Routing now deduplicates shared layouts and incrementally prefetches uncached parts, cancelling or reprioritizing requests as links move in and out of view.
Behavior and default changes 15
The Turbopack build filesystem cache is enabled by default.
Turbopack automatically enables Babel when it finds a Babel config, instead of exiting with a hard error.
Cache Components becomes a stable top-level configuration option.
Turbopack filesystem caching is enabled by default for next build.
Turbopack filesystem caching is enabled by default for next dev.
Next.js prefetches only parts not already in cache instead of entire pages.
next build now uses Turbopack by default, replacing the previous default build behavior.
next dev now writes to a separate .next/dev output directory, enabling concurrent dev and build execution.
next dev now uses Turbopack by default, so the --turbopack or --turbo flag is no longer needed.
Enabling the React Compiler can increase development and build compile times because it relies on Babel.
Stable for development and production builds and now the default bundler for all new Next.js projects; webpack remains available with --webpack.
Turbopack configuration moves from experimental.turbopack to the top-level turbopack option.
Filesystem caching is enabled by default for next dev to preserve compiler artifacts between runs.
The unstable_ prefix is removed from the cacheLife API, while the unstable prefix remains accepted for compatibility.
The unstable_ prefix is removed from the cacheTag API, while the unstable prefix remains accepted for compatibility.
Tooling 13
The Turbopack tracing command uses next internal trace with the trace output path.
Enabling the React Compiler requires installing the React Compiler Babel plugin.
Redesigned with a simplified setup flow, updated project structure, and defaults including App Router, TypeScript, Tailwind CSS, and ESLint.
Now show Compile and Render timings to indicate where development request time is spent.
Generated globally available LayoutProps types help migrate to async params with type safety.
A migration codemod updates synchronous params, searchParams, cookies(), headers(), and draftMode() access to async APIs.
Displays webpack or Turbopack compilation duration when running next build.
The upgrade codemod updates Turbopack configuration, linting, middleware conventions, stabilized API names, and experimental PPR settings.
A lockfile prevents multiple next dev or next build instances from running on the same project.
Adds a Model Context Protocol integration that gives AI agents contextual insight for debugging Next.js applications.
The upgrade CLI prepares migration guides and codemod instructions for a coding agent.
Generated globally available PageProps types help migrate to async params and searchParams with type safety.
The Sass loader supports modern Sass syntax and new features.
Fixes and other changes 2
Coding agents can use version-matched Next.js documentation referenced from AGENTS.md during upgrades.
The documentation no longer states that updateTag preserves client refresh.
next 1533 changes
Breaking changes 18
Automatic Speed Insights instrumentation was removed; applications must add an explicit integration if they still need it.
The stable bundlePagesRouterDependencies option replaces experimental.bundlePagesExternals.
Page segments are no longer reused during Link or useRouter navigation, but remain reused for back-forward navigation and shared layouts.
cookies is now asynchronous and must be awaited for recommended usage.
draftMode is now asynchronous and must be awaited for recommended usage.
fetch requests are no longer cached by default; use cache: 'force-cache' to opt in.
The geo property was removed from NextRequest because hosting providers supply geolocation values.
GET functions in Route Handlers are no longer cached by default.
headers is now asynchronous and must be awaited for recommended usage.
The ip property was removed from NextRequest because hosting providers supply IP values.
The @next/font package was removed; imports must use the built-in next/font instead.
Font imports move from @next/font to the built-in next/font API.
params is now asynchronous in layouts, pages, route handlers, and related metadata files.
The minimum React DOM version is now 19.
The minimum React version is now 19.
The experimental-edge runtime value now errors; use edge instead.
useActionState replaces useFormState and provides direct access to pending state.
useFormState is deprecated and has been replaced by useActionState.
Deprecations 1
useFormState is deprecated in React 19 and will be removed in a future release.
New APIs and options 6
staleTimes opts page segments into client caching with dynamic and static durations.
fetchCache can opt all fetch requests in a layout or page into caching.
The upgrade codemod can retry with --skip-eslint-upgrade to preserve repaired ESLint dependencies.
The upgrade codemod can retry with --skip-react-upgrade to preserve repaired React dependencies.
useActionState replaces useFormState and provides additional properties such as direct access to pending state.
useFormStatus now exposes data, method, and action in React 19.
Behavior and default changes 1
The stable serverExternalPackages option replaces experimental.serverComponentsExternalPackages.
Tooling 4
Adds bun instructions for manually installing the latest Next.js, React, and ESLint config packages.
Adds bun instructions for upgrading to the latest Next.js version with the upgrade codemod.
Adds pnpm instructions for upgrading to the latest Next.js version with the upgrade codemod.
Adds yarn instructions for upgrading to the latest Next.js version with the upgrade codemod.
Fixes and other changes 3
Adds pnpm instructions for manually installing the latest Next.js, React, and ESLint config packages.
The Pages Router supports React 18 and React 19, making the React 19 upgrade optional for Pages Router applications.
Adds yarn instructions for manually installing the latest Next.js, React, and ESLint config packages.