---
title: "Is My Next.js Version Vulnerable? How to Check and Fix"
description: "Check your installed Next.js version in one command, compare it with the 2026 security advisories, and upgrade to 16.4.5 or 15.5.29 or later."
url: "https://no7software.co.uk/blog/check-nextjs-version-vulnerable"
last_modified: "2026-11-18"
---

# Is My Next.js Version Vulnerable? How to Check and Fix

## Key takeaways

- As of 18 November 2026, Next.js 16.4.5 or later and 15.5.29 or later include every 2026 security fix that names a fixed version; 16.4.6 is the npm latest release.
- On Next.js 16.4.0 or later, next build warns that the installed version is affected by a known security vulnerability when it is; upgrading, not disabling experimental.agentUpgrade, removes the risk.
- Check the installed Next.js version with npx next --version and npm ls next; the lockfile, not the package.json range, decides what you deploy.
- Next.js 16.4.1 or 15.5.28 and later include every 2026 fix that names a fixed version on those lines.
- Next.js 14.x and older are unsupported, and no 2026 advisory names a fix for 14.x or older.
- After upgrading, commit the lockfile, rebuild every image and restart every server.

### Update, 18 November 2026, 06:55 UTC: Why next build now says your Next.js version is affected by a known security vulnerability

Since Next.js 16.4.0, `next dev` and `next build` check the installed version against the Next.js security advisories. The check is controlled by [`experimental.agentUpgrade`](https://nextjs.org/docs/app/api-reference/config/next-config-js/agentUpgrade), and its default policy, `security`, recommends a safe upgrade when the installed stable version is affected. The CLI warns that the installed Next.js version is affected by a known security vulnerability and points to `next upgrade --agent=security`.

How the command behaves depends on where it runs, according to the Next.js docs:

- In an interactive terminal the reminder offers Upgrade now, Skip, or Skip until next version, and skips on its own after ten seconds while the build carries on behind it.
- When a coding agent runs the command, the first reminder stops it with instructions to report the upgrade. Running the same command again promptly continues with a warning.
- Setting `experimental.agentUpgrade` to `false` turns the reminders off. It does not fix anything: the installed version stays vulnerable.

The fix is the upgrade the message asks for. Every 2026 advisory that names a fixed version is fixed in Next.js 16.4.5 or later on 16.x and 15.5.29 or later on 15.x. The npm `latest` tag now points to [16.4.6](https://github.com/vercel/next.js/releases/tag/v16.4.6), released on 9 November 2026, a bug fix release on top of 16.4.5. [`next upgrade --agent`](https://nextjs.org/docs/app/guides/upgrading/agent-upgrade) hands the upgrade to a coding agent; running `npm install next@16.4.6` and rebuilding does the same job by hand.

### Update, 18 November 2026, 07:00 UTC: Two more fixed versions for older 16.3 and 15.5 releases

One advisory was missing from the list in this post. [GHSA-h694-7cp9-m8p3](https://github.com/vercel/next.js/security/advisories/GHSA-h694-7cp9-m8p3) (CVE-2026-103004, medium) affects Next.js 16.3.0 up to 16.3.7 when Cache Components are enabled: a `use cache` function that calls another one reading a root param can be cached without that root param, so content made for one root param value can be served for another. It is fixed in 16.3.8.

The two cache poisoning advisories from 30 September, GHSA-4jqv-mc3x-m676 (CVE-2026-94543) and GHSA-mcj8-r9mp-w47p (CVE-2026-94484), now name their fixed versions on [GitHub](https://github.com/vercel/next.js/security/advisories): 15.5.27 and 16.3.8. Both are covered by the current minimum safe versions, 16.4.5 and 15.5.29.

### Update, 3 November 2026, 19:45 UTC: Next.js rates the unstable_cache flaw High in its release post

The Next.js team has now published its [November 2026 Security Release](https://nextjs.org/blog/november-2026-security-release) post. It lists the same seven issues and the same fixed versions, 16.4.5 (Active LTS) and 15.5.29 (Maintenance LTS), but rates one of them higher than the GitHub advisory: cross-tenant cache disclosure when a `use cache` function is also called through `unstable_cache` (GHSA-mfr8-8qww-v76h) is marked High severity in the post, while the advisory itself still says medium. The post says that where root parameters separate tenants, the leaked result can contain another tenant's data. The other six remain Medium. The post also narrows two issues: the Edge cookie leak needs attacker-controlled JavaScript on the same origin and did not reproduce in Node.js Route Handlers or with `cookies().set()`, and the SVG bypass needs a native image backend that can decode SVG.

### Update, 3 November 2026, 18:55 UTC: Next.js 16.4.5 and 15.5.29 fix seven medium vulnerabilities

The scheduled release announced on 27 October shipped today. According to the [v16.4.5 release notes](https://github.com/vercel/next.js/releases/tag/v16.4.5), Next.js 16.4.5 fixes all seven advisories. The [v15.5.29 release notes](https://github.com/vercel/next.js/releases/tag/v15.5.29) list the three that also affect 15.x. All seven are rated moderate (medium) severity:

- CVE-2026-119346 ([GHSA-f3mh-rxg3-f5g2](https://github.com/vercel/next.js/security/advisories/GHSA-f3mh-rxg3-f5g2)): cookies set through `NextResponse` on Edge runtime routes are repeated in an internal `x-middleware-set-cookie` response header, so HttpOnly cookies such as session tokens become readable by JavaScript on the same origin. Affects 15.x and 16.x.
- CVE-2026-119347 ([GHSA-7qx7-33qx-rqx2](https://github.com/vercel/next.js/security/advisories/GHSA-7qx7-33qx-rqx2)): on self-hosted deployments the image optimiser (`/_next/image`) can be made to process an attacker-supplied SVG even with `dangerouslyAllowSVG: false`, the default. Affects 15.x and 16.x.
- CVE-2026-119348 ([GHSA-pc58-hwjq-p385](https://github.com/vercel/next.js/security/advisories/GHSA-pc58-hwjq-p385)): self-hosted apps that return a fetched upstream response unchanged, behind an HTTP/1.1 reverse proxy that allows pipelined responses, can mix up responses between clients. Affects 15.x and 16.x.
- CVE-2026-119349 ([GHSA-rhh4-g77r-r9qj](https://github.com/vercel/next.js/security/advisories/GHSA-rhh4-g77r-r9qj)): `use cache` functions that take binary arguments such as `Uint8Array` or `Blob` can produce the same cache key for different arguments, which can share cached results across users. Affects 16.x.
- CVE-2026-119350 ([GHSA-vvgp-ww4w-46vf](https://github.com/vercel/next.js/security/advisories/GHSA-vvgp-ww4w-46vf)): self-hosted apps on `next start` built with `cacheComponents: true` and without Partial Prefetching can have a shared fallback shell poisoned by one unauthenticated GET request. Affects 16.4.0 and later. The advisory's workaround is `partialPrefetching: true` in `next.config`.
- CVE-2026-119351 ([GHSA-vc7v-qv4w-wrv8](https://github.com/vercel/next.js/security/advisories/GHSA-vc7v-qv4w-wrv8)): with Cache Components, an outer `use cache` function can be stored under a key that leaves out a root param read by an inner one, so content for one root param value is served for another. Affects 16.2.0 and later.
- CVE-2026-119790 ([GHSA-mfr8-8qww-v76h](https://github.com/vercel/next.js/security/advisories/GHSA-mfr8-8qww-v76h)): a `use cache` function that reads a root param and is called both directly and through `unstable_cache()` can leak cached data across root param values during a cold process start. Affects 16.3.0 and later.

The version check below still works, but the minimum safe versions have moved: any 16.x release from 16.4.5, or any 15.x release from 15.5.29. Versions 16.4.1 to 16.4.4 and 15.5.28 fix the 14 October advisories but not these seven.

### Update, 28 October 2026, 15:15 UTC: Next.js schedules a November security release

On 27 October the Next.js team [announced a scheduled security release](https://nextjs.org/blog/upcoming-nextjs-security-release-november-2026) for Tuesday 3 November 2026. It will address seven medium-severity vulnerabilities in Next.js, and the full advisories, with impact, affected versions and upgrade instructions, will be published alongside the release. Until then, the check below still applies: 16.4.1 or 15.5.28 or later includes the 14 October fixes. Run the check again after 3 November, once the new advisories name their fixed versions.

To find out whether your **Next.js version is vulnerable**, check the version your app actually installs, not the range in `package.json`, and compare it with the fixed versions in the Next.js security advisories. As of 27 October 2026, the latest advisories, published on 14 October, are fixed in Next.js 16.4.1 and 15.5.28. Any 16.x release from 16.4.1 or any 15.x release from 15.5.28 includes every 2026 fix that names a fixed version on those lines.

## How to check your Next.js version

1. **Ask the Next.js CLI.** In the project folder, run `npx next --version`. The Next.js CLI reference documents `-v` or `--version` as the option that outputs the Next.js version number.
2. **Ask the package manager what is installed.** Run `npm ls next`. It shows the version resolved in `node_modules`, including any second copy pulled in by another package.
3. **Read the lockfile.** In `package-lock.json`, the `node_modules/next` entry holds the version your builds install. A range such as `^16.3.8` in `package.json` allows any 16.x release from 16.3.8; the lockfile decides what CI and production get.
4. **Check every deployed copy.** Run the same check in each production image, CI runner and preview environment. They can lag behind your laptop if a lockfile change has not been deployed.

## Which Next.js versions include the fixes?

Next.js publishes its advisories on [GitHub](https://github.com/vercel/next.js/security/advisories). Across 2026, every advisory that names a stable fixed version on the 16.x or 15.x line names one at or below 16.4.1 or 15.5.28. Six advisories from 30 September 2026 do not yet name a fixed version on GitHub, including two cache poisoning issues that affect 15.x (GHSA-4jqv-mc3x-m676 and GHSA-mcj8-r9mp-w47p). These are the critical advisories:

| Advisory | Issue | Fixed in |
| --- | --- | --- |
| [GHSA-2xp9-vwfh-vxw4](https://github.com/vercel/next.js/security/advisories/GHSA-2xp9-vwfh-vxw4) | Unauthenticated remote code execution in the Image Optimization API when AVIF files are used (25 August 2026) | 15.5.24, 16.3.3 |
| [GHSA-p293-qw3h-jr36](https://github.com/vercel/next.js/security/advisories/GHSA-p293-qw3h-jr36) (CVE-2026-75604) | Unauthenticated remote code execution on Windows-hosted servers (25 August 2026) | 15.5.24, 16.3.3 |
| [GHSA-vcvr-r3jv-pc5j](https://github.com/vercel/next.js/security/advisories/GHSA-vcvr-r3jv-pc5j) (CVE-2026-94545) | Remote code execution in `next/og` ImageResponse, versions 16.2.0 up to 16.3.5 (22 September 2026) | 16.3.6 |
| [GHSA-2464-fhr4-w9xw](https://github.com/vercel/next.js/security/advisories/GHSA-2464-fhr4-w9xw) (CVE-2026-96889) | Unauthenticated remote code execution in the Image Optimization API when SVG files are used (14 October 2026) | 15.5.28, 16.4.1 |
| [GHSA-673q-mjm6-r5xr](https://github.com/vercel/next.js/security/advisories/GHSA-673q-mjm6-r5xr) | Unauthenticated remote code execution in `use cache` functions returning typed arrays (14 October 2026) | 16.4.1 |

The October fixes are covered in detail in our post on the [Next.js RCE vulnerability](https://no7software.co.uk/blog/nextjs-rce-vulnerability). The npm `latest` tag points to 16.4.3, which is newer than both fixed releases.

## What if I am on Next.js 14 or older?

The [Next.js support policy](https://nextjs.org/support-policy) lists 16.x as Active LTS and 15.x as Maintenance LTS; 14.x and every earlier major are listed as unsupported. No 2026 advisory names a fixed version on 14.x or older, even where an advisory's affected range starts at 10.0.0 or 13.0.0. An app on 14.x or older therefore needs a major upgrade to receive these fixes. The policy also says each major stays in Maintenance LTS for two years after its initial release, and lists 15.x as released on 21 October 2024, so plan the move to 16.x as well.

## How to fix a vulnerable Next.js version

1. **Upgrade within your line.** Run `npm install next@16.4.1` (or `next@latest`) on 16.x, or `npm install next@15.5.28` on 15.x. Staying on your major is the smallest change.
2. **Confirm the result.** Run `npm ls next` again and check that the lockfile now records the new version.
3. **Rebuild and redeploy everything.** Commit the lockfile, rebuild every image and restart every server. A running process keeps the old code until it restarts.
4. **Test the risky paths.** Exercise pages that use `next/image`, Server Actions, middleware or proxy rules, and any cached functions before closing the ticket.

## Does a static export need the patch?

The [Next.js static export guide](https://nextjs.org/docs/app/guides/static-exports) says features that need a Node.js server are not supported with `output: 'export'`, including Image Optimization with the default loader, Server Actions, Proxy and Incremental Static Regeneration. Many of the server features named in the advisories are therefore not available in a fully static site. Upgrade anyway: the build still runs the Next.js toolchain, and a later switch to a server deployment would bring the vulnerable code paths back.

## What to do next

Run `npx next --version` and `npm ls next` in every Next.js project today, and move anything below 16.4.1 or 15.5.28. If the same stack runs Node.js, the [Node.js Brotli RCE fix](https://no7software.co.uk/blog/nodejs-security-release-brotli-rce) needs the same check. Our [ecommerce supply chain security checklist](https://no7software.co.uk/blog/ecommerce-supply-chain-security-checklist) covers lockfiles and patch routines, and our [headless Shopify development](https://no7software.co.uk/headless-shopify-development) team can run the upgrade and test it for you.

## Frequently Asked Questions

The questions buyers and engineers ask us most about this topic.

### How do I check which Next.js version I have?

Run npx next --version in the project folder; the Next.js CLI documents -v and --version as the option that outputs the version number. Then run npm ls next to see the version actually installed, and check the node_modules/next entry in package-lock.json, which decides what CI and production install.

### Which Next.js version is safe in October 2026?

Next.js 16.4.1 or later on the 16.x line, or 15.5.28 or later on the 15.x line. Those releases, from 14 October 2026, fix the latest advisories, and every 2026 advisory that names a stable fixed version on those lines names one at or below them. Six advisories from 30 September 2026 do not yet name a fixed version on GitHub, including two cache poisoning issues that affect 15.x (GHSA-4jqv-mc3x-m676 and GHSA-mcj8-r9mp-w47p).

### Is Next.js 14 still getting security fixes?

The Next.js support policy lists 14.x as unsupported. No 2026 advisory names a fixed version on 14.x or older, so a 14.x app needs a major upgrade to receive the fixes.

### Does a Next.js static export need security updates?

The Next.js docs say static exports do not support server features such as Image Optimization with the default loader, Server Actions and Proxy, so many of the server features named in the advisories are not available. Upgrade anyway, because the build still runs the Next.js toolchain and a later server deployment would expose the vulnerable code.

### Which Next.js version is safe in November 2026?

Next.js 16.4.5 or later on 16.x and 15.5.29 or later on 15.x include every 2026 security fix that names a fixed version. The npm latest release is 16.4.6, from 9 November 2026. Versions from 16.4.1 to 16.4.4 and 15.5.28 fix the October advisories but not the seven published on 3 November.

### What does 'Installed Next.js version is affected by a known security vulnerability' mean?

It is the upgrade reminder that Next.js 16.4.0 and later show during next dev and next build when the installed stable version is affected by a published security advisory. It is controlled by experimental.agentUpgrade, which defaults to the security policy. In a coding agent the first reminder stops the command; in a terminal it skips after ten seconds. The fix is to upgrade, for example with npm install next@16.4.6, or to let next upgrade --agent=security do it.

### How do I turn off the Next.js security upgrade reminder?

Set experimental.agentUpgrade to false in next.config. The Next.js docs say this only disables the reminders: it does not upgrade the app, so an affected version stays vulnerable until you install a fixed release.

### Is Next.js 16.3 vulnerable?

Yes. Next.js 16.3.0 to 16.3.7 are affected by GHSA-h694-7cp9-m8p3 (CVE-2026-103004), fixed in 16.3.8, and every 16.3.x release is affected by advisories fixed in 16.4.1 and 16.4.5. Upgrade to 16.4.5 or later.
