Critical PHP and Node.js flaws php2shell + node2shellTest my domain
ReactNext.jsServer ComponentsRCECVEVulnerability

CVE-2026-126187: remote code execution in React Server Components

CVE-2026-126187 (CVSS 9.5): a flaw in the Flight protocol of React Server Components, fixed in React 19.3.1 and Next.js 16.4.1. Patch analysis, versions, test.

by 19 min read
CVE-2026-126187: remote code execution in React Server Components

Background

On 14 October 2026, the React team released four fixed versions of its react-server-dom-* packages, together with a security advisory rated critical (GHSA-xqc2-xf4c-x3h3). The advisory describes unauthenticated remote code execution in React Server Components.

For almost four weeks, that advisory only existed in the React repository. It reached the GitHub Advisory Database on 10 November, when it was assigned CVE-2026-126187. The NVD record was published the same day at 23

UTC.

That gap has a practical consequence. Tools that rely on this database, Dependabot and npm audit first among them, had nothing to report before 10 November. A dependency audit that came back clean in late October says nothing about this flaw.

The advisory states that the flaw only triggers in "extremely rare cases". We wanted to know what that caveat covers. We compared the packages published before and after the fix, then reproduced the defect in a lab. This article reports on that work and separates what we verified from what rests on the advisories alone.

Technical summary

