1. Red
  2. Learn
  3. Frameworks and runtimes

Next.js 16.4.1 Fix: use cache RCE and SVG Image RCE

Next.js 16.4.1 and 15.5.28 fix two critical RCE bugs: use cache and the SVG image optimizer (CVE-2026-96889). Affected versions, sharp check, redeploy steps.

By Alexander Gusev, run.cloudPublished 28 October 20268 min readHow we check facts
On this page
  1. Which Next.js versions are affected?
  2. Why does CVE-2026-96889 have three different scores?
  3. Am I exposed if I do not use Cache Components or SVG files?
  4. How do I fix it?
  5. Am I affected? A three-state self-test
  6. Was it exploited, and what should I look for?
  7. What is each bug, in plain terms?
  8. What is the order of work this week?

Next.js published an out-of-band release on 14 October 2026 that fixes two critical remote code execution bugs and one high-severity denial of service. Upgrade to 16.4.1 on the 16 line or 15.5.28 on the 15 line, reinstall so sharp resolves to 0.35.5 or later, rebuild, and redeploy. The use cache bug has no workaround. Upgrading is the fix.

FactDetailSource
Fixed releases16.4.1 (Active LTS) and 15.5.28 (Maintenance LTS), released 14 October 2026Next.js blog
use cache RCEGHSA-673q-mjm6-r5xr, Critical, CVSS v4 9.5, no CVE id at our check, versions 16.0.0 to 16.4.0GitHub advisory
SVG image RCECVE-2026-96889 / GHSA-2464-fhr4-w9xw, Critical, CVSS v4 9.5, glibc-based LinuxGitHub advisory
Server Actions DoSGHSA-p3m5-59mp-jv5r, High, App Router with at least one Server ActionGitHub advisory
ExploitationNo public in-the-wild reports as of 15 October; not in CISA's catalog data on 24 OctoberCSA note, CISA
Checked24 October 2026this page
9.5CVSS v4 score Next.js gives both RCE advisories
16.4.1fixed release on the 16 line (15.5.28 on 15)
0.35.5first sharp release with the SVG fix

Which Next.js versions are affected?

Every version below the fixed release on your line, with some differences between the three bugs. The ranges below come from the GitHub advisories, checked on 24 October 2026.

BugAffected versionsFixed inNeeds
use cache RCE16.0.0 to 16.4.016.4.1App Router, Cache Components, a use cache function returning multiple typed arrays
SVG image RCE10.0.0 to 15.5.27, and 16.0.0 to 16.4.015.5.28, 16.4.1glibc-based Linux, the sharp image library
Server Actions DoS13.0.0 to 15.5.27, and 16.0.0 to 16.4.015.5.28, 16.4.1App Router with at least one Server Action

The September release does not help here. Versions 16.3.8 and 15.5.27 shipped on 30 September with fixes for other bugs, and two fixes were postponed to October because of upstream delays. If your lockfile says 16.3.8 or 15.5.27, you are one release behind.

The 15 line is not listed as affected by the use cache bug. Versions 10 to 14 have no patched release of their own in the SVG advisory. The Cloud Security Alliance note says apps on versions older than 15.5 need to move to a supported line.

Why does CVE-2026-96889 have three different scores?

Because three organisations describe three different things. The CVE was assigned by Red Hat to librsvg, the SVG library, and made public on 23 September 2026, three weeks before the Next.js release. The CVE record calls it a use-after-free. The upstream RustSec entry lists librsvg 2.63.2 as a patched version.

Next.js uses sharp for image optimisation, and sharp bundles librsvg. Each party scored it from its own position:

WhoScoreWhat it describesDate
Red HatCVSS v3.1 7.8, Importantlibrsvg on its own, user interaction needed23 September 2026
sharp maintainerCVSS v4 8.9, Highsharp below 0.35.5, local vector30 September 2026
Next.jsCVSS v4 9.5, CriticalThe Image Optimization API reachable over the network14 October 2026

