<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Wilson Kinyua</title>
    <description>The latest articles on Forem by Wilson Kinyua (@wilson_kinyua_5c56278131e).</description>
    <link>https://forem.com/wilson_kinyua_5c56278131e</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3650496%2F47c10ac1-e9c7-4dc1-82ef-9c9a674b3786.jpg</url>
      <title>Forem: Wilson Kinyua</title>
      <link>https://forem.com/wilson_kinyua_5c56278131e</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/wilson_kinyua_5c56278131e"/>
    <language>en</language>
    <item>
      <title>React2Shell (CVE-2025-55182): Critical RCE in React Server Components and Next.js</title>
      <dc:creator>Wilson Kinyua</dc:creator>
      <pubDate>Sun, 07 Dec 2025 17:11:37 +0000</pubDate>
      <link>https://forem.com/wilson_kinyua_5c56278131e/react2shell-cve-2025-55182-critical-rce-in-react-server-components-and-nextjs-hml</link>
      <guid>https://forem.com/wilson_kinyua_5c56278131e/react2shell-cve-2025-55182-critical-rce-in-react-server-components-and-nextjs-hml</guid>
      <description>&lt;p&gt;In early December 2025, the React and Next.js ecosystem was hit with a critical remote code execution (RCE) vulnerability in React Server Components (RSC), now widely known as &lt;strong&gt;React2Shell&lt;/strong&gt;. Tracked as &lt;strong&gt;CVE-2025-55182&lt;/strong&gt;, this issue allows an unauthenticated attacker to execute arbitrary code on servers running vulnerable React RSC implementations, including many modern Next.js apps using the App Router.&lt;/p&gt;

&lt;p&gt;If your app was created recently with &lt;code&gt;create-next-app&lt;/code&gt; and deployed without extra hardening, there's a good chance it was affected before you upgraded.&lt;/p&gt;




&lt;h2&gt;
  
  
  Where This Vulnerability Came From
&lt;/h2&gt;

&lt;p&gt;The root cause lies in React's RSC "Flight" protocol, which defines how server components serialize and stream data to the client. Under certain conditions, the server-side handling of these RSC payloads allowed unsafe deserialization, opening a path to arbitrary code execution.&lt;/p&gt;

&lt;p&gt;Security researcher &lt;strong&gt;Lachlan Davidson&lt;/strong&gt; privately disclosed the issue to Meta's React team on November 29, 2025, and it was assigned &lt;strong&gt;CVE-2025-55182&lt;/strong&gt; with a maximum CVSS score of &lt;strong&gt;10.0&lt;/strong&gt;. React and Vercel coordinated patches that shipped publicly on December 2–3, 2025, followed by advisories from cloud vendors, security companies, and national CERTs.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note on CVE tracking:&lt;/strong&gt; You may see references to CVE-2025-66478 for Next.js specifically. This CVE was later rejected by the National Vulnerability Database (NVD) as a duplicate of CVE-2025-55182, so both React and Next.js vulnerabilities are now tracked under the single CVE-2025-55182 identifier.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  How It Affects Websites and Servers
&lt;/h2&gt;

&lt;p&gt;The vulnerability lets an attacker send specially crafted RSC requests that the server parses and executes in unsafe ways. Because RSC processing lives on the server, successful exploitation can lead to full RCE: running arbitrary commands, accessing environment variables, or pivoting deeper into your infrastructure.&lt;/p&gt;

&lt;p&gt;Security researchers at Wiz constructed a fully working RCE proof-of-concept with near-100% reliability. Within hours of public disclosure, multiple security firms observed active exploitation in the wild.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This is not theoretical.&lt;/strong&gt; Amazon's threat intelligence teams observed attackers establishing shells to harvest credentials from environment variables, filesystems, and cloud instance metadata. In some compromised environments, attackers attempted to identify and exfiltrate AWS credentials. At other organizations, exploitation was followed by attempts to install malware frameworks like Sliver.&lt;/p&gt;




&lt;h2&gt;
  
  
  Who Is Affected
&lt;/h2&gt;

&lt;h3&gt;
  
  
  React Core
&lt;/h3&gt;

&lt;p&gt;The vulnerability affects server-side use of React 19 with React Server Components enabled. According to React's official advisory, the following versions are vulnerable:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;React 19.0.0&lt;/li&gt;
&lt;li&gt;React 19.1.0, 19.1.1&lt;/li&gt;
&lt;li&gt;React 19.2.0&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Patched React versions:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;19.0.1&lt;/li&gt;
&lt;li&gt;19.1.2&lt;/li&gt;
&lt;li&gt;19.2.1&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Next.js
&lt;/h3&gt;

