React2Shell(CVE-2025–55182): A Technical Deep Dive
React's Flight protocol deserialiser for server actions did not verify that the entry chunk was an array, so an attacker could send a crafted multipart payload whose chunk was an object with a then property. By chaining prototype references and a poisoned _response object, the attacker could reach the Function constructor and run arbitrary JavaScript on the server without authentication.
In this blog, we analyze a critical 10.0‑severity vulnerability affecting the server‑side use of React.js, tracked as CVE‑2025‑55182 an unauthenticated Remote Code Execution flaw in the React Server Components (RSC) “Flight” protocol caused by insecure deserialization within the RSC payload handling logic.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the reply decoder assumed the first chunk was an array of arguments and never validated it, letting an attacker-supplied object with a then property be awaited and drive internal chunk initialisation with an attacker-controlled _response context.
Impact
An unauthenticated attacker could execute arbitrary operating system commands as the Node.js process, limited only by that process's permissions.
What the attacker needed
Network access to a vulnerable Next.js server; no authentication required
The fix
The Flight reply server was patched to validate the incoming chunks, mirroring fixes already applied on the client side.
How it was found
- Send a multipart form request to the server action endpoint with a crafted first chunk.
- Make the first chunk an object with a then property pointing at the real Chunk.prototype.then.
- Set status to resolved_model and supply a value containing a Blob reference.
- Poison the _response object with a malicious _prefix and a _formData.get pointing at the Function constructor.
- The server awaits the object, calls the hijacked then, and reaches the Blob handler.
- The Function constructor is invoked with the attacker's code and executes it.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
When a web page uses React on the server, the browser sends data back in a special serialised format. The server code that unpacked this data trusted its shape and could be tricked into treating attacker data as a JavaScript function, which then ran on the server. That means someone with no login could run their own commands on the machine.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.