Next.js 16.4.1 and 15.5.28 security update: two RCEs fixed, check sharp too (CVE-2026-96889, CVE-2026-126187)

8 min read

How to fix CVE-2026-96889 and CVE-2026-126187: upgrade next to 16.4.1 (or 15.5.28) and confirm sharp is 0.35.5. The October 14 Next.js and React releases close two unauthenticated RCEs and a Server Actions DoS.

Next.js 16.4.1 and 15.5.28 security update: two RCEs fixed, check sharp too (CVE-2026-96889, CVE-2026-126187)
On this page

Updated Nov 10, 2026: React's advisory GHSA-xqc2-xf4c-x3h3, the React Server Components bug behind the Next.js use cache RCE (GHSA-673q-mjm6-r5xr), now has its own CVE ID: CVE-2026-126187, published by GitHub on Nov 10. The fix is the same one described below: Next.js 16.4.1, or react-server-dom-* 19.0.9, 19.1.10, 19.2.9 or 19.3.1 outside Next.js. None of these issues is in CISA's KEV catalog (version 2026.11.10), and none of the advisories reports exploitation. CISA's enrichment of the CVE-2026-96889 record marks a public proof of concept for the underlying librsvg bug, so do not let the sharp check slide.

If you self-host a Next.js app on Linux, a request from someone with no account can, in the worst case, run code on your server. Vercel shipped Next.js 16.4.1 and 15.5.28 on 2026-10-14 (npm publish around 1:36 to 1:44 PM ET) with three advisories: two critical remote code execution bugs (CVSS 4.0 score 9.5) and one high denial of service. React shipped 19.0.9, 19.1.10, 19.2.9 and 19.3.1 about an hour earlier for the React Server Components bugs underneath. Vercel pre-announced this release on October 8, so the patch was expected. What was not obvious until the advisories landed: on the 15.x line, upgrading Next.js can leave the vulnerable image library exactly where it was.

Short answer: Next.js 16.4.1 and 15.5.28, released October 14, 2026, fix two critical remote code execution bugs and one high-severity denial of service. CVE-2026-96889 (GHSA-2464-fhr4-w9xw) is an image optimization RCE in sharp on glibc Linux, and GHSA-673q-mjm6-r5xr is a use cache RCE on Next.js 16.0.0 to 16.4.0. On Next.js 15.x you also have to move sharp to 0.35.5, because [email protected] still accepts sharp 0.34.x. None of these bugs was on CISA KEV or reported exploited at publication.

This post is our operator read of the Next.js GitHub advisories, the matching React advisories, and the upstream sharp advisory for CVE-2026-96889.

How to fix

Upgrade Next.js, then prove sharp moved too.

# Next.js 16.x
npm install [email protected]

# Next.js 15.x
npm install [email protected]
npm install [email protected]

# confirm both
npm ls next sharp

Why the extra sharp line on 15.x: [email protected] declares "sharp": "^0.34.3 || ^0.35.5". If your lockfile already holds sharp 0.34.x, that range is satisfied and your package manager has no reason to touch it. There is no fixed 0.34.x release; the only fixed sharp is 0.35.5. So a 15.x app can show [email protected] in npm ls and still ship the vulnerable SVG decoder. [email protected] requires ^0.35.5, so 16.x gets pulled forward on install.

If you would rather pin it in one place, add an override and reinstall:

// package.json (npm)
"overrides": { "sharp": "0.35.5" }

// package.json (pnpm)
"pnpm": { "overrides": { "sharp": "0.35.5" } }

Rebuild and redeploy your container. A Dockerfile that runs npm ci installs whatever the lockfile says, so commit the updated lockfile first.

Next.js 14 and older: the image advisory covers next from 10.0.0 and lists no 14.x fix. If npm ls sharp shows sharp in your tree, pin it to 0.35.5 now and plan the move to 15.5.28 or 16.4.1.

Not on Next.js but using React Server Components (a custom bundler setup, Parcel, or another RSC framework): upgrade react-server-dom-webpack, react-server-dom-parcel or react-server-dom-turbopack to 19.0.9, 19.1.10, 19.2.9 or 19.3.1. On Next.js, upgrade next; App Router uses the React server build that ships inside Next.js, so bumping react in your own package.json is not the fix.

There is no workaround for the use cache RCE or the Server Actions DoS. Upgrade.

Who is not in scope

  • Image optimization RCE (GHSA-2464-fhr4-w9xw, CVE-2026-96889): both Vercel and the sharp maintainer scope the code execution to glibc-based Linux. Alpine (musl), macOS and Windows hosts are outside the stated RCE condition. The sharp advisory also says a node binary built as a Position Independent Executable blocks the RCE path, and warns that the official Node.js binaries are not built that way. Distro-packaged Node.js usually is. In practice, the common exposed setup is a Debian or Ubuntu based container running the official Node.js build.
  • use cache RCE (GHSA-673q-mjm6-r5xr): Next.js 16.0.0 through 16.4.0 only, App Router with Cache Components, and a use cache function that returns multiple typed arrays. React calls the underlying condition "extremely rare". Next.js 15.x is not listed for this one.
  • Server Actions DoS (GHSA-p3m5-59mp-jv5r): Pages Router apps and App Router apps with no Server Actions are not affected, per the advisory.
  • Static exports (output: 'export') have no Next.js server at runtime, so none of the three apply. React's own advisory says the same for any React app that does not use a server.