&lt;p&gt;Any framework that embeds RSC support on the server is in scope. For Next.js specifically:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Affected versions:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;All Next.js 15.x versions before their patched releases (including 15.0.x, 15.1.x, 15.2.x, etc.)&lt;/li&gt;
&lt;li&gt;Next.js 16.0.0–16.0.6&lt;/li&gt;
&lt;li&gt;Next.js 14.3.0‑canary.77 and later 14.x canary builds using App Router + RSC​&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Patched versions (upgrade to at least):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;15.0.5, 15.1.9, 15.2.6, 15.3.6, 15.4.8, or 15.5.7&lt;/li&gt;
&lt;li&gt;16.0.7 or higher&lt;/li&gt;
&lt;li&gt;Stable Next.js 14.x (avoid canary builds in production)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Other Affected Projects
&lt;/h3&gt;

&lt;p&gt;The vulnerability also affects other RSC implementations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;React Router (RSC preview)&lt;/li&gt;
&lt;li&gt;Waku&lt;/li&gt;
&lt;li&gt;Redwood SDK&lt;/li&gt;
&lt;li&gt;@parcel/rsc&lt;/li&gt;
&lt;li&gt;@vitejs/plugin-rsc&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're running a typical App Router project created recently with &lt;code&gt;create-next-app&lt;/code&gt; on 15.x or 16.x, &lt;strong&gt;assume you were affected until you upgrade&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  In practice:
&lt;/h2&gt;

&lt;p&gt;React Server Components rely on a binary protocol called Flight to serialize component trees and data between server and client. In vulnerable versions, the server trusted certain parts of this payload too much, allowing an attacker-controlled message to influence how values are resolved on the server.&lt;/p&gt;

&lt;p&gt;In practice:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;An attacker sends a crafted HTTP request targeting the RSC endpoint in a vulnerable app&lt;/li&gt;
&lt;li&gt;The server parses the payload and, due to unsafe deserialization, ends up calling dangerous APIs under some conditions&lt;/li&gt;
&lt;li&gt;The result is unauthenticated RCE on the machine running your Next.js server or serverless function&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;No special misconfiguration or app-level bug is required.&lt;/strong&gt; The vulnerability exists in the framework's RSC path itself under default settings—a standard Next.js app created with &lt;code&gt;create-next-app&lt;/code&gt; and built for production can be exploited with no code changes by the developer.&lt;/p&gt;




&lt;h2&gt;
  
  
  How to Fix It
&lt;/h2&gt;

&lt;p&gt;There is no reliable config toggle or middleware workaround. &lt;strong&gt;The fix is to upgrade React and Next.js to patched versions and redeploy.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Check If Your App Is Vulnerable
&lt;/h3&gt;

&lt;p&gt;Inspect your &lt;code&gt;package.json&lt;/code&gt; for &lt;code&gt;next&lt;/code&gt;, &lt;code&gt;react&lt;/code&gt;, and &lt;code&gt;react-dom&lt;/code&gt; versions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;package.json | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-E&lt;/span&gt; &lt;span class="s1"&gt;'"(next|react|react-dom)"'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You are vulnerable if:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;next&lt;/code&gt; is in the 15.0.0–15.0.4 or 16.0.0–16.0.6 range&lt;/li&gt;
&lt;li&gt;You're on 14.3.0-canary.77 or later canary builds&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;react&lt;/code&gt; is 19.0.0, 19.1.0, 19.1.1, or 19.2.0&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 2: Upgrade to Patched Versions
&lt;/h3&gt;

&lt;p&gt;For most projects, upgrade to the latest patched stable in your major line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# General case - upgrade to latest&lt;/span&gt;
npm &lt;span class="nb"&gt;install &lt;/span&gt;next@latest react@latest react-dom@latest

&lt;span class="c"&gt;# Or with yarn&lt;/span&gt;
yarn add next@latest react@latest react-dom@latest

&lt;span class="c"&gt;# Or with pnpm&lt;/span&gt;
pnpm add next@latest react@latest react-dom@latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you need to stay within specific majors:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# For Next.js 15.x&lt;/span&gt;
npm &lt;span class="nb"&gt;install &lt;/span&gt;next@15.0.5 react@19.0.1 react-dom@19.0.1

&lt;span class="c"&gt;# For Next.js 16.x&lt;/span&gt;
npm &lt;span class="nb"&gt;install &lt;/span&gt;next@16.0.7 react@latest react-dom@latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Scan Your Dependencies
&lt;/h3&gt;

