What React2Shell taught me about Server Components
On December 3, 2025, the React team disclosed CVE-2025-55182, soon nicknamed React2Shell. It was rated CVSS 10.
On December 3, 2025, the React team disclosed CVE-2025-55182, soon nicknamed React2Shell. It was rated CVSS 10.0, the maximum: anyone could run code on a server that used React Server Components, without logging in, with a single HTTP request. Within days it was being exploited in the wild, and CISA added it to its list of known exploited vulnerabilities on December 5.
Two months and several follow-up advisories later, it’s a good time to look at what actually happened and what it means for how we build with Server Components.
What went wrong
Server Components and Server Functions talk to the browser using React’s own wire format, often called the Flight protocol. When the browser calls a Server Function, it sends a serialized payload, and React on the server decodes it back into arguments.
That decoding step was the problem. A crafted payload could make the server deserialize it in an unsafe way and end up running attacker-controlled code. Because this happens before your function runs, none of your own checks matter. Authentication, validation, rate limiting in the function body: the attacker never gets that far.
Two details made it worse:
- You didn’t have to use Server Functions to be affected. If your app supported Server Components at all, the endpoint that decodes these payloads was there.
- You might not see React in your dependency list. Frameworks like Next.js ship their own copy of the React server packages inside the framework. npm ls react-server-dom-webpack could show nothing while the vulnerable code was in production. The fix was upgrading the framework, not React.
Who was affected
The vulnerable packages were react-server-dom-webpack, react-server-dom-parcel and react-server-dom-turbopack, versions 19.0.0, 19.1.0, 19.1.1 and 19.2.0. Through them: the Next.js App Router (15.x and 16.x), React Router’s unstable RSC APIs, Waku, Redwood SDK, and the RSC plugins for Vite and Parcel.
If your React app only runs in the browser, or uses classic server-side rendering without Server Components, it wasn’t affected.
It didn’t end with one patch
The first fix went out on December 3 as 19.0.1, 19.1.2 and 19.2.1. Then, as researchers looked closely at the same code, more issues came out:
| Date | Advisory | Impact |
|---|---|---|
| Jan 26, 2026 | CVE-2026-23864 | Denial of service (crash, memory or CPU) via crafted requests. Fixed in 19.0.4, 19.1.5 and 19.2.4. |
| Dec 11, 2025 | CVE-2025-67779 | A second denial-of-service case, found after the first DoS patch. |
| Dec 11, 2025 | CVE-2025-55184 | Denial of service: a request could put the server in an infinite loop. |
| Dec 11, 2025 | CVE-2025-55183 | Source code exposure: some Server Functions could be tricked into returning their own source. |
| Dec 3, 2025 | CVE-2025-55182 | Remote code execution (React2Shell). |
That means anyone who patched once in December and stopped there was still exposed to the later issues. As of now, you want 19.0.4, 19.1.5, 19.2.4 or later, or the framework release that includes them.
What I took away from it
A Server Function is a public HTTP endpoint. It looks like a function call in your code, but anyone can call it with any payload, in any order, without using your UI. React2Shell was a bug in React itself, but the same mindset applies to your own code: validate every argument and check permissions inside every Server Function, as you would in a REST handler.
'use server';
import { z } from 'zod';
export async function deleteProject(projectId: unknown) {
const session = await getSession();
if (!session) throw new Error('Not signed in');
const id = z.string().uuid().parse(projectId);
const project = await db.project.findUnique({ where: { id } });
if (project?.ownerId !== session.userId) throw new Error('Not allowed');
await db.project.delete({ where: { id } });
}
The parameter type is unknown on purpose. TypeScript types don’t exist at runtime, and the caller isn’t necessarily your client code.
Don’t hard-code secrets in source. The source exposure bug (CVE-2025-55183) could only leak what was written in the code. Keys read from process.env at runtime weren’t exposed. That was already good practice, and this made it concrete.
Know what you’re actually running. “We’re on React 19.2.x” wasn’t enough information. What mattered was which framework version you deployed and which React build it bundled. Tools like Dependabot or npm audit flagged the framework advisories, but only for teams that act on them quickly.
Patch on a schedule you can speed up. The first fix shipped the same day as the disclosure, and exploitation followed within days. Teams that could deploy a dependency update in an hour were fine. Teams with a two-week release train had a bad week. Hosting providers rolled out firewall rules as a stopgap, but the React team was clear that those were not a fix.
More server surface means more server risk. Server Components move work from the browser to your server, and that’s still a good trade for many apps. But every feature that accepts input on the server is something to keep patched and to think about as an attacker would. This was the first critical RSC vulnerability. It’s unlikely to be the last.