CVE-2025-55182 - Your Quick Patch for React2Shell Guide

CVE-2025-55182 - Your Quick Patch for React2Shell Guide

Kiran Sai Subramanyam K

Managing Director and Senior Software Engineer

You’re building a cool web app with React, one of the most popular tools out there. Millions of sites use it, including big ones with Next.js. Recently, a critical security vulnerability called React2Shell (CVE-2025-55182) hit the headlines, scoring a perfect 10/10 on the danger scale.

It involves how React handles data in Server Components, potentially allowing attackers to run unauthorized code on your server. While patches were released quickly, many apps remained vulnerable in the hours and days following the disclosure.

Although this article comes a few weeks after the initial December 3rd disclosure, the risk remains for any unpatched systems. If you haven’t updated yet, now is the time.

In this article, I’ll explain what React2Shell really is, who it affects, how attackers use it, and – most importantly – what you need to do right now to stay safe.

What is React2Shell?

React2Shell is the nickname for a very serious security bug in React, officially called CVE-2025-55182.

In simple words: it lets hackers run any code they want on your server, just by sending a special request from the internet. They don’t need a username, password, or any permission. This is called remote code execution, or RCE, and it’s one of the worst kinds of vulnerabilities.

The problem is in a feature called React Server Components (RSC). These are parts of your React app that run on the server instead of in the user’s browser. Many modern apps – especially those built with Next.js – use them because they make websites faster and better for SEO.

React uses something called the “Flight” protocol to send data between the browser and the server. When the browser sends information back (like form data or actions), the server has to read and trust that information. The bug is here: React was too trusting and didn’t check the data properly. A hacker can hide bad code inside that data, and when the server reads it, the bad code runs.

That’s why it’s called React2Shell – because attackers can quickly turn a normal React app into a “shell” they control, just like having full access to the server.

This bug got a danger score of 10.0 out of 10.0 – the highest possible – because it’s easy to use, works from anywhere, and gives complete control.

It mainly affects:

If your app is pure client-side React (no server components), you’re safe. However, since most modern frameworks use them by default, it’s worth double-checking.

How to Check If You’re Affected

The bug lives in the specific npm packages that handle the server part of RSC:

Many frameworks like Next.js pull these in automatically.

Here’s how to check quickly:

  1. Go to your project folder in the terminal.
  2. Run this command to list any of those packages:
npm ls react-server-dom-webpack react-server-dom-parcel react-server-dom-turbopack

If it shows nothing or says “empty”, great – you probably don’t have them, so you’re not affected.

If it lists versions like 19.0.0, 19.1.0, 19.1.1, or 19.2.0 – you’re vulnerable and need to update right away.

If you’re using Next.js (most common case), also check your Next.js version:

npm ls next

Vulnerable Next.js versions include most of 15.x and 16.x before the patches (like 15.0.0 to 15. something low, or 16.0.0 to 16.0.6).

If you use tools like npm audit, GitHub Dependabot, or Snyk, they should flag this CVE too.

Bottom line: Run that npm ls command first. If those react-server-dom-* packages show up in bad versions, patch now – we’ll cover how in the next section!

How to Fix React2Shell

Good news: The fix is simple and straightforward – just update your packages to the patched versions. The React and Next.js teams released fixes on the same day the bug was announced (December 3, 2025), and there have been a few follow-up patches for related issues.

The best and easiest way, especially if you’re using Next.js (which most people are), is to use a free tool made by Vercel.

In your project folder, open the terminal and run:

npx fix-react2shell-next@latest

That’s it! This tool will:

It bumps to the exact patched versions recommended by the official advisories, including the latest ones for the extra bugs found later (like denial of service and source code leaks).

After it finishes, run your normal install command (like npm install or pnpm install), test your app, commit the changes, and redeploy.

If You’re Not Using Next.js (Pure React or Other Frameworks)

Update these packages manually in your package.json:

Then run your package manager install command.

You can check the official React blog for the exact list.

After Patching

  1. Redeploy your app - The fix only works on the new version running on your server.
  2. Rotate secrets - If your app was online and vulnerable before you patched (especially before early December), assume hackers might have gotten in. Change all important secrets like database passwords, API keys, JWT secrets, etc.
  3. Extra protection - If you’re on Vercel, AWS, Cloudflare, or similar, they might have automatic blocks (WAF rules) for known attacks. But patching is the only full fix.

That’s all! Updating takes just minutes, and it stops the danger completely. If you run into any issues, check the React or Next.js docs – they’re super clear on this. Stay safe out there!

Recent Blog Posts

Holidays List 2026 – XploreBits HQ

This post outlines the official list of holidays for XploreBits HQ employees for the year 2026. Please review the dates in advance to plan your work, leaves, and personal time accordingly.