Next.js Security Advisories, CVEs & Patched Versions
Historical vulnerability disclosures, CVSS severity ratings, affected version ranges, and verified patch releases for Next.js.
CVE-2026-119347: Next.js: SVG rejection bypass in the image optimization
CVE-2026-119348: Next.js: Cross-client response injection and disclosure in self-hosted Next.js applications forwarding fetched responses
CVE-2026-119349: Next.js: Cross-user cache disclosure and poisoning in Next.js use cache with binary arguments
CVE-2026-119350: Next.js: Cache poisoning of shared fallback shells in Cache Components via request-supplied placeholder route params
CVE-2026-119351: Next.js: Cache leak across root param values in nested 'use cache' functions via delayed inner stream metadata
CVE-2026-119790: Next.js: Information disclosure across root params when a 'use cache' function is called through unstable_cache()
Next.js: HttpOnly cookie exposure through internal response header on Next.js Edge runtime routes
Next.js applications that set cookies through `NextResponse` on Edge runtime routes - App Router route handlers and Pages Router Edge API routes - send an internal `x-middleware-set-cookie` header in the public response, duplicating the cookie value and its attributes. This ma...
15.0.0 -> 15.5.29, 16.0.0 -> 16.4.5
Next.js: SVG rejection bypass in the image optimization
On self-hosted deployments, the Next.js image optimizer (`/_next/image`) can be made to process an attacker-supplied SVG even when SVG support is disabled with `dangerouslyAllowSVG: false` (the default). This reaches an SVG parser the application intended to keep disabled, inc...
15.0.0 -> 15.5.29, 16.0.0 -> 16.4.5
Next.js: Cross-client response injection and disclosure in self-hosted Next.js applications forwarding fetched responses
Self-hosted Next.js applications (App Router route handlers and the fetch cache) that return a fetched upstream response unchanged can emit a response whose declared framing does not match the body actually sent. When such an application sits behind an HTTP/1.1 reverse proxy t...
16.0.0 -> 16.4.5, 0 -> 15.5.29
Next.js: Cross-user cache disclosure and poisoning in Next.js use cache with binary arguments
Next.js App Router applications that pass binary arguments (such as Uint8Array or Blob values) to functions using the `use cache` directive can produce identical cache keys for distinct arguments, allowing cached results to be shared across users - cross-user disclosure of cac...
16.0.0 -> 16.4.5
Next.js: Cache poisoning of shared fallback shells in Cache Components via request-supplied placeholder route params
Self-hosted Next.js applications served with `next start` and built with `cacheComponents: true` but without Partial Prefetching accept a request-supplied route param value as a prerender placeholder. One unauthenticated GET request can poison the fallback shell cache entry th...
16.4.0 -> 16.4.5
Next.js: Cache leak across root param values in nested 'use cache' functions via delayed inner stream metadata
With Cache Components enabled, an outer `'use cache'` function can be keyed incorrectly even when its inner `'use cache'` call generates a fresh entry. If the inner function reads a root param (via `next/root-params`) and returns a value that still contains pending promises - ...
16.2.0 -> 16.4.5
Next.js: Information disclosure across root params when a 'use cache' function is called through unstable_cache()
Next.js applications with `'use cache'` can disclose cached data across root params when the same `'use cache'` function is called both directly during rendering and through `unstable_cache()`, and that function reads a root param. Root params are route parameters of the root ...
16.3.0 -> 16.4.5
Next.js: Unauthenticated Remote Code Execution in `use cache` functions returning typed arrays
## Impact A vulnerability in applications using App router with Cache Component can lead to remote code execution. The application needs to have a `use cache` function that returns multiple typed arrays. ## Workaround There is no known workaround for affected applications w...
16.0.0 -> 16.4.1
next.js cache leak across root param values in nested 'use cache' functions
### Impact With Cache Components enabled (`cacheComponents: true`), a `'use cache'` function that calls another `'use cache'` function that reads a root param can be keyed incorrectly when the inner call is served from an existing entry: the enclosing function's cache key the...
16.3.0 -> 16.3.8
Next.js: Unauthenticated Remote Code Execution in Image Optimization API when SVG files are used
## Impact A memory-related vulnerability has been discovered in an upstream library used for Image Optimization can lead to possible remote code execution (RCE) when Next.js runs on glibc-based Linux. ## Workaround Ensure the version of `sharp` used by Next.js is greater th...
10.0.0 -> 15.5.28, 16.0.0 -> 16.4.1
Next.js: Denial of Service in App Router using Server Actions
## Impact Crafted requests targeting Next.js applications using App Router with at least one Server Action can lead to excessive CPU usage blocking processing of further requests in the same process. ## Workarounds No workaround exists besides upgrading. Applications using ...
13.0.0 -> 15.5.28, 16.0.0 -> 16.4.1
Next.js: Pending `use cache` fill can leak Draft Mode content into regular responses and persisted pages
Pending `use cache` fills are shared across requests for the same key without distinguishing Draft Mode requests from regular requests. When two such requests overlap, the second request receives the first request's fill: - A regular request that overlaps an editor's Draft Mo...
16.3.0 -> 16.3.8
Next.js has cache poisoning of SSG and ISR pages in self-hosted applications
Self-hosted Next.js applications that use the Pages Router with statically generated (SSG) or incrementally regenerated (ISR) pages can have a page's cache entry replaced with content from a different route, causing the affected page to serve wrong content to every visitor unt...
15.0.0 -> 15.5.27, 16.0.0 -> 16.3.8
Next.js has information disclosure in development server's Model Context Protocol endpoint
The Next.js development server (`next dev`) exposes a Model Context Protocol endpoint that does not verify which website a request originates from, allowing a malicious website visited by the developer to read sensitive development data - including the project's location on di...
16.0.0 -> 16.3.8
Next.js has information disclosure in App Router metadata image routes via dynamicParams bypass
In Next.js App Router applications built with webpack, metadata image routes such as opengraph-image and twitter-image ignore the `dynamicParams` route segment option. An attacker can request metadata image URLs for dynamic segments that were deliberately excluded from `genera...
16.0.0 -> 16.3.8
Next.js has cache poisoning in SSG/ISR rendering that leads to cross-user content substitution and persistent denial of service
Next.js applications that use a root-level catch-all page together with statically generated or Incremental Static Regeneration routes can have their shared response cache poisoned by a single unauthenticated crafted request.
16.0.0 -> 16.3.8, 15.0.0 -> 15.5.27
Next.js has Server-Side Request Forgery in Image Optimization
## Impact An attacker-controlled, allow-listed remote URL can lead to server-side request forgery (e.g. to private IPs) during Image Optimization. ## Workaround Audit allow-listed remote URLs in `images.remotePatterns` (see https://nextjs.org/docs/app/getting-started/image...
16.0.0 -> 16.3.8
Next.js: Remote Code Execution in next/og ImageResponse
## Impact The Node.js `ImageResponse` implementation from `next/og` is affected by an upstream vulnerability. This can lead to remote code execution. Affected applications pass attacker-controlled values into SVG content, attributes, or styles during image generation: ```ts...
16.2.0 -> 16.3.6
Next.js: Unauthenticated Remote Code Execution in Image Optimization API when AVIF files are used
A vulnerability in the underlying `libheif` library used by `sharp` which Next.js uses for image optimization can lead to remote code execution when AVIF files are optimized. Until a fix has propagated, optimization of AVIF files is disabled.
10.0.0 -> 15.5.24, 16.0.0 -> 16.3.3
Next.js: Unauthenticated Remote Code Execution on windows-hosted servers
## Impact A vulnerability in applications using Pages and App router without Cache Component can lead to remote code execution when the server is hosted on machines using a Windows filesystem. ## Workaround There is no known workaround for affected windows-hosted applicatio...
13.4.0 -> 15.5.24, 16.0.0 -> 16.3.3
Security advisory CVE-2025-13465 patched in nextjs v16.3.0
Resolved in official release v16.3.0. Review release changelog for technical vulnerability and fix details.
< v16.3.0
Next.js: Server-Side Request Forgery in Server Actions on custom servers
## Impact When a Server Action forwards or redirects a request, an attacker can cause the server to send that outbound request to a malicious host (Server-Side Request Forgery). This requires the attacker's request to control Host-associated headers. In some configurations, i...
14.1.1 -> 15.5.21, 16.0.0 -> 16.2.11
Next.js: Cache confusion of response bodies for requests with bodies
## Impact A server-side `fetch` with a request body may return a cached **response** body from a different request to the same URL but different body. Confidential data in the `POST`'s **response** body would then leak to unauthorized requests. Though the request itself will ...
13.0.0 -> 15.5.21, 16.0.0 -> 16.2.11
Next.js: Cache confusion of response bodies for requests with bodies containing invalid UTF-8 byte sequences
## Impact A server-side `fetch` with a request body may return a cached **response** body from a different request to the same URL but different body. Confidential data in the `POST`'s **response** body would then leak to unauthorized requests. Though the request itself will ...
13.0.0 -> 15.5.21, 16.0.0 -> 16.2.11
Next.js: Unbounded Server Action payload in Edge runtime
## Impact Requests targeting Next.js applications using App Router with at least one Server Action can lead to excessive memory consumption if that Server Actions uses the Edge runtime ## Workarounds If you cannot upgrade, ensure your hosting provider limits the request's b...
13.0.0 -> 15.5.21, 16.0.0 -> 16.2.11
Next.js: Server-Side Request Forgery in rewrites via attacker-controlled destination hostname
## Impact A `rewrites()` or `redirects()` rule that builds its external destination hostname from request-controlled input can be pointed at an arbitrary hostname, regardless of the rule's hostname suffix. For a rewrite, Next.js proxies the request to that arbitrary host and ...
12.0.0 -> 15.5.21, 16.0.0 -> 16.2.11
Next.js: Denial of Service in the Image Optimization API using SVGs
### Impact When self-hosting Next.js with the default image loader, the Image Optimization API can optimize remotely hosted images if configured (not enabled by default). If those images contain malicious content, they can cause CPU exhaustion in `/_next/image` endpoints. -...
15.5.0 -> 15.5.21, 16.0.0 -> 16.2.11
Next.js: Unauthenticated disclosure of internal Server Function endpoints
## Impact In Next.js applications using App Router, Server Actions (`use server`) or `use cache` endpoints can be disclosed bypassing any authentication on the pages where these endpoints are usually used. Server Action IDs can be disclosed to unauthenticated users via publi...
13.0.0 -> 15.5.21, 16.0.0 -> 16.2.11
Next.js: Middleware / Proxy bypass in App Router applications using Turbopack and single locale
## Impact Crafted requests targeting Next.js applications using App Router built with Turbopack and a **single** entry in `config.i18n.locales` can bypass middleware/proxy based authentication. ## Workarounds If you cannot upgrade immediately, enforce authorization in the p...
16.0.0 -> 16.2.11
Next.js: Denial of Service in App Router using Server Actions
## Impact Crafted requests targeting Next.js applications using App Router with at least one Server Action can lead to excessive CPU usage blocking processing of further requests in the same process. ## Workarounds No workaround exists besides upgrading. Applications using ...
13.0.0 -> 15.5.21, 16.0.0 -> 16.2.11
Next.js has a Middleware / Proxy bypass in App Router applications via segment-prefetch routes - Incomplete Fix Follow-Up
### Impact It was found that the fix addressing [CVE-2026-44575](https://github.com/vercel/next.js/security/advisories/GHSA-267c-6grr-h53f) did not apply to `middleware.ts` with Turbopack. Refer to [CVE-2026-44575](https://github.com/vercel/next.js/security/advisories/GHSA-...
15.2.0 -> 15.5.18, 16.0.0 -> 16.2.6
Next.js's Middleware / Proxy redirects can be cache-poisoned
### Impact Next.js uses the `x-nextjs-data` request header for internal data requests. On affected versions, an external client could send this header on a normal request to a path handled by middleware that returns a redirect. When that happened, the middleware/proxy could ...
12.2.0 -> 15.5.16, 16.0.0 -> 16.2.5
Next.js vulnerable to cross-site scripting in App Router applications using CSP nonces
### Impact App Router applications that rely on CSP nonces can be vulnerable to stored cross-site scripting when deployed behind shared caches. In affected versions, malformed nonce values derived from request headers could be reflected into rendered HTML in an unsafe way, al...
13.4.0 -> 15.5.16, 16.0.0 -> 16.2.5
Next.js vulnerable to cache poisoning via collisions in React Server Component cache-busting
### Impact React Server Component responses can be vulnerable to cache poisoning in deployments that rely on shared caches with insufficient response partitioning. In affected conditions, collisions in the `_rsc` cache-busting value can allow an attacker to poison cache entri...
13.4.6 -> 15.5.16, 16.0.0 -> 16.2.5
Next.js has cross-site scripting in beforeInteractive scripts with untrusted input
### Impact Applications that use `beforeInteractive` scripts together with untrusted content can be vulnerable to cross-site scripting. In affected versions, serialized script content was not escaped safely before being embedded into the document, which could allow attacker-c...
13.0.0 -> 15.5.16, 16.0.0 -> 16.2.5
Next.js vulnerable to Denial of Service via connection exhaustion in applications using Cache Components
### Impact Applications using Partial Prerendering through the Cache Components feature can be vulnerable to connection exhaustion through crafted POST requests to a server action. In affected configurations, a malicious request can trigger a request-body handling deadlock th...
15.0.0 -> 15.5.16, 16.0.0 -> 16.2.5
Next.js has a Denial of Service in the Image Optimization API
### Impact When self-hosting Next.js with the default image loader, the Image Optimization API fetches local images entirely into memory without enforcing a maximum size limit. An attacker could cause out-of-memory conditions by requesting large local assets from the `/_next/...
10.0.0 -> 15.5.16, 16.0.0 -> 16.2.5
Next.js vulnerable to server-side request forgery in applications using WebSocket upgrades
### Impact Self-hosted applications using the built-in Node.js server can be vulnerable to server-side request forgery through crafted WebSocket upgrade requests. An attacker can cause the server to proxy requests to arbitrary internal or external destinations, which may expo...
13.4.13 -> 15.5.16, 16.0.0 -> 16.2.5
Next.js vulnerable to cache poisoning in React Server Component responses
### Impact Applications using React Server Components can be vulnerable to cache poisoning when shared caches do not correctly partition response variants. Under affected conditions, an attacker can cause an RSC response to be served from the original URL and poison shared ca...
14.2.0 -> 15.5.16, 16.0.0 -> 16.2.5
Next.js has a Middleware / Proxy bypass in App Router applications via segment-prefetch routes
### Impact App Router applications that rely on middleware or proxy-based checks for authorization can allow unauthorized access through transport-specific route variants used for segment prefetching. In affected configurations, specially crafted `.rsc` and segment-prefetch U...
15.2.0 -> 15.5.16, 16.0.0 -> 16.2.5
Next.js has a Middleware / Proxy bypass through dynamic route parameter injection
### Impact Applications that rely on middleware to protect dynamic routes can be vulnerable to authorization bypass. In affected deployments, specially crafted query parameters can alter the dynamic route value seen by the page while leaving the visible path unchanged, which ...
15.4.0 -> 15.5.16, 16.0.0 -> 16.2.5
Next.js has a Middleware / Proxy bypass in Pages Router applications using i18n
### Impact Applications using the Pages Router with `i18n` configured and middleware/proxy-based authorization can allow unauthorized access to protected page data through locale-less `/_next/data/<buildId>/<page>.json` requests. In affected configurations, middleware does no...
12.2.0 -> 15.5.16, 16.0.0 -> 16.2.5
Next.js Vulnerable to Denial of Service with Server Components
A vulnerability affects certain React Server Components packages for versions 19.x and frameworks that use the affected packages, including Next.js 13.x, 14.x, 15.x, and 16.x using the App Router. The issue is tracked upstream as [CVE-2026-23870](https://github.com/facebook/re...
13.0.0 -> 15.5.16, 16.0.0 -> 16.2.5
Next.js has a Denial of Service with Server Components
A vulnerability affects certain React Server Components packages for versions 19.x and frameworks that use the affected packages, including Next.js 13.x, 14.x, 15.x, and 16.x using the App Router. The issue is tracked upstream as [CVE-2026-23869](https://github.com/facebook/re...
13.0.0 -> 15.5.15, 16.0.0-beta.0 -> 16.2.3
Security advisory CVE-2026-23869 patched in nextjs v16.2.3
Resolved in official release v16.2.3. Review release changelog for technical vulnerability and fix details.
< v16.2.3
Next.js: HTTP request smuggling in rewrites
## Summary When Next.js rewrites proxy traffic to an external backend, a crafted `DELETE`/`OPTIONS` request using `Transfer-Encoding: chunked` could trigger request boundary disagreement between the proxy and backend. This could allow request smuggling through rewritten routes...
16.0.0-beta.0 -> 16.1.7, 9.5.0 -> 15.5.13
Next.js: Unbounded next/image disk cache growth can exhaust storage
## Summary The default Next.js image optimization disk cache (`/_next/image`) did not have a configurable upper bound, allowing unbounded cache growth. ## Impact An attacker could generate many unique image-optimization variants and exhaust disk space, causing denial of servi...
16.0.0-beta.0 -> 16.1.7, 10.0.0 -> 15.5.14
Next.js: Unbounded postponed resume buffering can lead to DoS
## Summary A request containing the `next-resume: 1` header (corresponding with a PPR resume request) would buffer request bodies without consistently enforcing `maxPostponedStateSize` in certain setups. The previous mitigation protected minimal-mode deployments, but equivalen...
16.0.1 -> 16.1.7
Next.js: null origin can bypass Server Actions CSRF checks
## Summary `origin: null` was treated as a "missing" origin during Server Action CSRF validation. As a result, requests from opaque contexts (such as sandboxed iframes) could bypass origin verification instead of being validated as cross-origin requests. ## Impact An attacker...
16.0.1 -> 16.1.7
Next.js: null origin can bypass dev HMR websocket CSRF checks
## Summary In `next dev`, cross-site protections for internal development endpoints could treat `Origin: null` as a bypass case even when [`allowedDevOrigins`](https://nextjs.org/docs/app/api-reference/config/next-config-js/allowedDevOrigins) is configured. This could allow pr...
16.0.1 -> 16.1.7
Next.js HTTP request deserialization can lead to DoS when using insecure React Server Components
A vulnerability affects certain React Server Components packages for versions 19.0.x, 19.1.x, and 19.2.x and frameworks that use the affected packages, including Next.js 13.x, 14.x, 15.x, and 16.x using the App Router. The issue is tracked upstream as [CVE-2026-23864](https://...
13.0.0 -> 15.0.8, 15.1.1-canary.0 -> 15.1.12, 15.2.0-canary.0 -> 15.2.9
Next.js has Unbounded Memory Consumption via PPR Resume Endpoint
A denial of service vulnerability exists in Next.js versions with Partial Prerendering (PPR) enabled when running in minimal mode. The PPR resume endpoint accepts unauthenticated POST requests with the `Next-Resume: 1` header and processes attacker-controlled postponed state d...
16.0.0-beta.0 -> 16.1.5, 15.0.0-canary.0 -> unfixed, 15.0.1-canary.0 -> unfixed
Next.js self-hosted applications vulnerable to DoS via Image Optimizer remotePatterns configuration
A DoS vulnerability exists in self-hosted Next.js applications that have `remotePatterns` configured for the Image Optimizer. The image optimization endpoint (`/_next/image`) loads external images entirely into memory without enforcing a maximum size limit, allowing an attacke...
10.0.0 -> 15.5.10, 15.6.0-canary.0 -> 16.1.5
Security advisory CVE-2026-23864 patched in nextjs v16.1.5
Resolved in official release v16.1.5. Review release changelog for technical vulnerability and fix details.
< v16.1.5
Next has a Denial of Service with Server Components - Incomplete Fix Follow-Up
It was discovered that the fix for [CVE-2025-55184](https://github.com/advisories/GHSA-2m3v-v2m8-q956) in React Server Components was incomplete and did not fully mitigate denial-of-service conditions across all payload types. As a result, certain crafted inputs could still t...
13.3.1-canary.0 -> 14.2.35, 15.0.6 -> 15.0.7, 15.1.10 -> 15.1.11
Next Server Actions Source Code Exposure
A vulnerability affects certain React packages for versions 19.0.0, 19.0.1, 19.1.0, 19.1.1, 19.1.2, 19.2.0, and 19.2.1 and frameworks that use the affected packages, including Next.js 15.x and 16.x using the App Router. The issue is tracked upstream as [CVE-2025-55183](https:/...
15.0.0-canary.0 -> 15.0.6, 15.1.1-canary.0 -> 15.1.10, 15.2.0-canary.0 -> 15.2.7
Next Vulnerable to Denial of Service with Server Components
A vulnerability affects certain React packages for versions 19.0.0, 19.0.1, 19.1.0, 19.1.1, 19.1.2, 19.2.0, and 19.2.1 and frameworks that use the affected packages, including Next.js 15.x and 16.x using the App Router. The issue is tracked upstream as [CVE-2025-55184](https:/...
13.3.0 -> 14.2.34, 15.0.0-canary.0 -> 15.0.6, 15.1.1-canary.0 -> 15.1.10
Next.js is vulnerable to RCE in React flight protocol
A vulnerability affects certain React packages<sup>1</sup> for versions 19.0.0, 19.1.0, 19.1.1, and 19.2.0 and frameworks that use the affected packages, including Next.js 15.x and 16.x using the App Router. The issue is tracked upstream as [CVE-2025-55182](https://www.cve.org...
14.3.0-canary.77 -> 15.0.5, 15.1.0-canary.0 -> 15.1.9, 15.2.0-canary.0 -> 15.2.6
Security advisory CVE-2025-66478 patched in nextjs v16.0.7
Resolved in official release v16.0.7. Review release changelog for technical vulnerability and fix details.
< v16.0.7
Next.js Affected by Cache Key Confusion for Image Optimization API Routes
A vulnerability in Next.js Image Optimization has been fixed in v15.4.5 and v14.2.31. When images returned from API routes vary based on request headers (such as `Cookie` or `Authorization`), these responses could be incorrectly cached and served to unauthorized users due to a...
0.9.9 -> 14.2.31, 15.0.0 -> 15.4.5