Security News & Alerts

React2Shell Technical Analysis: Deserialization RCE in React Server Components (CVE-2025-55182)

By Vince AntonioPublished 11 min read

This is the technical companion to our React2Shell news post. React2Shell is a perfect-score (CVSS 10.0) deserialization bug in React Server Components that gave unauthenticated attackers code execution on the server. It was exploited by multiple nation-state and criminal groups within hours of disclosure. This write-up explains the root cause, what the one-check fix changed, why even a blank app was exposed, the version floors you actually need today, and how to detect and respond.

A web engineer reviewing server-side JavaScript and dependency versions on a widescreen monitor

In plain English

  • React2Shell (CVE-2025-55182) is a deserialization flaw in React Server Components. A crafted HTTP request to a Server Function endpoint could run code on the server, with no login.
  • The decoder trusted references inside attacker-supplied data and could reach inherited object properties (prototype pollution). The fix added an own-property check.
  • Even an app with no Server Functions, including a blank create-next-app, could be exposed. Patch floors have moved well past the December 2025 versions.
  • It was mass-exploited by China, DPRK and Iran-linked groups and criminal miners. If you were online and unpatched, assume compromise and rotate secrets.

At a glance

Weakness
CWE-502 deserialization of untrusted data (server-side prototype pollution)
Score
CVSS 3.1 10.0 Critical. Unauthenticated, network, no interaction
Disclosed
3 December 2025. CISA KEV 5 December, deadline pulled forward to 12 December
Current React floor
19.0.9 / 19.1.10 / 19.2.9 / 19.3.1 (as of 16 Nov 2026)

React2Shell in one paragraph

React2Shell is the nickname for CVE-2025-55182, a vulnerability in React Server Components (RSC), the server-side rendering model used by Next.js and several other frameworks. React's own words: "an unauthenticated attacker could craft a malicious HTTP request to any Server Function endpoint that, when deserialized by React, achieves remote code execution on the server". It scored a maximum 10.0. The downstream Next.js vulnerability identifier, CVE-2025-66478, was later rejected as a duplicate. This is a React Server Components vulnerability in the framework's own decoding code, not in anyone's application logic, which is why it hit so many sites at once.

The root cause: a deserializer that trusted too much