None of these is wrong. A scanner that reads only the CVE record sees the 7.8 and may rank it below other work. A site that serves images through the Next.js optimizer should use the 9.5. The record also has a second trap: the use cache bug has no CVE id at all, so a tool that works only from CVE lists will miss it. The Cloud Security Alliance note makes the same point.

Am I exposed if I do not use Cache Components or SVG files?

You cannot rule it out from the advisories, so treat the upgrade as required.

For use cache, the advisory says the bug needs an App Router app with Cache Components and a use cache function that returns multiple typed arrays. The Next.js docs say Cache Components is switched on with cacheComponents: true in next.config. React's own upstream advisory calls the condition extremely rare. If you never confirmed the earlier React flaw, the React2Shell version check covers it. Even so, the Next.js advisory says to upgrade immediately even if your application has no such functions.

For SVG, the Next.js docs say Next.js does not optimize SVG images by default, and dangerouslyAllowSVG turns that on. The advisory does not say whether the default configuration avoids the bug. Netlify says apps that render untrusted input with next/og are affected on its platform, with the impact limited to a crashed function invocation there.

Two details change who is in scope. The advisories name glibc-based Linux for code execution. They do not say Alpine and other musl systems are exempt, so do not read the wording as an exemption. A Node.js binary built as a Position Independent Executable matters too, and the sharp advisory notes that the official Node.js binaries are not built that way. The runtime has its own October Node.js patch release, which is a separate upgrade.

How do I fix it?

Upgrade, refresh the dependency tree, rebuild, and redeploy. The fix reaches sharp through the build, so a changed package.json alone does nothing until a new build is running.

Fix flow: upgrade next, check sharp, rebuild, redeploy, confirm the running build Upgrade next16.4.1 / 15.5.28 Check sharp0.35.5 or later Rebuildimage or bundle Redeployreplace the process Confirmthe running build
A package change counts only once a new build is serving traffic. The last box is the one owners skip.

If you run the server or the container yourself

  • Upgrade with npm install next@16.4.1 (16 line) or npm install next@15.5.28 (15 line), or the equivalent in pnpm, yarn or bun.
  • Run npm ls next sharp and read the resolved versions. A lockfile can keep an old sharp. The target is sharp 0.35.5 or later.
  • If you use react-server-dom-webpack, -turbopack or -parcel directly, move them to 19.0.9, 19.1.10, 19.2.9 or 19.3.1 as the React advisory lists.
  • Rebuild the Docker image with a fresh install and replace the running container. Check every image that runs Next.js, including preview and staging.
  • Remove public preview and branch deployments that still run an old build. Netlify warns they may stay vulnerable until deleted.
  • Look at the build log or npm ls output inside the new image, not only on your laptop.

If you truly cannot upgrade today, the Next.js advisory allows one stopgap for the SVG bug only: make sure the sharp used by Next.js is 0.35.5 or later. The sharp advisory adds a second one, blocking sharp from decoding SVG, and says a PIE Node.js build avoids code execution for this bug. None of these covers the use cache bug, which has no workaround.

If a platform or agency deploys it for you

Platforms differ. Netlify says to upgrade next to 15.5.28 or 16.4.1 and redeploy. Pantheon says it does not update Next.js sites for customers. At our check we found no Vercel statement for this release, so do not assume the platform did it for you. Send this to whoever owns the deployment, and keep the reply:

For [your domain], which Next.js version and which sharp version are in the build that serves production today? Was it built after 14 October 2026? If it was built before, please upgrade to 15.5.28 or 16.4.1, redeploy, and tell me the deploy time and the commit.

Who owns each layer when an agency and a host are both involved is covered in this guide to patching ownership.

Am I affected? A three-state self-test

Am I affected? Where you stand right now

