Back to Blog
Security27 October 20266 min read · 1,336 words

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

N7

No7 Engineering Team

Growth Architecture Unit

Security: Is My Next.js Version Vulnerable? How to Check and Fix (illustration)

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 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, Next.js 16.4.5 fixes all seven advisories. The v15.5.29 release notes list the three that also affect 15.x. All seven are rated moderate (medium) severity:

  • CVE-2026-119346 (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): 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): 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): 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): 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): 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): 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 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. 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:

AdvisoryIssueFixed in
GHSA-2xp9-vwfh-vxw4Unauthenticated 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 (CVE-2026-75604)Unauthenticated remote code execution on Windows-hosted servers (25 August 2026)15.5.24, 16.3.3
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 (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-r5xrUnauthenticated 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. 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 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 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 needs the same check. Our ecommerce supply chain security checklist covers lockfiles and patch routines, and our 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.