&lt;p&gt;Beyond this specific vulnerability, it's good practice to scan your npm packages for security issues. Tools you can use:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;npm audit&lt;/strong&gt; (built-in):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm audit
npm audit fix
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;a href="https://npmscan.com/" rel="noopener noreferrer"&gt;npmscan.com&lt;/a&gt;&lt;/strong&gt; — A browser-based tool focused on detecting malware, crypto-drainers, and supply-chain attacks that traditional CVE databases might miss. Simply paste your &lt;code&gt;package.json&lt;/code&gt; content for instant analysis. Unlike &lt;code&gt;npm audit&lt;/code&gt; which only checks known CVEs, npmscan uses heuristics to detect suspicious behavior patterns like obfuscation, exfiltration attempts, and malicious postinstall hooks.&lt;/p&gt;

&lt;p&gt;For sensitive/private codebases, review their privacy policy before pasting your full package.json, or stick to npm audit inside your CI.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Rebuild and Redeploy
&lt;/h3&gt;

&lt;p&gt;After upgrading:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Rebuild your application:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   npm run build
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Redeploy to production&lt;/strong&gt; (Vercel, your own Node server, containers, etc.)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Review logs and monitoring&lt;/strong&gt; for suspicious RSC-related traffic or unexpected process behavior, especially if your app was publicly exposed before the patch window&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Look for indicators of compromise:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Unexpected outbound network connections&lt;/li&gt;
&lt;li&gt;Suspicious processes spawned by your Node.js application&lt;/li&gt;
&lt;li&gt;Unauthorized access to environment variables or secrets&lt;/li&gt;
&lt;li&gt;POST requests with &lt;code&gt;next-action&lt;/code&gt; or &lt;code&gt;rsc-action-id&lt;/code&gt; headers in your logs&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Who Should Treat This as Urgent
&lt;/h2&gt;

&lt;p&gt;You should treat this as an &lt;strong&gt;immediate incident&lt;/strong&gt; if:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You run a public Next.js App Router app on 15.x or 16.x with RSC enabled, especially on self-hosted infrastructure&lt;/li&gt;
&lt;li&gt;Your servers have direct access to sensitive resources (databases, message queues, internal APIs, secrets)&lt;/li&gt;
&lt;li&gt;You manage multi-tenant SaaS where compromise of one Node process could expose multiple customers&lt;/li&gt;
&lt;li&gt;You haven't updated your Next.js or React dependencies since before December 3, 2025&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cloud providers and managed platforms (Vercel, AWS, Google Cloud) have added protective filtering, but all of them emphasize that &lt;strong&gt;upgrading your app's dependencies is mandatory&lt;/strong&gt;—platform-level mitigations are not a substitute for patching.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why This Matters for Everyday Next.js Developers
&lt;/h2&gt;

&lt;p&gt;For most of us, this incident is a reminder that "framework defaults" are still security-sensitive code paths. You don't have to be doing anything fancy with RSC for a vulnerability like this to affect you—simply using the modern App Router with current defaults was enough.&lt;/p&gt;

&lt;p&gt;On the positive side, the coordinated response between the React team, Vercel, security researchers, and cloud vendors has been fast and transparent. If you keep a disciplined habit of dependency updates and subscribe to framework security advisories, you're already doing one of the highest-leverage things you can do for your app's security posture.&lt;/p&gt;




&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://react.dev/blog/2025/12/03/critical-security-vulnerability-in-react-server-components" rel="noopener noreferrer"&gt;React Official Advisory&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://react2shell.com/" rel="noopener noreferrer"&gt;React2Shell Information Site&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.wiz.io/blog/critical-vulnerability-in-react-cve-2025-55182" rel="noopener noreferrer"&gt;Wiz Technical Analysis&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cloud.google.com/blog/products/identity-security/responding-to-cve-2025-55182" rel="noopener noreferrer"&gt;Google Cloud Response Guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://aws.amazon.com/security/security-bulletins/AWS-2025-030/" rel="noopener noreferrer"&gt;AWS Security Bulletin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://securitylabs.datadoghq.com/articles/cve-2025-55182-react2shell-remote-code-execution-react-server-components/" rel="noopener noreferrer"&gt;Datadog Security Labs Analysis&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;If you’d like to see how I’m building and securing real-world React/Next.js projects, you can check out my portfolio and resume here: &lt;strong&gt;&lt;a href="https://wilsonkinyua.com/" rel="noopener noreferrer"&gt;https://wilsonkinyua.com/&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>nextjs</category>
      <category>vulnerabilities</category>
    </item>
  </channel>
</rss>
