Next.js Security Updates 2026: Every Advisory and the Patched Versions

Every 2026 Next.js security update in one place, newest first: the advisories, severity, affected versions and the patched next versions for 16.x and 15.x, plus how to check your version and stay patched.

Ask ChatGPTAsk Claude
Next.js security update cover showing the latest patched versions, next@16.4.5 Active LTS and next@15.5.29 Maintenance LTS, with 1 High and 6 Medium issues fixed
On this page
  1. How do I check my Next.js version and patch it?
  2. November 3, 2026: Next.js 16.4.5 and 15.5.29
  3. The High issue: cross-tenant cache disclosure
  4. The Medium issues in the cache layer
  5. The Medium issues outside the cache layer
  6. Am I affected by the November release?
  7. October 14, 2026: Next.js 16.4.1 and 15.5.28
  8. Who was exposed
  9. The sharp trap on Next.js 15
  10. Interim mitigations for the October advisories
  11. How to stay patched
  12. Common mistakes when patching Next.js

Next.js ships security fixes as patch releases on its two supported lines: 16.4.x (Active LTS) and 15.5.x (Maintenance LTS). This page tracks every Next.js security update in 2026, newest first, with the advisories, their severity, the affected versions and the version that fixes them. It is updated in place when a new release ships, so the top section is always the one to patch to.

Current patched versions: next@16.4.5 on 16.x and next@15.5.29 on 15.x (November 3, 2026). Both include every earlier fix on this page. On 15.x, also make sure sharp is 0.35.5 or later (see the October release below).

How do I check my Next.js version and patch it?#

Check what is actually installed, not what package.json allows:

bash
npm ls next sharp

pnpm why next and yarn why next do the same job. Compare the result with the newest release below. If you are behind, upgrade to the latest patch on your line:

npm install next@16.4.5   # 16.4 line (Active LTS)
npm install next@15.5.29  # 15.5 line (Maintenance LTS)
pnpm add next@16.4.5  # 16.4 line (Active LTS)
pnpm add next@15.5.29  # 15.5 line (Maintenance LTS)
yarn add next@16.4.5  # 16.4 line (Active LTS)
yarn add next@15.5.29  # 15.5 line (Maintenance LTS)
bun add next@16.4.5  # 16.4 line (Active LTS)
bun add next@15.5.29  # 15.5 line (Maintenance LTS)

Bump eslint-config-next to the same version, commit the lockfile, then rebuild and redeploy. If you self-host with Docker, rebuild the image without cache so the new version is installed, as in my Next.js Dockerfile guide, and check the version inside the running container.

The advisories list fixes for the 16.4 and 15.5 lines only. If you are on another version, check the linked GitHub advisories for your version, or move to a supported line. The version 16 upgrade guide covers the breaking changes if you are still on 15; patch 15.x first, because that is the smaller job.

November 3, 2026: Next.js 16.4.5 and 15.5.29#

Vercel released Next.js 16.4.5 (Active LTS) and Next.js 15.5.29 (Maintenance LTS) to fix seven security issues: one rated High and six rated Medium. Source: the official November 2026 security release.

SeverityIssueNeeds
HighCross-tenant cache disclosure with unstable_cache and use cache (GHSA-mfr8-8qww-v76h)Cache Components, a root parameter
MediumCross-root-parameter disclosure in nested use cache (GHSA-vc7v-qv4w-wrv8)Cache Components, nested use cache
MediumCache poisoning through binary use cache arguments (GHSA-rhh4-g77r-r9qj)use cache with binary arguments
MediumShared shell cache poisoning, self-hostednext start, Cache Components
MediumResponse injection via stale compressed framing (GHSA-pc58-hwjq-p385)Self-hosted, HTTP/1.1 proxy
MediumCookie exposure in x-middleware-set-cookie (GHSA-f3mh-rxg3-f5g2)Edge routes that set cookies
MediumSVG rejection bypass in Image Optimization (GHSA-7qx7-33qx-rqx2)Native image backend that decodes SVG

