What happened#
A week before, the Next.js team had announced an upcoming out-of-band release. It included two fixes that had been postponed from the September security release because of delays in upstream dependencies. On 14 October the update landed in the two supported lines: 16.4.1 (Active LTS) and 15.5.28 (Maintenance LTS). If you’re already on 16.4 or 15.5 that is a patch bump. If you’re on an earlier 16.x or 15.x minor, it is a minor bump.
Two of the issues are also reflected in React’s own advisories, because Next.js builds on React’s server components packages. That matters if you run a custom setup, and it explains why you’ll see React version numbers in the same announcement.
The three issues#
1. Remote code execution through use cache and typed arrays (Critical)
GHSA-673q-mjm6-r5xr, CVSS v4 9.5. A vulnerability in apps that use the App Router with Cache Components can lead to unauthenticated remote code execution when a use cache function returns multiple typed arrays. Typed arrays are JavaScript’s binary data views, such as Uint8Array. The advisory doesn’t describe the mechanism. It says there is no known workaround and tells everyone to upgrade immediately, even if your app has no similar functions.
The related React advisory, GHSA-xqc2-xf4c-x3h3, describes the same family of problem in the server components packages: in what it calls extremely rare cases, a response that carries multiple typed arrays plus an attacker-controlled value can lead to remote code execution.
2. Remote code execution in the Image Optimization API (Critical)
CVE-2026-96889 / GHSA-2464-fhr4-w9xw, CVSS v4 9.5. A memory-related bug in an upstream library used for image optimization can lead to remote code execution when Next.js runs on glibc-based Linux. The advisory title says SVG files are involved. The announcement’s workaround names sharp: make sure the version Next.js uses is 0.35.5 or later. Upgrading Next.js handles that for you, because the patched releases pull in a fixed sharp.
The affected range here is wide: from Next.js 10.0.0 up to 15.5.27, and 16.x up to 16.4.0. The advisory doesn’t explain how SVG input triggers the bug, and it doesn’t say whether the default configuration is vulnerable.
3. Denial of service in App Router with Server Actions (High)
GHSA-p3m5-59mp-jv5r, CVSS v4 8.2. Crafted requests to an App Router app that has at least one Server Action can cause excessive CPU use. Because that blocks other requests handled by the same process, the app stops responding. The Pages Router, and apps with no Server Actions, aren’t vulnerable. There is no workaround besides upgrading.
The React counterpart, GHSA-h3gv-c5rc-p453, describes crafted requests to server function endpoints that can cause out-of-memory conditions or excessive CPU use.
Am I affected?#
| Issue | Needs | Affected Next.js | Fixed in | Workaround |
|---|---|---|---|---|
| RCE: use cache and typed arrays (Critical, 9.5) | App Router, Cache Components, and a use cache function that returns multiple typed arrays | 16.0.0 to 16.4.0 | 16.4.1 | None known |
| RCE: Image Optimization with SVG (Critical, 9.5) | The Image Optimization API in use, on glibc-based Linux | 10.0.0 to 15.5.27, and 16.x up to 16.4.0 | 15.5.28, 16.4.1 | sharp 0.35.5 or later |
| DoS: Server Actions (High, 8.2) | App Router with at least one Server Action | 13.0.0 to 15.5.27, and 16.0.0 to 16.4.0 | 15.5.28, 16.4.1 | None |
| Advisory | Affected packages | Affected versions | Fixed in |
|---|---|---|---|
| RCE (Critical, 9.5) | react-server-dom-webpack, -turbopack, -parcel | 19.0.0 to 19.0.8, 19.1.0 to 19.1.9, 19.2.0 to 19.2.8, 19.3.0 | 19.0.9, 19.1.10, 19.2.9, 19.3.1 |
| DoS (High, 8.2) | The same three packages | The same ranges | The same versions |
Three honest caveats. First, the Next.js advisories list fixed versions only for the 15.5 and 16.4 lines, so if you’re on 14.x or older, the only path they describe is moving to a supported line. Second, how exposed you are to the image bug can depend on your host: Netlify, for example, says its image CDN serves next/image itself, so on Netlify the exposure is limited to apps that render untrusted input through ImageResponse. Check your own platform’s statement. Third, the React advisories apply to the server components packages, which Next.js bundles with itself, so upgrading Next.js should cover most apps.
What to do now#
- Find your version. The two commands below show your Next.js and
sharpversions, including the copy ofsharpthat Next.js uses. - Upgrade to 16.4.1 or later on the 16 line, or 15.5.28 on the 15 line. The latest 16.4 release on npm when I wrote this was 16.4.3, and the 16.3 and 16.4 release notes list new opt-in features and no breaking changes for existing apps. Update
eslint-config-nextto match. - Check
sharp. After the upgrade,npm ls sharpshould show 0.35.5 or later. - Redeploy, and clean up. A patched repository does nothing until the new build is live. Self-hosting? Rebuild and restart the process. Also remove old preview or branch deployments you don’t need, since they keep running the old code.
- Check anything custom. If you depend on
react-server-dom-*packages directly, or run your own server components setup, update those to the patched versions in the table.
# 1. What am I running?
npm ls next sharp
# 2. Upgrade (pick your line)
npm install next@16.4.1 # 16.x, or a later 16.4.x
npm install next@15.5.28 # 15.x
# 3. Is the bundled sharp new enough?
npm ls sharp # expect 0.35.5 or laterTo see which of the risky features your app actually uses, a few searches help. Hits aren’t proof of exposure, and no hits aren’t a reason to skip the upgrade.
grep -rnE "use server|use cache" app src 2>/dev/null # Server Actions, Cache Components
grep -nE "cacheComponents" next.config.* # is Cache Components switched on?
grep -rnE "next/image|next/og|ImageResponse" app src 2>/dev/nullHow I checked this site#
I wrote this the day I patched my own portfolio, so here is exactly what I found.
- Before: Next.js 16.2.6, which is inside the affected range, with
sharp0.34.5, below the 0.35.5 workaround. - Features in use: the App Router, but no Server Actions and no
use cacheor Cache Components. By the advisories’ own conditions that rules out the typed-arrays RCE and the Server Actions DoS. I usenext/imageonly with local files andunoptimized, andImageResponseonly for icons and share images built from text I wrote myself, never user input. I can’t see from outside exactly how my host serves the image endpoint, so I treated the image bug as possibly relevant. - After: Next.js 16.4.3, React 19.3.1 (up from 19.2.4) and
sharp0.35.5. The type-check, lint and production build passed, and every route and the contact API still responded as before. - One follow-up: the newer
eslint-config-nextflagged awindow.location.assignin my command palette, and I swapped it for the router.
So I was probably not directly exposed, and I upgraded anyway. The announcement itself says to upgrade even if you don’t use the affected functions, and a version bump that costs an hour is cheaper than being wrong.
Lessons for developers#
My own take, not from the advisories.
- Know which features you actually use. “Is my app affected?” took me a few minutes with three searches, because I could answer “do I use Server Actions?” with a command, not from memory.
- Native dependencies are part of your surface. One of the critical bugs lives in an image library under Next.js, not in Next.js itself. Check the versions of packages you never installed on purpose.
- Make security updates routine. Framework security releases arrive often. Automated pull requests for security fixes, and a habit of reading the announcement, turn a scramble into a chore. According to its release notes, Next.js 16.4 also added an experimental setting,
agentUpgrade, that reminds you about upgrades fixing known vulnerabilities in your installed version. - Every environment counts. Preview and branch deployments run real code. If they’re public, they need the same patch as production.
Sources#
- Next.js: Next.js Security Update for Upstream Vulnerabilities (14 October 2026)
- Next.js advisory: RCE in use cache functions returning typed arrays
- Next.js advisory: RCE in the Image Optimization API when SVG files are used (CVE-2026-96889)
- Next.js advisory: Denial of service in App Router using Server Actions
- React advisory: RCE in React Server Components
- React advisory: Denial of service in Server Functions
- Next.js 16.4 release notes: Next.js 16.4
- Netlify (an example of platform-specific exposure): Security Update: Next.js and React vulnerabilities
Keep reading
7 min read
Next.js November 2026 security release: seven fixes in 16.4.5 and 15.5.29, and how to check your app
Next.js 16.4.5 and 15.5.29 fix seven Moderate advisories: use cache leaks, an Edge cookie exposure and an SVG bypass. Which ones apply to you, and what to run.
6 min read
@sentry/nextjs tunnelRoute bypass (CVE-2026-114139): can your Next.js middleware be skipped?
CVE-2026-114139 (CVSS 9.1) can let requests skip Next.js middleware when @sentry/nextjs tunnelRoute is set on a webpack build. Who is affected, and the fix.