Critical React RSC Flaw Enables Unauthenticated RCE
Zusammenfassung
Pixel’s announcement covers CVE-2026-126187, a critical unauthenticated remote code execution flaw in React Server Components’ Flight protocol, rated CVSS 9.5. It details affected React versions, fixed releases, and how the issue can chain with Next.js Cache Components—important information for developers securing their applications.
DEV Community
[CVE-2026-126187] — Unauthenticated RCE in React Server Components' Flight Protocol
At a glance Item Details CVE / GHSA CVE-2026-126187 / GHSA-xqc2-xf4c-x3h3 CWE CWE-502 (Deserialization of Untrusted Data) CVSS 4.0 9.5 (Critical) — AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:N Affected packages react-server-dom-webpack, react-server-dom-parcel, react-server-dom-turbopack Affected versions 19.0.0–19.0.8, 19.1.0–19.1.9, 19.2.0–19.2.8, 19.3.0 Fixed versions 19.0.9, 19.1.10, 19.2.9, 19.3.1 (disclosed 2026-11-10, patch merged 10/14) Public PoC briskets/CVE-2026-126187-poc (lab: Next.js 16.4.0 / React 19.3.0 / Node 22) A vulnerability in Flight, the wire protocol behind React Server Components (RSC), lets attacker-controlled bytes break the protocol's own framing and smuggle in an arbitrary module reference disguised as data. Combined with Next.js 16's Cache Components (use cache), this chains into unauthenticated remote code execution on the server. React's own advisory calls the trigger condition "extremely rare cases — responses that transport multiple typed arrays and an attacker-controlled value," but in practice Node.js's default 8 KiB buffer pool makes this condition more common than the wording suggests. 1. How the Flight protocol works RSC doesn't render a screen and send it all at once — it streams the result as a sequence of rows. This stream can carry far more than JSON: Promises, module references, Server Function references, Blobs, and typed arrays, all as "live" JavaScript concepts. That expressiveness is the whole point of Flight's design. Rows come in a few flavors: 1:I["victim-module",[],"*"]
2:o4,ABCD
0:{"msg":"hello","mod":"$1","ta":"$2"}
Text rows (0:{...}) — newline-terminated JSON. Sigil-prefixed strings like $1 or $2 point at other rows (ids 1 and 2). Module reference rows (1:I[...]) — tell the client to resolve an actual module through the bundler. In a webpack build, this ends in webpack_require(id), and that module runs. Binary rows (2:o4,ABCD) — o is the type tag (Uint8Array), 4 is the hex-encoded byte length, and ABCD is the payload. The parser consumes exactly that many bytes as data, no questions asked. There's no delimiter like a newline — the declared length is the boundary. The critical point: module reference rows get executed; binary rows get consumed. If the boundary between the two ever slips, bytes that were supposed to be inert data can masquerade as an executable row instead. Next.js 16's Cache Components feature adds a new trust boundary on top of this. A function marked "use cache" has its return value serialized through this same Flight format, stored in a cache entry, and later deserialized back inside the Node.js server process on subsequent requests. The server is parsing something it wrote itself — except part of that data came from the requester. 2. Root cause — a header that promises bytes that no longer exist The mechanism sits at the intersection of ArrayBuffer detach semantics and the Web Streams API. A single ArrayBuffer can back multiple typed-array views. But a byte stream transfers — and thereby detaches — the entire ArrayBuffer of every chunk it receives. The patch commit's own comment spells this rule out explicitly. The vulnerable serialization code looked roughly like this: // 19.2.8 (vulnerable) — simplified typedArrayToBinaryChunk
function typedArrayToBinaryChunk(content) {
return new Uint8Array(content.buffer, content.byteOffset, content.byteLength);
// No copy! This view still points at the original shared buffer.
}
Any typed array larger than 2048 bytes (VIEW_SIZE) gets wrapped in a view over the original buffer, with no copy, and written straight to the destination. The trouble starts when two large views share one buffer. Example: an 8192-byte ArrayBuffer shared by two 4096-byte views
view A (offset 0–4095) → write(A) → entire buffer is detached
view B (offset 4096–8191) → B.byteLength is now 0 (buffer is empty)
Instrumenting the write path during serialization confirms it: 19.2.8 (vulnerable): write: byteLength=4096 ...

Powered by Readybot.io