Patched versions: 16.4.5 and 15.5.29. The exact affected ranges for each issue are in the linked GitHub advisories.

Diagram grouping the seven Next.js November 2026 fixes by what must be true in your app: four in Cache Components and use cache including the one High issue, one for self-hosted apps behind an HTTP/1.1 proxy, one for Edge routes and one for Image Optimization

The High issue: cross-tenant cache disclosure#

If an app has Cache Components enabled and calls the same public use cache function both directly and from inside unstable_cache, content can leak across root-parameter values. The cached function must read a root parameter, such as a tenant identifier.

During a cold cache fill, a concurrent call through unstable_cache can receive another request's result without its root parameters being checked. That result can be stored and then served to later callers until the entry is revalidated or evicted. Where root parameters separate tenants, the result can contain another tenant's data.

The Medium issues in the cache layer#

  • Nested use cache. An outer cached function can be stored before the inner function's root-parameter dependencies are recorded, when the inner function returns an early value alongside a slower asynchronous one. Tenant-, site- or locale-specific content can then be served across the routing boundary.
  • Binary arguments. Distinct binary arguments passed to a use cache function can produce the same cache identity. If you use them to tell users or accounts apart, one caller can receive another's cached result.
  • Shared shell poisoning. Self-hosted apps running next start with Cache Components on and Partial Prefetching off or unset can have a shared page shell poisoned by an unauthenticated request, giving wrong content or persistent 404s. The affected route shape is narrow and described in the advisory.

The Medium issues outside the cache layer#

  • Compressed response framing. A self-hosted app that returns an attacker-controlled fetched Response unchanged can forward decompressed bytes with the original compressed framing headers. Behind an HTTP/1.1 reverse proxy that queues pipelined requests on a shared backend connection, responses can be assigned to the wrong clients. It does not apply to every proxy setup.
  • Edge cookie header. NextResponse.cookies.set() in Edge route handlers can expose the serialized cookie in x-middleware-set-cookie, which same-origin JavaScript can read even for HttpOnly cookies. It needs attacker-controlled script on your origin. Node.js route handlers and cookies().set() were not affected in the reproduced case.
  • SVG bypass. A crafted image from a permitted source can be misclassified as AVIF and slip past images.dangerouslyAllowSVG: false. Your image-source allowlist still applies, and the advisory says this alone does not demonstrate XSS or remote code execution.

