Skip to content
RCE Write-up Advanced

How React got hacked

A critical vulnerability in React Server Components (React2Shell) allowed unauthenticated remote code execution via the Flight protocol deserialization. An attacker could send a malicious payload to execute arbitrary code on the server.

medium.com

Published on medium.com

On December 3, 2025, a critical vulnerability with a CVSS score of 10.0 in React Server Components (RSC), also known as React2Shell, was disclosed. This flaw allowed unauthenticated actors to execute code remotely in React versions 19.0, 19.1.0, 19.1.1, and 19.2.0.

Alexandre C. Santos, on medium.com

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 Flight protocol deserialization trusted client-supplied data and allowed access to internal objects and the Function constructor, enabling prototype pollution and code execution.

Impact

An unauthenticated attacker could execute arbitrary code on the server, leading to full compromise.

What the attacker needed

React Server Components enabled; No authentication required

The fix

The vulnerability was fixed in React versions after 19.2.0, as implied by the affected versions listed.

How it was found

  1. Identify a React application using React Server Components and the Flight protocol.
  2. Craft a malicious Flight protocol payload that injects internal properties like status, _response, and then.
  3. Send the payload to the server, exploiting the deserialization process to access the Function constructor.
  4. Use the Function constructor to execute arbitrary code on the server.

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.

React Server Components let parts of a website run on the server instead of in your browser. A bug in how the server processed data sent from the browser allowed an attacker to run their own code on the server without logging in. This is called remote code execution and is very serious.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.