One operator check

Run this inside the deployed container or on the host that serves the app, from the app directory:

node -p "require('sharp/package.json').version + ' librsvg ' + require('sharp').versions.rsvg"
ldd --version 2>&1 | head -1
file "$(command -v node)"

You want 0.35.5 librsvg 2.63.2 on the first line. The second line tells you glibc or musl. On the third, pie executable means your Node.js build is position independent; a plain executable on a glibc host with an old sharp is the combination the advisory warns about. Patch regardless of what the last two lines say.

What this is not

This is not a known in-the-wild exploit today: none of the advisories report exploitation, and none of these issues is in the CISA Known Exploited Vulnerabilities catalog as of version 2026.10.14.

The details

AdvisoryWhat breaksAffected nextFixedCVSS 4.0
GHSA-2464-fhr4-w9xw (CVE-2026-96889)Unauthenticated RCE in the Image Optimization API when SVG files are used, via a memory bug in upstream librsvg10.0.0 to 15.5.27, and 16.x up to 16.4.015.5.28, 16.4.1 (with sharp 0.35.5)9.5 critical
GHSA-673q-mjm6-r5xr (React: CVE-2026-126187)Unauthenticated RCE in use cache functions returning typed arrays16.0.0 to 16.4.016.4.19.5 critical
GHSA-p3m5-59mp-jv5rCrafted requests to App Router Server Actions burn CPU and block the process13.0.0 to 15.5.27, 16.0.0 to 16.4.015.5.28, 16.4.18.2 high

The image bug has been fixable for two weeks. sharp 0.35.5 shipped on 2026-09-27 with librsvg 2.63.2, and the sharp advisory for CVE-2026-96889 went public on 2026-09-30. Vercel's pre-announcement said two of today's fixes were held back from the September release for upstream coordination. So any fresh install since late September already pulled the fixed sharp. Apps that build from an older lockfile did not, and that is most production deploys. If you only take one thing from this post, check the sharp version in the running artifact, not in package.json.

The React side. React published two advisories at about 1:08 PM ET: GHSA-xqc2-xf4c-x3h3, an unauthenticated RCE in React Server Components when a response carries multiple typed arrays and an attacker-controlled value, and GHSA-h3gv-c5rc-p453, a Server Functions DoS. Their descriptions line up with the Next.js use cache RCE and the Server Actions DoS. When we first published, CVE-2026-96889 was the only CVE ID in the set. On Nov 10, GitHub published CVE-2026-126187 for GHSA-xqc2-xf4c-x3h3, the React side of the use cache RCE, rated CVSS 4.0 9.5 and filed as deserialization of untrusted data (CWE-502). The Next.js advisories themselves are still GHSA-only.

If you followed our write-up of the September 2026 Next.js security release, this is the follow-up that pre-announcement promised. It is a separate upgrade: 15.5.27 and 16.4.0 are both vulnerable to today's issues.

What do people ask about the Next.js October 2026 security update?

What does Next.js 16.4.1 fix?

Next.js 16.4.1 and 15.5.28 fix the image optimization RCE (CVE-2026-96889, GHSA-2464-fhr4-w9xw), the use cache RCE (GHSA-673q-mjm6-r5xr, 16.x only) and a Server Actions denial of service (GHSA-p3m5-59mp-jv5r).

Do I need to update sharp for CVE-2026-96889?

Yes on Next.js 15.x. [email protected] declares sharp ^0.34.3 || ^0.35.5, so a lockfile holding sharp 0.34.x stays vulnerable. Install [email protected], the only fixed sharp release, and confirm with npm ls next sharp. [email protected] requires ^0.35.5, so 16.x pulls it forward on install.

What is GHSA-673q-mjm6-r5xr?

The Next.js use cache RCE. It affects Next.js 16.0.0 through 16.4.0 using the App Router with Cache Components and a use cache function that returns multiple typed arrays. React calls the underlying condition extremely rare. Next.js 15.x is not listed for it. The React bug underneath is CVE-2026-126187 (GHSA-xqc2-xf4c-x3h3). Upgrade to 16.4.1.

What is CVE-2026-126187?

It is the CVE ID GitHub assigned on Nov 10, 2026 to React's GHSA-xqc2-xf4c-x3h3: unauthenticated remote code execution in React Server Components when a response carries multiple typed arrays and an attacker-controlled value. It is the same bug as the Next.js use cache RCE. Fixed in react-server-dom-webpack, react-server-dom-parcel and react-server-dom-turbopack 19.0.9, 19.1.10, 19.2.9 and 19.3.1, and in Next.js 16.4.1. Apps that do not run React on a server are not affected.

Which hosts are exposed to the Next.js image optimization RCE?

Vercel and the sharp maintainer scope the code execution to glibc-based Linux. Alpine (musl), macOS and Windows hosts fall outside the stated RCE condition. The common exposed setup is a Debian or Ubuntu based container running the official Node.js build.

Is CVE-2026-96889 exploited?

No. As of Nov 10, 2026 none of the advisories reports exploitation, and none of the issues, including CVE-2026-126187, is in the CISA Known Exploited Vulnerabilities catalog (version 2026.11.10). CISA's enrichment of CVE-2026-96889 does note a public proof of concept for the librsvg bug.

References

All articles

Keep exploring

The engineering desk continues across the ecosystem: security research on shipping agents safely, and plugins that put the standards to work.