NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · npm

GHSA-673q-mjm6-r5xr: Next.js: Unauthenticated Remote Code Execution in `use cache` functions returning typed arrays

criticalCVSS 4.0 9.5

Next.js 16.0.0 through 16.4.0 has a critical unauthenticated remote code execution flaw in App Router apps that use Cache Components. It applies when a `use cache` function returns multiple typed arrays. Upgrade to next 16.4.1. The advisory names no workaround.

Published Oct 22, 2026 · Analysis Oct 22, 2026

What an attacker can do

The advisory is short. It says an application using the App Router with Cache Components can be taken over remotely when it has a use cache function that returns multiple typed arrays. The weakness class is deserialization of untrusted data (CWE-502), and the CVSS 4.0 vector is network-reachable with no privileges and no user interaction. It lists high impact on confidentiality, integrity and availability, and the AT:P element means some deployment-specific precondition must be present, here the vulnerable use cache pattern.

The advisory does not describe the payload or the exact parsing step. The linked fix commit is titled "Improve Server Component transport protocol" and updates the vendored react-server-dom-* packages inside Next.js, which suggests the flaw lives in how data is serialized between server and client. That reading is an inference from the commit, not a statement in the advisory.

Practically, an unauthenticated attacker who can reach a vulnerable app over HTTP could run code in the server process. That gives access to environment variables, database credentials, API keys and anything the Node process can read. The vendor says to upgrade even if you have no function matching the pattern.

Who is affected

next from 16.0.0 up to and including 16.4.0, in App Router projects with Cache Components enabled. Pages Router-only apps and 15.x are outside the listed range.

npm ls next

Check the next entry in your lockfile too, and confirm what your deployed build actually contains, since a container image may lag the repo.

next

Ecosystem
npm
Affected
>= 16.0.0, <= 16.4.0
Fixed in
16.4.1
Check
npm ls next

How to fix it

Upgrade to next 16.4.1:

npm install [email protected]

Rebuild and redeploy. The advisory states that there is no known workaround for affected applications and that you should upgrade immediately even if your code has no matching use cache function. If you cannot deploy right away, reduce exposure by limiting access to the app at the network edge, though the advisory does not offer that as a fix. Rotate secrets reachable from the server process if you suspect compromise.

How to tell if you were hit

The advisory lists no indicators. Search your code for "use cache" directives and check which of those functions return typed arrays such as Uint8Array or Float32Array. Review server logs for unexpected requests to routes that render cached components, unexpected child processes spawned by the Node process, outbound connections from the app host, and new files in the deploy directory.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Impact

A vulnerability in applications using App router with Cache Component can lead to remote code execution. The application needs to have a use cache function that returns multiple typed arrays.

Workaround

There is no known workaround for affected applications with such use cache functions. You should upgrade immediately even if your application does not have similar functions.

Credited to evolutionstorm.

Questions

Is my Next.js 15 app affected?

The advisory lists only 16.0.0 through 16.4.0. Versions outside that range are not named as vulnerable, but check the Next.js release notes for your line.

Does it need authentication?

No. The advisory title says unauthenticated, and the CVSS vector has no privileges or user interaction required.

Is there a CVE or a workaround?

The advisory has no CVE id or CWE assigned in the page we read, and it says no workaround is known. The fix is next 16.4.1.

Is it exploited in the wild?

The advisory does not say. It is not in CISA's KEV catalog as far as this entry's data shows.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More npm vulnerabilities

All npm entries