ItemValue
IdentifierCVE-2026-126187, assigned by GitHub on 10 November 2026; React advisory GHSA-xqc2-xf4c-x3h3 of 14 October
ComponentFlight protocol of React Server Components, packages react-server-dom-webpack, -turbopack, -parcel
ClassCWE-502, deserialization of untrusted data (GitHub's classification)
CVSS 4.09.5, vector AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:N (GitHub). NVD record in "Received" status
Affected versions19.0.0 to 19.0.8, 19.1.0 to 19.1.9, 19.2.0 to 19.2.8, 19.3.0
Fix19.0.9, 19.1.10, 19.2.9, 19.3.1, published on npm on 14 October 2026 between 16
and 16
UTC
Related advisoryNext.js GHSA-673q-mjm6-r5xr, use cache functions returning typed arrays, fixed in 16.4.1
DiscoveryGitHub account evolutionstorm, credited by both React and Vercel
ExploitationNone reported as of 11 November; not in the KEV catalog (10 November release)

The CVSS vector carries AT:P: the attack depends on a condition specific to the target. This is how the advisory's caveat about "extremely rare cases" is expressed in the score.

It also carries SC:H and SI:H, meaning a high impact on neighbouring systems. A rendering server usually holds the application secrets, along with access to the database and to internal APIs.

We read this score as that of a serious but conditional flaw. On an application that meets the condition, we would treat it as critical. On the others, the upgrade still needs to happen quickly, without crisis-level urgency. We describe this way of sorting in our article on vulnerability prioritization.

Affected systems

Applications that run React Server Components on a server with an affected version of the react-server-dom-* packages are affected. In practice this means Next.js with the App Router first, then the other frameworks that bundle these packages: the RSC mode of React Router, Waku, and the RSC plugins for Parcel and Vite.

The React advisory explicitly rules out two cases:

  • applications whose React code does not run on a server (single-page applications served as static files);
  • applications that use no framework, bundler or bundler plugin supporting React Server Components.

A Next.js application served only by the Pages Router does not use Server Components and falls under the second case.

Next.js

Next.js does not use the react package installed by the application for its Server Components. It bundles its own copy, compiled into next/dist/compiled. Upgrading react in package.json therefore fixes nothing: the Next.js version is what matters.

Vercel published its own advisory, GHSA-673q-mjm6-r5xr, on 14 October. It covers App Router applications that use Cache Components, and more precisely a use cache function returning several typed arrays. It gives the range 16.0.0 to 16.4.0 and the fix in 16.4.1.

We compared the contents of the next packages published on npm. Between 16.4.0 and 16.4.1, 150 files differ. Seventy-seven belong to the bundled copy of React, and the others only change by the version number. The Next.js fix is therefore the React fix, nothing more.

Next.js branchStatus
16.4Fixed from 16.4.1 (16.4.6 at the time of writing)
16.0 to 16.3In the advisory range, no backport published: move to 16.4
15.5Bundled React fixed from 15.5.28 (15.5.29 at the time of writing)
15.0 to 15.4Bundled React unpatched, last published in January 2026: end-of-life branches
14 and earlierReact 18, outside the advisory range

How it works

The advisories do not describe the cause of the defect. The pull request for the fix is titled "Improve transport protocol", and the issues it references live in a private repository. What follows comes from our reading of the npm packages 19.2.8 and 19.2.9, compared file by file.

Transporting typed arrays

Flight is the protocol a React server uses to transmit the result of Server Components. The stream is a sequence of rows, each identified by a number. Most are text terminated by a newline.

Typed arrays (Uint8Array, Float32Array and the others) are the exception. They travel as binary, preceded by a header announcing their size:

1:o1000,<4096 raw bytes>

The decoder reads the header, then consumes exactly the announced number of bytes, whatever they are. It then resumes reading row by row. Everything depends on that size being accurate.

The detached buffer

To avoid a copy, the Flight server wrote arrays larger than 2,048 bytes straight into the output stream. When that stream is a Web byte stream (a ReadableStream of type bytes), enqueuing an array transfers its underlying buffer. The original buffer then becomes "detached": its length drops to zero.

The problem appears when two arrays are two views over the same ArrayBuffer. This is common in JavaScript, for instance to slice a buffer into several fields. Writing the first view detaches the buffer, and the second view ends up empty.

The code before the fix silently skipped zero-length chunks. The header of the second view, however, had already been emitted with the original size. The stream therefore announces 4,096 bytes and contains none.

The desynchronization

The decoder then takes the following bytes of the stream as the array contents. They are in fact the next rows. Once the count is reached, it resumes parsing wherever it stands, that is, in the middle of some other piece of data.

If the response contains an attacker-supplied value, placed at the right spot and of the right length, the decoder can resume reading inside that value. It then interprets as protocol rows a text the application believed it was transporting as plain data.

This is the advisory's condition, read from the code: several typed arrays, and an attacker-controlled value. It also explains the deserialization classification. The attacker does not send a Flight stream to the server, they arrange for the server to produce one that decodes wrongly.

Kill chain

From a visitor-supplied value to the interpretation of Flight rows

  1. 1

    Two views over one buffer

    the application code returns several typed arrays larger than 2,048 bytes sitting on the same ArrayBuffer.

  2. 2

    Buffer transfer

    writing the first view into the byte stream detaches the buffer, the second view drops to zero bytes.

  3. 3

    Header without content

    the row of the second view announces its original size and is followed by no bytes.

  4. 4

    Shifted read

    the decoder consumes the following rows as binary, then resumes parsing in the middle of an attacker-supplied value.

  5. Injected rows

    the attacker's text is interpreted as protocol rows, with whatever they can reference on the server.

The first three steps are reproduced in our lab on 19.2.8. The last two follow from reading the fix and the advisory: we neither wrote nor looked for exploit code.

What the fix changes

The fix acts in three places.

On the emitting side, partial views larger than 2,048 bytes are now copied before being written. A view that spans its whole buffer is still transferred without a copy. And an empty chunk whose buffer is detached no longer passes silently, it throws an explicit error:

Cannot transport a detached buffer. This usually happens when trying to
transport multiple buffer-spanning views on the same underyling buffer.

This check relies on ArrayBuffer.prototype.detached, which Node.js lacks before version 21. On an environment that does not provide it, React always copies and prints a warning that itself mentions a possible security issue.

On the decoding side, the fix removes footholds from an attacker who would still manage to inject rows. A model can no longer place a function under the then key, which triggered its automatic invocation. The internal object representing the response is no longer reachable from the data, it is stored behind a symbol. Server function references are validated more strictly.

Finally, the same batch rewrites how form fields received by the server are stored. This part most likely matches the second advisory published the same day, GHSA-h3gv-c5rc-p453, a denial of service rated 8.2 on Server Function endpoints. The same four versions fix both.

What we reproduced

We installed react-server-dom-webpack 19.2.8, then 19.2.9, in two containers. The test renders an object holding two 4,096-byte Uint8Array values, sitting on a single 8,192-byte buffer, then inspects the resulting stream.

Measure19.2.819.2.9
Announced size, first view4,096 bytes4,096 bytes
Announced size, second view4,096 bytes4,096 bytes
Bytes actually emitted, second view04,096
Total stream size4,215 bytes8,312 bytes
Read back by the Flight clientFails, "Connection closed"Correct

On 19.2.8, the second row announces 4,096 bytes and carries none. In our test, which contains nothing else, the decoder waits for bytes that never arrive and gives up. The result is an error, not code execution.

Three clarifications that matter when assessing the real risk.

The defect shows with the Node build of the Flight server. In 19.2.8 as published on npm, the Edge build already copied large arrays. That is not the case in the copy of React bundled by Next.js 16.4.0, where neither build copies.

A Node.js Buffer is not concerned. Flight does not transport it as a typed array, it serializes it differently. The memory pool Node.js shares between small Buffer instances is therefore not enough to meet the condition.

We also wrote a Next.js 16.4.0 page with a use cache function returning two views over one buffer and a string taken from the URL. The page renders correctly, with no visible corruption. The exploitable path in Next.js therefore requires something beyond this naive pattern, which neither the advisories nor our reading document.

We stopped there. Going from a desynchronized stream to code execution means building the rows to inject, and that is an attacker's job. Our takeaway is that the cause is real and reproducible at the React level, and that the advisory's caveat about rarity is well founded.

Checking an application

The version to look at depends on the framework.

For Next.js, it is the version of next:

npm ls next

The fix can also be checked directly in the bundled copy, which avoids relying on a number:

grep -rl "Cannot transport a detached buffer" \
  node_modules/next/dist/compiled/react-server-dom-*/cjs | head -1

A line of output means the fix is present. No output on a 15 or 16 version means it is missing.

For other frameworks, it is the version of the packages themselves, to be read in the lockfile and not only in package.json:

npm ls react-server-dom-webpack react-server-dom-turbopack react-server-dom-parcel

To estimate real exposure, look for places where server code returns typed arrays through Server Components: use cache functions, Server Functions, props passed to client components. The risky case is several views created over one buffer, such as new Uint8Array(buffer, start, length).

This search helps prioritize, it does not replace the upgrade. Vercel recommends upgrading even without such a function.

Remediation

  1. Next.js 16: move to 16.4.1 or later. Branches 16.0 to 16.3 have no fixed version.
  2. Next.js 15: move to 15.5.28 or later. Branches 15.0 to 15.4 are end of life, moving up to 15.5 is the only path.
  3. Other RSC frameworks: move react-server-dom-* to 19.0.9, 19.1.10, 19.2.9 or 19.3.1 depending on the branch, forcing the version through overrides if the framework is slow to raise it.
  4. Rebuild and redeploy. The fixed code is compiled into the application: updating the lockfile without a new build changes nothing in what runs.
  5. Rerun dependency audits (npm audit, Dependabot, your composition analysis tool) and treat those from before 10 November as unverified.

There is no documented workaround. Until the upgrade, the only measure we see is to copy typed arrays before returning them (view.slice()), which removes buffer sharing. That is exactly what the fix does, and applying it by hand across a codebase is not realistic beyond a few functions.

The same fix closes the denial-of-service advisory. That one depends on no code pattern: any application exposing Server Functions is concerned. It is reason enough not to postpone the upgrade on the grounds that the CVE-2026-126187 condition is not met.

Timeline

The fixed versions of React and Next.js came out the same day, less than an hour apart. Coordination between the two teams worked.

The weak point came afterwards. The React release notes only mention a "transport protocol improvement", without the word security. The advisory existed, but only in the React repository. According to Brandefense, a query against GitHub's global database still returned nothing on 8 November.

Those who follow React advisories at the source had the information on 14 October. Those who rely on their tooling had it on 10 November, twenty-seven days later.

Timeline

Timeline of CVE-2026-126187

Fix

  1. 14 October 2026, 16

    React 19.3.1, 19.2.9 and 19.0.9

    published on npm, followed by 19.1.10 at 16. Advisories GHSA-xqc2-xf4c-x3h3 and GHSA-h3gv-c5rc-p453.

  2. 14 October 2026, 17

    Next.js 15.5.28

    first version of the 15 line to carry the fix.

  3. 14 October 2026, 17

    Next.js 16.4.1

    advisory GHSA-673q-mjm6-r5xr on use cache functions.

Blind spot

  1. 3 November 2026

    Next.js 16.4.5 and 15.5.29

    maintenance releases, with no mention of the React advisory.

  2. 8 November 2026

    Advisory missing from the global database

    noted by Brandefense, Dependabot and npm audit do not flag it.

Indexing

  1. 10 November 2026

    CVE-2026-126187

    the advisory enters GitHub's database, the NVD record is published at 23.

  2. 11 November 2026

    No exploitation reported

    not in the KEV catalog, no public exploit code.

Times in UTC, taken from the npm registry for package publications.

The React2Shell precedent

CVE-2026-126187 arrives eleven months after React2Shell (CVE-2025-55182), rated 10 and disclosed on 3 December 2025. Both affect the Flight protocol, but in opposite directions.

React2Shell concerned the data the server receives. A single request, with no condition on the application side, was enough to run code. It was exploited within days, and CISA added it to its catalog on 5 December 2025, with known use by ransomware.

CVE-2026-126187 concerns the data the server emits, and depends on the application code. It does not have the same potential for mass exploitation. An attacker first has to find an application that meets the condition, which cannot be seen from outside.

The comparison remains useful for one reason. Applications that have not been upgraded since December 2025 carry both flaws, and React2Shell is the one that exposes them most. On an old 15 branch or a 16.0, that is the priority.

Detection from outside

No harmless probe can test CVE-2026-126187 remotely. The trigger is in the application code. And the affected versions of Next.js validate an action identifier before decoding anything, so an anonymous request does not reach the code at fault.

What remains is the version. Next.js writes it into one of its public JavaScript files, as window.next = { version: "16.4.0" }. Any browser loading the page receives it. Reading it is enough to know whether the fix is present.

We added this read to our free tools. The React / Next.js scan reads the version your application publishes and situates it against CVE-2026-126187. It also checks React2Shell, using the harmless check published by Assetnote: a request carrying an invalid reference, whose response is observed, and which runs no code.

A version number is not enough. A site exported as static files publishes the same JavaScript files, hence the same number, while no React code runs on a server there. Our tools therefore only report a version when a Next.js server actually answers. It is recognised by its headers or, when a proxy strips them, by its answer to the router's requests.

We published the matching Nuclei templates and benchmarked them against ten targets running in Docker. The range of Vercel's advisory is rated high there, the 15 line medium.

TargetCVE-2026-126187React2Shell
Static site (nginx)No findingNo finding
Next.js 14.2.35Out of rangeOut of range
Next.js 15.0.4Bundled React unpatchedConfirmed
Next.js 15.5.27Bundled React unpatchedPatched
Next.js 15.5.29Fix presentPatched
Next.js 16.0.6Version in rangeConfirmed
Next.js 16.4.0Version in rangePatched
Next.js 16.4.1Fix presentPatched
Next.js 16.4.0 exported as static files (nginx)No findingNo finding
Next.js 16.4.0 behind a proxy hiding the headersVersion in rangePatched

These results have two limits, which the tool restates in its answers. For CVE-2026-126187, a version in range situates a missing fix, it does not prove the application is exploitable. And an application that serves its JavaScript files from another domain does not reveal its version to this read.

This check only covers the applications you know about. On the day of an advisory like this one, the harder part is usually knowing where Next.js runs in the company, including marketing sites, exposed internal tools and forgotten staging environments. That list is built beforehand, by inventorying your external attack surface continuously.

Frequently asked questions about CVE-2026-126187

What is CVE-2026-126187?

A flaw in React Server Components, rated 9.5 under CVSS 4.0. The React server can emit a malformed stream when a response contains several typed arrays sharing the same memory buffer. If the response also contains an attacker-supplied value, decoding that stream can lead to code execution.

Is my React application affected?

Only if it runs React Server Components on a server, with react-server-dom-webpack, -turbopack or -parcel between 19.0.0 and 19.0.8, 19.1.9, 19.2.8 or 19.3.0. A single-page application served as static files is not affected, nor is a Next.js application that only uses the Pages Router.

Which Next.js version fixes the flaw?

16.4.1 for the 16 line, and 15.5.28 for the 15 line. Branches 16.0 to 16.3 and 15.0 to 15.4 received no fixed version. Next.js 14 and earlier rely on React 18 and are outside the advisory range.

Is upgrading the react package enough?

Not for Next.js, which bundles its own copy of React for Server Components. You need to upgrade next, then rebuild and redeploy the application. For other frameworks, the react-server-dom-* packages are the ones to raise.

Is the flaw being exploited?

No exploitation has been reported as of 11 November 2026. The flaw is not in CISA's KEV catalog and no exploit code is public. The fix, however, has been public since 14 October, and reading it gives the cause of the defect.

Why did my dependency audit report nothing?

Because the advisory only reached the GitHub Advisory Database on 10 November 2026, four weeks after the fix. Dependabot and npm audit rely on that database. An audit run before that date could not see the flaw.

How does it differ from React2Shell?

React2Shell (CVE-2025-55182) is exploitable with a single request on any vulnerable application, and has been massively exploited since December 2025. CVE-2026-126187 depends on a code pattern specific to the application. Both are fixed by an upgrade, and the most recent fixed version closes both.

Sources

Let’s discuss your external exposure

Request a personalized Flawfence demo and discover your real exposure level.