From outside, a scan can see that a site runs Next.js and sometimes which release. It cannot see your lockfile, whether you use Cache Components, which sharp is installed, or whether the process was replaced.

  1. Detected Your site serves Next.js and the version it shows is below 16.4.1 or 15.5.28. Treat it as exposed to the bugs that apply to that line. Upgrade and redeploy today.
  2. Unknown The version is hidden, or a CDN or platform sits in front, or you cannot say whether sharp was refreshed. This is the common case. Read the resolved versions from the repository and the deploy record.
  3. Confirmed by owner evidence You hold lockfile or build output showing next 16.4.1 or 15.5.28 or later and sharp 0.35.5 or later, plus a deploy after that build. The running code has the fix. Whether anything happened before then is a separate question.

No scan, ours included, moves you from "unknown" to "confirmed".

Was it exploited, and what should I look for?

At our check on 24 October 2026 we found no primary source reporting exploitation of either critical bug. The Cloud Security Alliance note found no public reports as of 15 October, and the CISA catalog data we read did not list either issue. CISA's enrichment on the CVE record lists exploitation as "poc" (timestamp 25 September 2026) and points at the upstream librsvg issue. That is a state label on the library flaw, not a report about a Next.js site.

The window to review starts earlier than 14 October. The librsvg flaw and its fix have been public since 23 September, and sharp 0.35.5 was released on 27 September, per the sharp release page. The Cloud Security Alliance note suggests reviewing logs from 23 September for odd SVG requests to the image route, unexpected crashes, and CPU spikes. For a server that was reachable and unpatched, also look for processes started by the Node.js user that you do not recognise, and outbound connections you cannot explain. If you find evidence, rotate the environment variables and tokens that process could read, and follow a sensible order for rotating secrets.

A denial of service shows as one process pinned at high CPU that stops answering. That matches the Server Actions bug, and is a reason to upgrade, not proof of an intrusion.

What is each bug, in plain terms?

  • use cache RCE. An App Router app with Cache Components can be made to run code when a use cache function returns several typed arrays. The advisory publishes no further mechanism, and neither do we.
  • SVG image RCE. A memory-safety fault in librsvg, reached through sharp when an SVG is processed. The condition for code execution is glibc-based Linux. Next.js says the fix arrives with the upgrade, because the new release pulls in a fixed sharp.
  • Server Actions DoS. Crafted requests to an App Router app with at least one Server Action cause excessive CPU use that blocks other requests in the same process. Telling App Router from Pages Router is the quick way to see whether that one applies to you.

The Next.js team credited evolutionstorm for the use cache report and randomguy6407 and rafabd1 for the SVG report.

What is the order of work this week?

OrderTaskWhere
1Production apps that take public trafficUpgrade, rebuild, redeploy
2Preview, staging and branch deploymentsUpgrade or delete
3Apps on 14 or olderPlan the move to 15.5.28, apply the sharp workaround meanwhile
4Apps behind an agency or platformSend the question above and keep the answer
5The wider listThis week's checklist and the October 2026 tracker

If you want an outside view of what a site shows, the free scan identifies the technologies your site serves and looks each version up in public vulnerability records. It is a lookup. It can say a version is affected, not whether your setup is exposed. More patch notes like this one are in the other framework guides. The smaller-site view of this month is in the small business round-up.

Questions people ask

Do I need to upgrade Next.js if I don't use use cache?

Yes. Vercel's advisory for the use cache bug says to upgrade immediately even if your application has no such functions, and the same release fixes the SVG image bug and a denial of service. Move to 16.4.1 on the 16 line or 15.5.28 on the 15 line.

Is Next.js 16.4.0 vulnerable to remote code execution?

Yes, to both critical bugs. 16.4.0 is the last affected version of the 16 line for the use cache issue and the SVG image issue. The fix for both is 16.4.1.

I'm on Next.js 14. What do I do?

The SVG image advisory lists versions from 10.0.0 up to 15.5.27 as affected, but names 15.5.28 as the only patched release on that side. Plan the move to 15.5.28 or later. Until then the advisory's workaround is to make sure the sharp package your build uses is 0.35.5 or newer.

I deploy with Alpine in Docker. Does the glibc wording mean I'm fine?

