Skip to content
RCE Write-up Advanced

Critical Security Vulnerability in React Server Components

A flaw in how React decodes payloads sent to React Server Function endpoints allowed an unauthenticated attacker to craft a malicious HTTP request that, when deserialised by React, achieved remote code execution on the server. The vulnerability affected React Server Components packages and frameworks that depend on them.

react.dev

Published on react.dev

There is an unauthenticated remote code execution vulnerability in React Server Components.

The author, on react.dev

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 a deserialisation flaw in React's handling of payloads sent to React Server Function endpoints, allowing attacker-controlled data to be interpreted as executable code.

Impact

An unauthenticated attacker could achieve remote code execution on any server running an affected React Server Components setup, even if the app did not implement its own Server Function endpoints.

What the attacker needed

App uses React Server Components; app uses affected React versions; no authentication needed

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 web app run on the server. A mistake in the code that turns incoming requests back into function calls meant an attacker could send a specially crafted request and run their own code on the server, without needing to log in. This is called remote code execution and is one of the most serious kinds of bug.

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.