The cybersecurity landscape shifted significantly in late 2025 following the discovery of a critical vulnerability within the React framework’s modern architecture. Designated as CVE-2025-55182 and colloquially termed "React2Shell," the flaw represents a watershed moment for front-end security, achieving a rare CVSS 10.0 rating. This vulnerability targets the React Flight protocol, a custom streaming mechanism used by React Server Components (RSC) to transmit interactive user interfaces from the server to the client. Unlike traditional vulnerabilities that target specific logic errors, React2Shell exposes a structural weakness in how modern frameworks deserialize executable behavior, allowing unauthenticated attackers to achieve remote code execution (RCE) via a single crafted HTTP request.
The Architecture of the Flight Protocol
To understand the severity of React2Shell, one must first examine the underlying technology it subverts. React Server Components do not utilize standard HTML or JSON for their wire format. Instead, they rely on "Flight," a line-delimited, streaming protocol designed to transport a mix of UI structure, module references, and asynchronous state. When a server component renders, the Flight protocol generates a series of "rows" that the client-side React runtime processes in real-time.
Each row in a Flight payload follows a specific syntax: <ROW_ID>:<ROW_TAG><PAYLOAD>. These tags define the nature of the data:
- J (JSON Tree): Serialized virtual DOM nodes and component props.
- M (Module) & I (Import): Metadata and instructions for loading specific client-side chunks.
- HL (Hint/Preload): Instructions for preloading CSS or fonts.
- D (Data): Environmental and server-rendered context.
- E (Error): Serialized exceptions.
The complexity—and the eventual vulnerability—lies in the prefix system. When the client-side parser encounters a string starting with a dollar sign ($), it triggers specialized resolution logic. For instance, $F represents a callable Server Action (an RPC endpoint), while $: facilitates property access. This system allows the protocol to reconstruct complex, nested objects and behavior on the fly. Security researchers have identified this as a classic "deserialization sink," where data from an untrusted source dictates the execution path of the application.
Chronology of Discovery and Exploitation
The timeline of React2Shell highlights the rapid transition from theoretical research to state-sponsored weaponization.
- December 3, 2025: The React team and Vercel issue an emergency security advisory regarding CVE-2025-55182. The initial report describes a flaw in the
getOutlinedModelfunction within the Flight deserialization layer. - December 5, 2025: Security firms observe the first "in-the-wild" exploitation attempts. The Cybersecurity and Infrastructure Security Agency (CISA) adds the vulnerability to its Known Exploited Vulnerabilities (KEV) catalog, mandating federal agencies to patch within 24 hours.
- December 10, 2025: Research from Sysdig links exploitation campaigns to North Korean (DPRK) state-sponsored actors. These actors utilized React2Shell to deploy "EtherRAT," a file-less implant that leverages the Ethereum blockchain for command-and-control (C2) communication, a technique known as "EtherHiding."
- January 2026: Further variants of the attack are documented. Palo Alto Networks’ Unit 42 identifies "KSwapDoor," a sophisticated backdoor that masquerades as a kernel swap daemon on Linux systems, utilizing the initial RCE to gain a persistent foothold in cloud environments.
Technical Analysis of the React2Shell Gadget Chain
The root cause of React2Shell is located in the ReactFlightReplyServer.js file, specifically within the logic that handles property traversal for the $: prefix. When the parser resolves a path like $1:user:name, it splits the string by colons and iterates through the segments to find the final value. The original implementation lacked a hasOwnProperty check, allowing the loop to access properties on the object’s prototype.
By supplying a path such as $1:__proto__:constructor:constructor, an attacker could traverse from a standard object to the Object prototype, then to the Object constructor, and finally to the Function constructor. In JavaScript, the Function constructor can be used to create a new function from a string, effectively acting as an eval() equivalent.
The exploit gadget chain typically involves:
- Injection: Sending a crafted Flight payload to a Server Action endpoint.
- Traversal: Using the
$:prefix to reach theFunctionconstructor via prototype pollution. - Execution: Triggering the execution of the constructor with an attacker-controlled payload.
- Persistence: Downloading a secondary payload (such as EtherRAT) to establish a permanent connection.
This chain demonstrates that the vulnerability is not a simple parsing error but an architectural oversight in how the framework handles "Thenables" and property lookups during the reconstruction of the UI tree.

Official Responses and Industry Impact
The React team’s response was characterized by a series of rapid patches across multiple versions (19.0.1, 19.1.2, and 19.2.1). The fix involved caching the original Object.prototype.hasOwnProperty method at module load time and using .call() to ensure that property checks cannot be shadowed or bypassed by malicious objects.
Industry analysts have noted that the impact of React2Shell extends beyond the immediate RCE. It has forced a re-evaluation of the "Server-Driven UI" pattern. While the React team has hardened the parser, the fundamental design—reconstructing behavior from a text stream—remains. This has led to a surge in demand for specialized Web Application Firewall (WAF) rules and new linting standards for React applications.
Ranked Defensive Strategies for Developers
In the wake of CVE-2025-55182, security experts have established a ranked set of defenses to mitigate risks associated with the Flight protocol.
1. Mandatory Input Validation
The most critical defense is the implementation of strict schema validation at the entry point of every Server Action. Tools like Zod or Valibot allow developers to define the exact shape of expected data. Crucially, validation must occur before any other logic, including logging. A secondary vulnerability, CVE-2025-55183, demonstrated that stringifying unvalidated input for logs could reflect sensitive source code back to the attacker.
2. Implementation of the ‘server-only’ Package
To prevent the accidental exposure of sensitive server-side logic to the client-side bundle, developers are urged to use the server-only package. This ensures that modules containing database credentials or internal business logic cannot be imported by Client Components. While this does not stop a deserialization attack directly, it significantly limits the "blast radius" by reducing the amount of sensitive code available on the client.
3. CSRF Hardening
Traditional CSRF protections have proven insufficient against sophisticated Flight protocol manipulation. Following CVE-2026-27978, which identified a bypass in how Next.js handled Origin: null headers from sandboxed iframes, developers are encouraged to implement explicit CSRF tokens for high-value operations. Setting cookies to SameSite=Strict and avoiding the use of allowedOrigins: ["null"] in configuration files are now considered baseline requirements.
4. The React Taint API
React introduced taintObjectReference and taintUniqueValue as experimental features to prevent sensitive data from being serialized. If a "tainted" object (such as a user’s password hash) is passed to a Client Component, the Flight serializer will throw an error. However, researchers caution that this is a "speed bump" rather than a foolproof barrier, as any derivation of the data (such as object spreading) can break the taint tracking.
Broader Implications for Web Security
React2Shell is not an isolated incident but part of a recurring pattern in software history. Similar vulnerabilities have plagued Google Web Toolkit (GWT), Java Server Faces (JSF), and ASP.NET’s ViewState. In each instance, the attempt to move rich, stateful data between a trusted server and an untrusted client via a custom serialization format created an exploitable surface.
The "React2Shell" era signals a need for a paradigm shift in how we approach front-end framework security. As frameworks move closer to the server, the boundary between "data" and "behavior" becomes increasingly blurred. Future iterations of these protocols may require cryptographic signing of serialized payloads or content integrity checks on the Flight stream itself to ensure that the data received by the client is exactly what was intended by the server.
In conclusion, while the immediate threat of CVE-2025-55182 has been mitigated by framework patches, the structural risks inherent in the Flight protocol remain a subject of intense study. Organizations must move beyond reactive patching and adopt a "defense-in-depth" posture, combining framework updates with strict input validation, architectural separation, and robust network monitoring to secure the next generation of web applications.
