React2Shell
React2Shell let one unauthenticated request run code on servers using React Server Components, including Next.js App Router sites. Attackers exploited it within hours of its disclosure in December 2025.
- Affected
- react-server-dom packages 19.0.0, 19.1.0 to 19.1.1, 19.2.0
- Fixed in
- 19.0.1, 19.1.2, 19.2.1; Next.js 15.0.5 to 16.0.7 by line
- Published
- 2025-12-03
- Known exploited since
- 2025-12-05
What React2Shell is
React Server Components let the browser call functions that run on the server. Vulnerable versions unsafely turned the data in such a call back into server objects, so a crafted request could run code on the server.
Any app built on these packages was exposed, including Next.js App Router sites. Next.js tracked it as CVE-2025-66478, since rejected as a duplicate of this CVE.
Spot it in the logs
Real checkouts carry the same headers as the attack. Which request got in?
Attacks are POST requests carrying the next-action and rsc-action-id headers with malformed bodies, often in noisy bursts with random User-Agents. Real Server Action calls carry the same headers, so the headers alone prove nothing.
What gives a success away is the server's next move: direct connections to IP addresses on unusual ports, reconnaissance commands, and test files in /tmp.
How the attack works
- 1The attacker sends a crafted Server Action request
- 2React Server Components turn its body back into server objects unsafely
- 3The server runs the attacker's code
- 4It connects out to the attacker's server
Why React2Shell was so severe
React2Shell has the highest CVSS score, 10.0. CVSS is the common 0 to 10 scale for how dangerous a flaw is. The vector behind the score says it all: reachable over the network, low complexity, no account, no user action, and high impact on confidentiality, integrity and availability. NVD classes the bug as CWE-502, deserialization of untrusted data. Deserialization means turning data received over the network back into objects in the server's memory; doing that with attacker-controlled data is a classic route to running code.
It also hit default setups. The React team warned that an app could be vulnerable even if it never defined a Server Function, as long as it supported React Server Components. Wiz noted that any affected Next.js app could be reached by adding the next-action header to a request. Six frameworks and tools were affected: Next.js, React Router, Waku, Parcel RSC, the Vite RSC plugin and the Redwood SDK.
The exposure was large. Palo Alto Networks counted more than 968,000 React and Next.js instances in its internet attack surface data. Microsoft saw tens of thousands of devices across several thousand organizations running React-based apps, and several hundred compromised machines. A web server usually holds the keys it needs to work, such as database passwords and cloud credentials, so one request could expose much more than the site. That is why Next.js advised rotating every secret on servers that were online and unpatched.
Is your version affected?
- Node.js project
npm ls next react-server-dom-webpack react-server-dom-turbopack react-server-dom-parcel
Affected. Upgrade to 19.0.1 / 19.1.2 / 19.2.1.
How to detect React2Shell
Check your versions first, then look for the attack requests and, more importantly, for what the server did afterwards.
- Check package versions everywhereCheck next, react-server-dom-webpack, react-server-dom-parcel and react-server-dom-turbopack in every deployed app, not just the main repository. Vercel's npx fix-react2shell-next tool checks and bumps Next.js versions, and typing next.version in the browser console shows a live site's Next.js version. Davidson's site warns that many scanner-based reports may be false positives, so trust version checks over scan results.
- Search web logs for suspicious Server Action requestsAmazon advises looking for POST requests carrying next-action or rsc-action-id headers with bodies containing $@ or "status":"resolved_model". Real Server Action calls use the same headers, so the body pattern matters. Many servers do not log bodies: JPCERT/CC had to rely on User-Agent, path and response size, and found bursts from more than 100 addresses.
- Watch what Node.js startsMicrosoft's main signal is node or next-server starting sh, bash, cmd.exe or powershell. Look for probe commands such as whoami, id, uname, ipconfig and net user, and reverse shell strings such as /dev/tcp/, bash -i, | bash and | base64 -d. A web server process should almost never start a shell.
- Check for new files and scheduled jobsLook for test files in /tmp such as pwned.txt, miner files such as xmrig, and changed cron entries. Google advises checking for new hidden folders such as $HOME/.systemd-utils, edited shell startup files such as $HOME/.bashrc, and unexpected stopped processes. Microsoft also saw new users, edited authorized_keys files and remote management tools such as MeshAgent.
- Watch outbound traffic and cloud credentialsAlert on wget or curl downloads started by web server processes, and on connections to *.trycloudflare.com tunnels. Microsoft and Wiz saw attackers query the cloud instance metadata service at 169.254.169.254 for credentials. If that happened, check cloud audit logs for those credentials being used from elsewhere.
Check a log line
Search the logs yourself
Find the Server Action request that went wrong.
Fix it, in this order
- 1Upgrade React and Next.jsThere is no workaround. Install the fixed React Server Components and Next.js releases.
- 2Rotate every secretIf the site was online and unpatched, treat its keys and passwords as stolen.
- 3Remove what the attack startedLook for unexpected programs and files in /tmp, and remove them.
Related vulnerabilities
Timeline
- 2025-11-29The flaw is reported through Meta's bug bounty
- 2025-12-03React and Next.js disclose it and ship fixes; exploitation starts within hours
- 2025-12-05CISA lists it as exploited
React2Shell attacks in the wild
Sources differ on when attacks began, depending on what each one could see. Amazon reported attempts within hours of disclosure and named two China-nexus groups, Earth Lamia and Jackpot Panda. One cluster in Amazon's honeypots spent 52 minutes early on 4 December sending 116 requests, running whoami and id, and trying to write /tmp/pwned.txt and read /etc/passwd. Microsoft saw activity from 5 December, mostly coin miners at first. Palo Alto Networks' Unit 42 first reported post-exploitation activity on 8 December.
Google's threat intelligence team named five China-nexus clusters, each with its own tools: UNC6600 with the MINOCAT tunneler, UNC6586 with the SNOWLIGHT downloader, UNC6588 with the COMPOOD backdoor, UNC6603 with an updated HISONIC backdoor aimed at AWS and Alibaba Cloud instances, and UNC6595 with ANGRYREBEL.LINUX. Google also saw Iran-nexus actors. Unit 42 found overlaps with North Korean tooling, including the EtherRAT implant, and a Linux backdoor it named KSwapDoor. Microsoft observed Cobalt Strike, VShell, ShadowPAD and attempts to steal cloud credentials from instance metadata services.
JPCERT/CC published a case where one server was hit by several groups between 5 and 7 December 2025. Suspicious POST requests came from more than 100 IP addresses. Attackers installed coin miners, the HISONIC and SNOWLIGHT tools, a CrossC2 remote access tool and a Global Socket backdoor, added cron jobs, and finally defaced the website. The owner learned about it only when a user reported the defacement.
Who found React2Shell
Security researcher Lachlan Davidson reported the flaw through Meta's bug bounty on 29 November 2025. Meta's security researchers confirmed it the next day and worked on a fix with the React team. A fix existed on 1 December, and the team rolled out temporary protections with hosting providers before going public. On 3 December React published the fixed packages to npm and disclosed CVE-2025-55182, and Next.js issued its own advisory the same day. Davidson keeps a site, react2shell.com, with updates on the flaw.
Davidson's site says a public proof of concept appeared about 30 hours after disclosure, and Vercel dates the first public exploits to 4 December. He also warned that many "PoCs" shared online were not genuine: they only worked if a developer had deliberately exposed dangerous functions, which could lead teams to wrongly decide they were safe.
Lessons from React2Shell
React2Shell showed that modern JavaScript frameworks run real server code, and that a convenience feature can open a server to anyone. The bug sat in a protocol most developers never see, so teams first had to learn whether they used it at all. Exploitation began within hours to days, depending on the source, which left almost no time between disclosure and attack. JPCERT/CC's case shows the second lesson: patching was not enough, because servers attacked before the patch needed to be checked for what was already installed.
Edge protections helped but did not close the hole. Vercel deployed WAF rules (web application firewall filters) before the announcement, kept updating them and offered bounties for bypasses, yet stated that rules cannot stop every variant. The React team said the same about hosting provider mitigations. The fixes also came in rounds: researchers looking for bypasses found three more flaws within days, so teams that pinned the first patched version had to update again.
The case
React2Shell: The Online Shop
- Find what the advisory affects
- Were we hit?
- Close it
- Clean up and rotate the secrets
Questions
Is my Next.js app affected by React2Shell?
Next.js 15.x and 16.x with the App Router, and 14.3 canary builds, were affected. Next.js 13.x, 14.x stable, the Pages Router and the Edge Runtime were not.
Is upgrading enough?
Upgrading closes the hole. If the app was online and unpatched, also rotate its secrets and look for programs the attack started.
What is React2Shell?
React2Shell is the name for CVE-2025-55182, a flaw in React Server Components disclosed on 3 December 2025. A single crafted request, with no login, could run code on the server. It affected Next.js App Router apps and other frameworks that use React Server Components.
Has React2Shell been patched?
Yes. React released fixed versions 19.0.1, 19.1.2 and 19.2.1 on 3 December 2025, and Next.js released fixed versions for each affected release line. Later releases also fix the follow-up flaws, so install the newest patch for your line rather than the first fixed version.
Is React2Shell still a threat?
Yes, for any server that is still unpatched. Several state-linked and criminal groups added it to their toolkits within days, and CISA set a 12 December 2025 deadline for US federal agencies to fix it. A server that was online and unpatched may already have been compromised, even if it is patched now.
Does React2Shell affect React apps that run only in the browser?
No. The React team says apps are not affected if their React code does not use a server, or if they do not use a framework or bundler that supports React Server Components. The flaw is in the server-side packages, not in the React code that runs in the browser.
Do WAF rules protect me from React2Shell?
Only partly. Vercel and other providers deployed firewall rules, but Vercel states that WAF rules cannot guarantee protection against every variant, and it found and fixed bypasses. Upgrading is the only complete fix.
How do I fix React2Shell?
Upgrade Next.js or your React Server Components packages to the latest patched release for your version line, then redeploy. Rotate secrets if the app was online and unpatched as of 4 December 2025 at 1:00 PM Pacific time, as Next.js advises. Then look for unexpected processes, files and cron jobs on the server.