React2Shell Shows Us Why JavaScript On The Server Was A Mistake
React's Flight protocol deserialised user-supplied JSON-like data into arbitrary JavaScript objects, and an object with a 'then' property could trigger code execution when awaited. An attacker could achieve remote code execution on servers running React Server.
medium.com
Published on medium.com
A recent vulnerability called ‘React2Shell’ (CVE-2025–55182) has been all over the internet. Even the Government of Canada posted about it.
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 deserialised untrusted input into live JavaScript objects rather than plain data, allowing a 'then' property to be treated as executable code when awaited.
Impact
An attacker could achieve remote code execution; the text notes it was exploited within two days and that Cloudflare tried to block exploitation, though the fix caused an outage.
What the attacker needed
Server runs React Server; attacker can send Flight data
The fix
The text says it was patched, and argues that only built-in JSON deserialisers should be used for untrusted data.
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 lets a browser send data to the server, and the server turns that data back into JavaScript objects. The mistake was that it could create objects with special properties that JavaScript treats as instructions, so an attacker could make the server run their code. This is called remote code execution, meaning someone else can run commands on your machine.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.