Next.js released an out-of-band security update on October 14 that fixes two critical flaws allowing unauthenticated remote code execution, along with a high-severity denial-of-service flaw.
One code-execution flaw is in React Server Components, and the other in librsvg, the open-source library Next.js uses through the sharp package to handle SVG images.
The fixes are in Next.js 16.4.1 and 15.5.28, the current Active and Maintenance long-term support (LTS) releases.
What Was Fixed
The update covers three separate issues. Vercel, which develops Next.js, rated both code-execution flaws critical, each with a CVSS score of 9.5. The table lists the versions each issue affects and the version that fixes it.
| Issue | Affected versions | Fixed in | Who is exposed |
|---|---|---|---|
Code execution through use cache (
GHSA-673q-mjm6-r5xr
)
|
16.0.0 through 16.4.0 | 16.4.1 |
App Router apps with Cache Components enabled, where a use cache function returns more than one typed array
|
| Code execution through SVG images (CVE-2026-96889, GHSA-2464-fhr4-w9xw ) | 10.0.0 through 15.5.27, and 16.0.0 through 16.4.0 |
16.4.1, or 15.5.28 with sharp 0.35.5 or later
|
Apps that pass attacker-supplied SVG files to sharp on glibc-based Linux
|
| Denial of service through Server Actions ( GHSA-p3m5-59mp-jv5r ) | 13.0.0 through 15.5.27, and 16.0.0 through 16.4.0 | 15.5.28, 16.4.1 | App Router apps with at least one Server Action |
Who Is Affected
The first code-execution flaw is in React Server Components, the React feature that runs user-interface components on the server. React's advisory covers three packages, react-server-dom-webpack, react-server-dom-parcel, and react-server-dom-turbopack, in versions 19.0.0 through 19.3.0. It describes the flaw as affecting "extremely rare cases where responses transport multiple typed arrays and an attacker-controlled value."
In a Next.js app, the trigger is a use cache function that returns more than one typed array, so only version 16 apps that enable Cache Components, the feature behind use cache, are exposed. Vercel says to upgrade even if your app has no such function.
The second flaw is a memory bug in librsvg, the library that renders SVG images, which Next.js reaches through the bundled sharp package. Code execution is possible when Next.js runs on glibc-based Linux, according to the advisory.
By default, Next.js does not optimize SVG files. Serving them through the image optimizer requires turning on a setting called dangerouslyAllowSVG. The same library also renders images for next/og, the feature that builds social-preview images, when that feature runs on the Node.js runtime.
The third flaw is a denial-of-service issue. In App Router apps that define at least one Server Action, crafted requests can push one server process to full CPU use and stop it from handling other requests. Apps on the Pages Router, or with no Server Actions, are not affected.
Exposure can differ by host. Netlify said its platform does not run the image-optimizer code path and that the flaws have limited impact on its setup, while still recommending the upgrade.
What to Do
Upgrade to Next.js 16.4.1 if you run version 16, or 15.5.28 if you run version 15, then rebuild and redeploy.
Vercel's advisory says upgrading Next.js makes package managers supply the fixed sharp automatically. On version 16 that holds, because 16.4.1 requires sharp 0.35.5.
On version 15 it may not. 15.5.28 still accepts the older, affected sharp 0.34.x, and upgrading over an existing install can leave that version in place. Check with npm ls sharp and update sharp to 0.35.5 or later if it is older.
If you cannot upgrade Next.js right away, the image flaw has an interim option: make sure sharp is 0.35.5 or later, or block SVG rendering in sharp with sharp.block({ operation: ["VipsForeignLoadSvg"] }), as the sharp advisory describes. The use cache and Server Actions flaws have no workaround, and only the upgrade closes them.
As of October 15, the use cache and Server Actions advisories had no CVE and did not appear in the npm advisory feed that npm audit uses, so dependency scanners may not warn you about them. The image flaw does surface, through sharp's own advisory.
Why the Image Flaw Keeps Returning
This is the third time since August that image processing in Next.js has produced a code-execution flaw. In August, a bug in libheif, reached through sharp, allowed code execution when the optimizer handled a crafted AVIF image. In September, a flaw in next/og let attacker-controlled text change the SVG it generated.
Next.js did not change its own image code this time. 16.4.1 ships the same optimizer as 16.4.0 and fixes the image flaw by raising the bundled sharp to 0.35.5, which carries a patched librsvg (2.63.2).
The librsvg bug, CVE-2026-96889, was made public on September 23 and fixed in sharp on September 27. Red Hat scored it 7.8 and said exploiting it needs user interaction, such as opening a malicious file. Vercel rated the Next.js exposure 9.5 and reachable over the network.
The researcher who reported the librsvg bug, Rafael B. Dias, says it is the weakness behind September's next/og flaw. A working exploit for that earlier flaw, built for one specific server setup, has since been published.
sharp's maintainer also warns that whether the flaw ends in code execution or only a crash can come down to the server's Node.js build, because the official Node.js binaries are not hardened against this kind of memory attack.
Not the Same as React2Shell
The React Server Components flaw sits in the same three packages as React2Shell, the maximum-severity flaw disclosed in December 2025 that attackers exploited at scale. This one is far narrower. React describes it as affecting "extremely rare cases where responses transport multiple typed arrays and an attacker-controlled value."
As of October 15, there are no public reports that any of the three flaws fixed on October 14 has been used in attacks.