The advisories name glibc-based Linux as the condition for code execution and do not say that musl-based systems such as Alpine are exempt. Do not treat the wording as an exemption. Upgrade, rebuild the image and replace the running container.

Is the Next.js RCE being exploited?

A Cloud Security Alliance note found no public reports of exploitation as of 15 October, and neither issue was in the CISA catalog data we read on 24 October. The librsvg fix has been public since 23 September, so absence of reports is not a reason to wait.

I host on Vercel or Netlify. Do I still need to redeploy?

Netlify says to upgrade next and redeploy, and notes that next/image runs on its Image CDN rather than your function. We found no Vercel statement for this release at our check. Upgrade the dependency in your repository either way, then ask your platform what it covers.

Sources

  1. Next.js Security Update for Upstream Vulnerabilities (Next.js blog, 14 October 2026)The vendor announcement: fixed versions 16.4.1 and 15.5.28, the three advisories, the sharp workaround. Checked 24 October 2026.
  2. GHSA-673q-mjm6-r5xr: Unauthenticated RCE in use cache functions returning typed arraysCritical, CVSS v4 9.5, affects 16.0.0 to 16.4.0, no CVE id and no workaround at our check.
  3. GHSA-2464-fhr4-w9xw: Unauthenticated RCE in the Image Optimization API when SVG files are used (CVE-2026-96889)Critical, CVSS v4 9.5, glibc-based Linux, sharp 0.35.5 workaround.
  4. GHSA-p3m5-59mp-jv5r: Denial of Service in App Router using Server ActionsHigh. Pages Router apps and apps without Server Actions are not vulnerable.
  5. GHSA-xqc2-xf4c-x3h3: Unauthenticated RCE in React Server Components (React)The related upstream React advisory. Patched react-server-dom packages: 19.0.9, 19.1.10, 19.2.9, 19.3.1.
  6. GHSA-wq5f-xc86-pv6w: sharp, vulnerability in librsvg dependency (CVE-2026-96889)The sharp maintainer's advisory: fixed in sharp 0.35.5 with librsvg 2.63.2, plus the block-SVG and PIE workarounds.
  7. CVE-2026-96889 record (CVE.org)Assigned by Red Hat to librsvg, published 23 September 2026, CVSS v3.1 7.8. Carries CISA's enrichment.
  8. RUSTSEC-2026-0305: use-after-free when XML includes have duplicated entities (librsvg)The upstream librsvg description and its patched versions, including 2.63.2.
  9. Red Hat CVE page: CVE-2026-96889Red Hat rates it Important and states user interaction is needed in its own packages.
  10. Next.js September 2026 Security Release (Next.js blog, 30 September 2026)Versions 16.3.8 and 15.5.27. These do not contain the October fixes.
  11. Upcoming Next.js Security Update for Upstream Vulnerabilities (Next.js blog, 8 October 2026)The advance notice: two Critical and one High, two postponed from September.
  12. sharp releases (GitHub)Release 0.35.5 is dated 27 September. Release notes do not mention the CVE.
  13. Next.js docs: cacheComponentsHow Cache Components is switched on, and that it enables the use cache directive.
  14. Next.js docs: Image component, dangerouslyAllowSVGStates that Next.js does not optimize SVG images by default.
  15. Netlify changelog: Next.js and React vulnerabilities, October 2026What Netlify says is and is not exercised on its platform. Last updated 23 October 2026.
  16. Pantheon release note: Next.js security releasePantheon does not update Next.js sites for customers.
  17. Cyber Security Agency of Singapore alert AL-2026-148 (20 October 2026)A government alert listing both critical issues and the fixed versions.
  18. Cloud Security Alliance research note, 16 October 2026Secondary analysis. Says no in-the-wild exploitation was publicly reported as of 15 October.
  19. CISA Known Exploited Vulnerabilities catalogNeither Next.js issue was listed in the catalog data we read on 24 October 2026.

Facts on this page are dated and point at the primary source next to them. If a vendor status changes after the date shown, the vendor's page wins; tell us at support@run.cloud and we will update it.