Discovering React2Shell: JavaScript’s Long-Awaited Deserialization Flight-mare
summary
React2Shell (CVE-2025-55182) is a single-request, unauthenticated RCE against React Server Components that abuses the Flight protocol’s chunking and thenable semantics to trick the server into resolving attacker-controlled internals. The exploit spoofs a future chunk ($at), grabs React’s internal then, uses the Function constructor to build code at parse time and forces execution — demonstrated by spawning calc.exe — and triggers massive scanning: Cloudflare logs >500M attempts in week one (industry sum >1B). Mitigations and hardening patches followed. React2Shell CVE-2025-55182
AI-written summary · about
chapters (22)
- 0:00Introduction and speaker intro
- 0:50JavaScript and deserialization history
- 2:11Evolution of React and server components
- 4:40Flight protocol deep dive
- 6:02Flight protocol data structures
- 8:30Flight in web applications
- 9:31Black box testing Flight
- 10:54JavaScript function gadgets
- 12:17CVE-2025-55182 Reactor Shell
- 14:01Industry response to Reactor Shell
- 15:24Exploit building fundamentals
- 21:00JavaScript function call vectors
- 23:05Next.js decode reply function
- 24:28JavaScript async/await and promises
- 27:38Flight and promise unrolling
- 29:01Crafting React to Shell payload
- 31:29Final React to Shell payload breakdown
- 34:42Proof of concept and demo
- 35:46Disclosure and industry collaboration
- 37:31Other frameworks and future research
- 38:54Why JavaScript lacked deserialization flaws
- 39:16Conclusion and call to action
