# 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.

By Waseem Anjum · Published 2026-11-17 · https://fabwaseem.com/blog/nextjs-security-updates

> **TL;DR:** Next.js shipped two security releases in autumn 2026. November 3: 16.4.5 and 15.5.29 fix seven issues (one High, six Medium), mostly in Cache Components and use cache. October 14: 16.4.1 and 15.5.28 fix two critical RCEs (use cache typed arrays, SVG via sharp) and a high-severity Server Actions DoS. Upgrade to 16.4.5 or 15.5.29, make sure sharp is 0.35.5+, rebuild and redeploy.

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:

```bash
npm install next@16.4.5   # 16.4 line (Active LTS)
npm install 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](https://fabwaseem.com/blog/nextjs-dockerfile), 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](https://nextjs.org/docs/app/guides/upgrading/version-16) 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](https://nextjs.org/blog/november-2026-security-release).

| Severity | Issue | Needs |
| --- | --- | --- |
| **High** | Cross-tenant cache disclosure with `unstable_cache` and `use cache` ([GHSA-mfr8-8qww-v76h](https://github.com/vercel/next.js/security/advisories/GHSA-mfr8-8qww-v76h)) | Cache Components, a root parameter |
| Medium | Cross-root-parameter disclosure in nested `use cache` ([GHSA-vc7v-qv4w-wrv8](https://github.com/vercel/next.js/security/advisories/GHSA-vc7v-qv4w-wrv8)) | Cache Components, nested `use cache` |
| Medium | Cache poisoning through binary `use cache` arguments ([GHSA-rhh4-g77r-r9qj](https://github.com/vercel/next.js/security/advisories/GHSA-rhh4-g77r-r9qj)) | `use cache` with binary arguments |
| Medium | Shared shell cache poisoning, self-hosted | `next start`, Cache Components |
| Medium | Response injection via stale compressed framing ([GHSA-pc58-hwjq-p385](https://github.com/vercel/next.js/security/advisories/GHSA-pc58-hwjq-p385)) | Self-hosted, HTTP/1.1 proxy |
| Medium | Cookie exposure in `x-middleware-set-cookie` ([GHSA-f3mh-rxg3-f5g2](https://github.com/vercel/next.js/security/advisories/GHSA-f3mh-rxg3-f5g2)) | Edge routes that set cookies |
| Medium | SVG rejection bypass in Image Optimization ([GHSA-7qx7-33qx-rqx2](https://github.com/vercel/next.js/security/advisories/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](https://res.cloudinary.com/wasicloudinary/image/upload/v1794197574/fabwaseem/projects/xcrgf8xl70ihhtehbg3l.jpg)

### 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](https://fabwaseem.com/blog/nextjs-use-cache) 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](https://nextjs.org/blog/nextjs-security-update-october-14-2026).

| Advisory | Severity | What it is | Affected `next` versions | Fixed in | Workaround |
| --- | --- | --- | --- | --- | --- |
| [GHSA-673q-mjm6-r5xr](https://github.com/vercel/next.js/security/advisories/GHSA-673q-mjm6-r5xr) | Critical, 9.5 | RCE in `use cache` functions that return multiple typed arrays | 16.0.0 to 16.4.0 | 16.4.1 | None |
| [CVE-2026-96889 / GHSA-2464-fhr4-w9xw](https://github.com/vercel/next.js/security/advisories/GHSA-2464-fhr4-w9xw) | Critical, 9.5 | RCE in the Image Optimization API with SVG, via `sharp`'s librsvg, on glibc Linux | 10.0.0 to 15.5.27, 16.0.0 to 16.4.0 | 15.5.28, 16.4.1 | `sharp` 0.35.5 or later |
| [GHSA-p3m5-59mp-jv5r](https://github.com/vercel/next.js/security/advisories/GHSA-p3m5-59mp-jv5r) | High, 8.2 | DoS: crafted requests cause excessive CPU in App Router apps with Server Actions | 13.0.0 to 15.5.27, 16.0.0 to 16.4.0 | 15.5.28, 16.4.1 | None |

The scores are CVSS 4.0. The two React Server Components bugs also have upstream React advisories: [GHSA-xqc2-xf4c-x3h3](https://github.com/facebook/react/security/advisories/GHSA-xqc2-xf4c-x3h3) for the typed-array RCE and [GHSA-h3gv-c5rc-p453](https://github.com/facebook/react/security/advisories/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](https://res.cloudinary.com/wasicloudinary/image/upload/v1792242673/fabwaseem/blog/nextjs-security-update-october-2026/diagram-affected.jpg)

### 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.

| Bug | Interim step | Source |
| --- | --- | --- |
| SVG / `sharp` RCE | Make sure `sharp` is 0.35.5 or later, even without upgrading `next` | [Next.js advisory](https://github.com/vercel/next.js/security/advisories/GHSA-2464-fhr4-w9xw) |
| SVG / `sharp` RCE | In your own code that calls `sharp`, block SVG decoding with `sharp.block({ operation: ['VipsForeignLoadSvg'] })` | [sharp advisory](https://github.com/lovell/sharp/security/advisories/GHSA-wq5f-xc86-pv6w) |
| SVG / `sharp` RCE | Turn off `images.dangerouslyAllowSVG` if you do not need optimized SVGs | [Image docs](https://nextjs.org/docs/app/api-reference/components/image) |
| `use cache` RCE | None. Upgrade. | Next.js advisory |
| Server Actions DoS | None. 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](https://nextjs.org/blog/next-16-4)).

**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](https://res.cloudinary.com/wasicloudinary/image/upload/v1792242674/fabwaseem/blog/nextjs-security-update-october-2026/diagram-patch-flow.jpg)

```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](https://fabwaseem.com/blog/self-host-nextjs-with-coolify) 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](https://fabwaseem.com/blog/server-actions-vs-route-handlers).

## Common mistakes when patching Next.js

| Mistake | What happens | Fix |
| --- | --- | --- |
| Upgrading `react` instead of `next` | Next.js keeps its bundled RSC runtime | Upgrade `next` |
| Upgrading 15.x and stopping | `sharp` 0.34.x can stay in the lockfile | `npm update sharp`, confirm 0.35.5+ |
| Trusting `npm audit` alone | It reported 0 issues on unpatched 16.4.0 | Check versions with `npm ls` |
| Not committing the lockfile | CI or Coolify rebuilds the old versions | Commit `package-lock.json` |
| Rebuilding from a cached layer | Old `node_modules` layer is reused | Build once with no cache |
| Checking only the laptop | Production still runs the old image | `docker exec` into the running container |

**Related:** running an MCP server next to your Next.js app? [MCP security in 2026](https://fabwaseem.com/blog/mcp-security) covers the MCP SDK OAuth advisories and how to fix them.

## Questions

### What is the latest Next.js security update?

The November 3, 2026 release: Next.js 16.4.5 (Active LTS) and 15.5.29 (Maintenance LTS). It fixes seven issues, one rated High and six rated Medium, most of them in Cache Components and use cache. Run npm install next@16.4.5 or npm install next@15.5.29.

### Which Next.js versions receive security fixes?

The 16.4.x line (Active LTS) and the 15.5.x line (Maintenance LTS). The advisories list fixes for those two lines only, so if you are on another version, move to a supported line.

### How do I check if my Next.js version is vulnerable?

Run npm ls next sharp to see the installed versions, then compare them with the newest release. Anything below 16.4.5 on 16.x or below 15.5.29 on 15.x is missing at least one security fix, and sharp should be 0.35.5 or later.

### Does npm audit detect Next.js vulnerabilities?

Not reliably. On October 17, 2026, npm audit on a fresh install of the unpatched next@16.4.0 reported zero vulnerabilities, three days after two critical advisories were published. Check the installed version directly.

### Is upgrading react enough to fix the React Server Components bugs?

No. Next.js ships its own compiled copy of react-server-dom-webpack and react-server-dom-turbopack inside the next package, so upgrading next is what fixes a Next.js app.

### How do I patch a self-hosted Next.js app in Docker or Coolify?

Upgrade next locally, confirm the versions with npm ls, commit package-lock.json, rebuild the image without cached layers and redeploy. Then run node inside the running container to print the next and sharp versions, because an image built before the patch keeps the old packages.