Am I affected by the November release?#

  1. Do you use Cache Components? Look for cacheComponents in next.config and "use cache" directives. If neither exists, the four cache-layer issues do not apply to you.
  2. Do you mix unstable_cache and use cache? Search for unstable_cache( wrapping a function that is also marked use cache. This is the High-severity pattern.
  3. Do cached functions read root parameters or take binary arguments? Review those first after patching. My use cache guide explains how cache keys are built.
  4. Do you self-host? Check whether you run next start, which reverse proxy sits in front, and whether it speaks HTTP/1.1 to the backend.
  5. Do Edge routes set cookies? Search for NextResponse.cookies.set in routes with runtime = "edge".
  6. Do you serve SVG-adjacent images? Keep dangerouslyAllowSVG off and keep remotePatterns tight.

Patching fixes all of these regardless of the answers, so use the checklist to decide how urgent it is, not whether to upgrade.

October 14, 2026: Next.js 16.4.1 and 15.5.28#

This out-of-band release fixed three advisories: two critical unauthenticated remote code execution (RCE) bugs, one in use cache and one in SVG image optimization through sharp, and a high severity denial of service in Server Actions. It landed eight days after 16.4.0 shipped on October 6. Source: the official Next.js security update of October 14, 2026.

AdvisorySeverityWhat it isAffected next versionsFixed inWorkaround
GHSA-673q-mjm6-r5xrCritical, 9.5RCE in use cache functions that return multiple typed arrays16.0.0 to 16.4.016.4.1None
CVE-2026-96889 / GHSA-2464-fhr4-w9xwCritical, 9.5RCE in the Image Optimization API with SVG, via sharp's librsvg, on glibc Linux10.0.0 to 15.5.27, 16.0.0 to 16.4.015.5.28, 16.4.1sharp 0.35.5 or later
GHSA-p3m5-59mp-jv5rHigh, 8.2DoS: crafted requests cause excessive CPU in App Router apps with Server Actions13.0.0 to 15.5.27, 16.0.0 to 16.4.015.5.28, 16.4.1None

The scores are CVSS 4.0. The two React Server Components bugs also have upstream React advisories: GHSA-xqc2-xf4c-x3h3 for the typed-array RCE and GHSA-h3gv-c5rc-p453 for the DoS. Next.js ships its own compiled copy of react-server-dom-webpack and react-server-dom-turbopack inside node_modules/next/dist/compiled, so upgrading next is what fixes a Next.js app, not bumping react alone.

Decision chart: check the installed next version, then the three advisories with their affected versions, exposure conditions and workarounds, and the fix of next 16.4.1 or 15.5.28 with sharp 0.35.5

Who was exposed#

  • use cache RCE (GHSA-673q-mjm6-r5xr). Only Next.js 16 apps using the App Router with Cache Components, and the trigger is a use cache function that returns multiple typed arrays. The advisory still says to upgrade immediately even if your app has no such function. New apps from create-next-app 16.4 have Cache Components on by default.
  • SVG Image Optimization RCE (CVE-2026-96889). A memory bug in librsvg, which sharp uses to decode SVG, can lead to RCE when Next.js runs on glibc-based Linux. That covers most Debian and Ubuntu based Docker images and VPS installs. Next.js does not optimize SVG by default; apps that set images.dangerouslyAllowSVG: true are the clearest exposure, but the advisory is not limited to that setting.
  • Server Actions DoS (GHSA-p3m5-59mp-jv5r). Any App Router app with at least one Server Action, on Next.js 13 through 15.5.27 or 16.0.0 through 16.4.0. Pages Router apps and apps without Server Actions are not vulnerable.

The sharp trap on Next.js 15#

Next.js 16.4.1 raised its sharp requirement to ^0.35.5, so upgrading next on 16.x pulls the fixed sharp with it. Next.js 15.5.28 declares sharp as ^0.34.3 || ^0.35.5, so a lockfile that already resolved sharp 0.34.x still satisfies it and npm keeps it. Upgrading a real project from next@15.5.27 to 15.5.28 left sharp@0.34.5 in place, which is still vulnerable:

bash
$ npm install next@15.5.28
$ npm ls sharp
└─┬ next@15.5.28
  └── sharp@0.34.5        # still vulnerable

$ npm update sharp
$ npm ls sharp
└─┬ next@15.5.28
  └── sharp@0.35.5        # fixed

If sharp is a direct dependency, run npm install sharp@0.35.5 instead. To force one version across a monorepo, use overrides in npm (pnpm.overrides in pnpm, resolutions in Yarn):

json
{
  "overrides": {
    "sharp": "0.35.5"
  }
}

Interim mitigations for the October advisories#

Only the SVG bug has an interim mitigation; the use cache RCE and the Server Actions DoS have no workaround.

BugInterim stepSource
SVG / sharp RCEMake sure sharp is 0.35.5 or later, even without upgrading nextNext.js advisory
SVG / sharp RCEIn your own code that calls sharp, block SVG decoding with sharp.block({ operation: ['VipsForeignLoadSvg'] })sharp advisory
SVG / sharp RCETurn off images.dangerouslyAllowSVG if you do not need optimized SVGsImage docs
use cache RCENone. Upgrade.Next.js advisory
Server Actions DoSNone. Upgrade. Rate limits only reduce the blast radius.Next.js advisory

The sharp advisory adds a hardening note: whether the librsvg bug can reach code execution depends partly on the Node.js binary. It recommends a node built as a Position Independent Executable (PIE), notes that most Linux distribution packages already are, and warns that the official Node.js binaries are not.

The advisories publish no indicators of compromise. Signs worth checking are sustained 100% CPU with slow POST requests carrying a Next-Action header (DoS), unexpected /_next/image requests with .svg sources or crashes during image optimization (SVG RCE), and new files, child processes or outbound connections in the container (any RCE). If you find any of these, rotate secrets such as database URLs, API keys and NEXT_SERVER_ACTIONS_ENCRYPTION_KEY after patching.

How to stay patched#

Each release above was announced on the Next.js blog, and both came with an advance notice from the Next.js team, so the blog is the first place a fix shows up. The rest is making sure the upgrade reaches production quickly.

Let a bot open the upgrade PR. Dependabot or Renovate will open a pull request when a new next patch ships. Keep next and eslint-config-next in the same group so they move together. Do not rely on the audit feed alone: on October 17, 2026, npm audit on a fresh install of the unpatched next@16.4.0 reported 0 vulnerabilities, three days after two critical advisories were published.

bash
$ npm audit --json | jq .metadata.vulnerabilities
{ "info": 0, "low": 0, "moderate": 0, "high": 0, "critical": 0, "total": 0 }

Check the installed version directly. npm ls next sharp shows what the lockfile resolved. Compare it with the newest release on this page.

Upgrade with the latest patch for your line:

bash
npm install next@16.4.5   # 16.x
npm install next@15.5.29  # 15.x
npm update sharp          # 15.x: make sure sharp is 0.35.5+
npm ls next sharp

Turn on upgrade nudges. Next.js 16.4 added experimental.agentUpgrade, whose default 'security' policy reminds you during next dev and next build when an upgrade fixes a known vulnerability in your installed version (Next.js 16.4 notes).

Rebuild and verify what serves traffic. A self-hosted fix only counts once the running container has it. Commit package-lock.json, rebuild the image without cached layers, redeploy, then check inside the container:

Six-step patch flow for self-hosted Next.js: update deps, check the lockfile, commit it, rebuild the image, redeploy with Coolify or docker compose, and verify the versions inside the container

bash
docker compose build --no-cache && docker compose up -d
docker exec <container> node -e "console.log(require('/app/node_modules/next/package.json').version, require('/app/node_modules/sharp/package.json').version)"

That path assumes a standalone image with the app in /app; adjust it if your Dockerfile copies the app elsewhere. With the standalone output, next build copies sharp and its native libvips package into .next/standalone/node_modules, so an image built before a patch keeps the old sharp until you rebuild it. In Coolify, push the commit or click Redeploy, and force a deploy without cache for security patches; my self-host Next.js with Coolify guide covers the setup.

Stay on an LTS line. Security fixes land only on 16.4.x (Active LTS) and 15.5.x (Maintenance LTS).

Keep Server Actions small and authenticated. Auth and input validation limit what any future bug can reach; see Server Actions vs Route Handlers.

Common mistakes when patching Next.js#

MistakeWhat happensFix
Upgrading react instead of nextNext.js keeps its bundled RSC runtimeUpgrade next
Upgrading 15.x and stoppingsharp 0.34.x can stay in the lockfilenpm update sharp, confirm 0.35.5+
Trusting npm audit aloneIt reported 0 issues on unpatched 16.4.0Check versions with npm ls
Not committing the lockfileCI or Coolify rebuilds the old versionsCommit package-lock.json
Rebuilding from a cached layerOld node_modules layer is reusedBuild once with no cache
Checking only the laptopProduction still runs the old imagedocker exec into the running container

Related: running an MCP server next to your Next.js app? MCP security in 2026 covers the MCP SDK OAuth advisories and how to fix them.

Questions

Comments

Add to the discussion…

No comments yet. Questions, corrections and your own results are all welcome.

Be kind and stay on topic. No name needed: leave it blank and you post under an anonymous name that stays yours. Links get nofollow; spam is removed. Your email is never shown and is only used for reply notifications you ask for. Privacy