CVE-2025–55182 — React Server Components RCE
The React Flight Protocol used by Next.js and React Server Components mishandles attacker-supplied multipart form data, allowing a remote attacker to execute arbitrary code on the server. The attacker chains prototype traversal, a fake chunk with a circular reference, and abuse of the $B Blob handler to reach the Function constructor.
medium.com
Published on medium.com
This is a critical security vulnerability in the React Flight Protocol (used by Next.js and React Server Components). It allows a remote attacker to execute arbitrary code (RCE) on the server.
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 parser trusted string property names from untrusted input, allowing traversal of the object prototype chain and abuse of internal handlers such as the $B Blob handler to reach the Function constructor.
What the attacker needed
Target runs vulnerable React/Next.js; attacker can send multipart form data; no authentication stated
The fix
React 19.2.1+ and Next.js 15.0.5+ were fixed by using Symbols instead of string property names and adding strict hasOwnProperty checks to prevent prototype traversal.
How it was found
- Send a multipart form request containing a fake chunk (a JSON object).
- Include a circular self-reference so React treats the object as a Thenable using the real Chunk.prototype.then.
- Include a $B reference so React tries to handle it as a Blob.
- Cause the $B handler to call _formData.get, which the attacker has pointed at the Function constructor, executing attacker code.
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 a server send data to the browser in a special format called the Flight Protocol. A flaw in how that data is parsed lets an attacker send a crafted form that tricks the server into running code the attacker chose. In plain terms, a stranger can make the server run their commands.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.