When a browser calls a Server Function, React sends the arguments in a wire format (the "Flight" protocol) that the server decodes back into JavaScript values. That decoding is where the bug lives. React's and the vendors' analyses line up on the shape of it:

  • The decoder resolved references inside attacker-supplied data without properly checking their type or ownership.
  • A lookup could walk into inherited properties on an object (JavaScript's prototype chain) rather than only the object's own data.
  • Reaching inherited properties let the request address capabilities that were never meant to be reachable, which is what turned decoding into code execution.

Security teams classified it precisely. Datadog called it server-side prototype pollution leading to remote code execution. Microsoft described missing payload validation leading to prototype pollution and code execution. Wiz summed it up as a deserializer that "lacks type checking". All three are describing the same gap: this is an insecure deserialization bug (CWE-502), the same class behind many of the worst RCEs of the last decade.

Why "prototype pollution" matters here. In JavaScript, every object inherits properties from a prototype. If a decoder lets attacker input reach those inherited slots instead of just the object's own fields, the attacker can influence behavior far outside the data they were supposed to be sending. On a server that is decoding untrusted requests, that reach is the difference between a parsing bug and remote code execution.

What the fix changed

The upstream fix is small and precise. Per Datadog's analysis, it adds an own-property check (hasOwnProperty) before the decoder returns a module export, so only an object's own properties can be resolved and never inherited ones. More broadly, the decoder now resolves only expected own properties of expected types.

javascriptThe fix: resolve only own properties, never inherited ones
// Conceptual shape of the fix (not the literal patch)
// Before: resolve a reference straight from the target object,
//         which could reach inherited prototype properties.
// After:  only resolve it when the target actually OWNS that property.
if (Object.prototype.hasOwnProperty.call(target, key)) {
  return target[key];
}
// otherwise: reject, do not resolve inherited properties

React deliberately kept its public write-up high level and has not published a line-level root-cause analysis, which is normal for a bug this widely exploited. There is no configuration workaround: the only fix is to upgrade the affected packages.

Why even a blank app was exposed

The most alarming part of React2Shell is how little you had to do to be vulnerable. React stated plainly: "Even if your app does not implement any React Server Function endpoints it may still be vulnerable if your app supports React Server Components." Datadog and Unit 42 both confirmed that a freshly scaffolded create-next-app project was exploitable with no code changes, and Google's threat group noted that "the mere presence of vulnerable packages on a system is often enough".

The flip side tells you who was safe: React that runs only in the browser, and apps that do not use an RSC-capable framework, bundler or plugin. The affected packages are react-server-dom-webpack, react-server-dom-parcel, react-server-dom-turbopack and next, and they usually arrive as transitive dependencies, so many teams did not know they had them.

The versions you actually need (not the December 2025 ones)

This is the single most common mistake with React2Shell: patching to the original December 2025 versions and stopping there. Since then the same RSC code has produced several more advisories, including a second critical, unauthenticated RCE (CVE-2026-126187) in late 2026. Over ten React security advisories have landed in under twelve months.

WhatMinimum safe version (as of 16 Nov 2026)
React RSC packages19.0.9, 19.1.10, 19.2.9, or 19.3.1
Next.js (App Router)16.4.1 or 15.5.28 at least; current security releases 16.4.5 and 15.5.29
Next.js 13.x and 14.xNo fixes for the 2026 RSC issues: move to 15.x or 16.x
A second RCE to know about. CVE-2026-126187 (CVSS v4 9.5) is another deserialization flaw in the same Flight code, fixed in the versions above. It triggers only in a narrower case, but Vercel advised upgrading "even if your application does not have similar functions". Public exploit code exists, though it was not on CISA's KEV list as of mid-November 2026. The lesson is the same: track the current floor, not last year's.

Check your resolved versions, not just package.json. Use npm ls react-server-dom-webpack next or read the lockfile, and include container images, SBOMs and CI. Vercel also ships a helper, npx fix-react2shell-next, that scans and bumps Next.js versions.

How it was exploited in the wild

React2Shell was not a theoretical risk. Scanning began within hours of the 3 December 2025 disclosure, and a working public exploit appeared the next day. What followed was one of the broadest exploitation campaigns of the year:

  • Nation-state groups moved first. AWS reported China-linked groups exploiting within hours. Google and Unit 42 tracked multiple China-nexus clusters deploying tunnelers and backdoors (SNOWLIGHT, VShell, ShadowPAD and others), plus overlap with North Korea-linked and Iran-linked activity.
  • Criminal miners and botnets piled in, dropping XMRig cryptominers (one hidden behind a service named "system-update-service") and Mirai loaders.
  • Credential theft at scale. Microsoft reported several hundred compromised machines with cloud metadata (IMDS) credential theft across Azure, AWS, GCP and Tencent, plus theft of AI API keys and Kubernetes tokens. A later Cisco Talos campaign harvested credentials from 766 hosts in 24 hours, finding database credentials on most and live payment-provider keys on some.
  • Stealthy persistence. Wiz documented fileless, in-memory Node.js implants that hook the HTTP server and spawn no child process, which defeats detection that only watches for a web process launching a shell.

Cloudflare's WAF alone logged hundreds of millions of exploitation hits in the first week. This is why CISA pulled the federal patch deadline forward from 26 December to 12 December 2025.

Detection

Because the bug is in the framework, detection focuses on what the attacker does after landing, plus the request shape.

  • Process lineage. Alert when a Node.js or Next.js process spawns a shell, curl or wget, runs recon commands (whoami, id, reads of /etc/passwd), or launches encoded PowerShell on Windows.
  • The fileless caveat. In-memory implants that hook the HTTP server create no child process, so pair process alerts with egress monitoring and runtime or memory inspection.
  • Egress and metadata. Unexpected outbound connections from app servers or containers, direct-to-IP HTTP on odd ports, and any access to cloud metadata (IMDS) from a web workload.
  • Request logs. A spike in POSTs carrying Server Action headers (Next-Action, rsc-action-id) or unusual bodies. Legitimate apps send these too, so look for volume and anomalies, not the header alone.
  • Persistence. New cron jobs or systemd units, changes to .bashrc, new users or SSH authorized_keys entries, unexpected RMM agents, and executables in /tmp.

Vendor WAF rules (Vercel, Cloudflare, AWS, Google Cloud, Azure, Palo Alto, Cisco) block known exploitation patterns, but every vendor says the same thing: they reduce exposure, they do not replace patching. A version-fingerprint scanner sends a harmless request, so a WAF will not stop it; a scanner flagging you means patch, not breach.

If you were exposed

Given how fast and wide the exploitation was, treat an unpatched, internet-facing RSC app from December 2025 as a possible breach, not a near miss.

  1. Patch and redeploy. Committing the fix is not enough; the patched build has to ship. Target the current floors above and rebuild container images.
  2. Assume compromise if you were online and unpatched around 4 December 2025. Vercel set that as the line for assuming the system may be compromised.
  3. Rotate every reachable secret. Environment variables, API keys, database passwords, cloud IAM keys, SSH keys (new key pairs, do not reuse), and npm and Git tokens. Start with the most critical.
  4. Hunt across the whole window, December 2025 onward, since campaigns ran into 2026. Correlate endpoint, container and cloud audit logs, including cloud API calls made with the app's own credentials.
  5. Harden. Enforce IMDSv2 on AWS, apply least privilege to container and cloud roles, restrict egress from server-side and edge workloads, and turn on dependency and secret scanning in CI.

Our incident response plan template covers the first hours, and an application security test can confirm which of your deployments still ship a vulnerable version.

Sources

Topics:Exploit Write-upsCVE AlertsApplication Security

Need a hand with this?

Talk to a senior consultant. We reply within one business day with clear next steps and a scoped quote.

Prefer to just ask? Contact us and a consultant will reply.

Written by

Vince Antonio

Security writer and consultant, NextGarrison

Vince writes NextGarrison's security news, technical vulnerability write-ups and guides. He covers actively exploited flaws, penetration testing, SOC monitoring and getting ready for SOC 2, ISO 27001 and PCI DSS, in plain English with sources for every claim.

Want the next alert like this one?

New vulnerability alerts as soon as we publish them. Free, no sign-up, works in Feedly, Outlook, Slack and Teams.

Frequently Asked Questions

What is React2Shell (CVE-2025-55182)?

A maximum-severity (CVSS 10.0) deserialization flaw in React Server Components. A crafted HTTP request to a Server Function endpoint could run code on the server with no login. It is also called the React Server Components vulnerability.

Am I affected if I do not use Server Functions?

Possibly yes. React said an app can be vulnerable just by supporting React Server Components, and even a blank create-next-app was exploitable. Check your resolved versions of react-server-dom-* and next, not just package.json.

I patched in December 2025. Am I done?

Not necessarily. The same RSC code has had more advisories since, including a second critical RCE (CVE-2026-126187). As of 16 November 2026 the React floor is 19.0.9 / 19.1.10 / 19.2.9 / 19.3.1 and Next.js should be 16.4.x or 15.5.x.

What should I do if my app was exposed?

Assume compromise if it was online and unpatched in early December 2025. Patch and redeploy, rotate every reachable secret (cloud, database, API and SSH keys), and hunt for persistence and credential theft across December 2025 onward.

Keep reading