Skip to content
RCE Write-up Advanced

CVE-2025–55182 (React2Shell) — Complete Bug Bounty Huntin

An unsafe deserialisation flaw in React Server Components' Flight protocol allows unauthenticated attackers to execute arbitrary JavaScript on the server via prototype pollution and access to the Function constructor. This leads to remote code execution.

Abhishek meena Follow

Published on medium.com

Free Read : Here

Abhishek meena, 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

The Flight protocol deserialiser uses bracket notation that traverses the prototype chain and allows access to the Function constructor, enabling arbitrary code execution.

Impact

Unauthenticated attackers could execute arbitrary code on the server, leading to full compromise, and the vulnerability has been actively exploited in the wild.

What the attacker needed

Application uses React 19.x with Server Components; Next.js 15.x/16.x with App Router; React Server Function endpoints exposed

The fix

The vulnerability was fixed by updating React Server Components and Next.js to patched versions.

How it was found

  1. Craft a malicious multipart/form-data payload.
  2. Inject prototype pollution via a special property name.
  3. Set a fake form data getter to the Function constructor.
  4. Trigger deserialisation with malicious code.
  5. The server executes the attacker's code as a function call.

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 use a special data format called Flight to send information between the browser and the server. The server trusts this data too much and processes it in a way that lets an attacker sneak in instructions to run their own code on the server. This means someone can take over the server without needing a password.

What is RCE?

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

More by Abhishek meena

View all

4 more disclosed reports, best first.

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.