React Server Components (RSC) were recently found to be affected by a high-severity remote code execution vulnerability (CVE-2025-55182).
Attackers may exploit this issue by crafting malicious serialized data in the Flight protocol, abusing features such as Next.js Server Actions, which can trigger a deserialization flaw and potentially lead to remote code execution on the server.
This post focuses how this vulnerability works, who is affected, and what you can realistically do to reduce risk—both at the application level and at the WAF layer.
What Is CVE-2025-55182?
React Server Components (RSC) were found to contain a high-risk deserialization flaw that can lead to remote code execution.
In affected setups, an attacker can:
- Craft malicious serialized payloads in the React Flight protocol
- Abuse Next.js Server Actions (
"use server") - Trigger unsafe deserialization logic
- Potentially execute arbitrary code on the server
This is not a theoretical issue. The attack surface exists anywhere RSC and Server Actions are exposed to untrusted input.
Priority 1: Identify and Patch (Primary Mitigation)
The most important mitigation is identification and upgrading. WAF rules can help, but they do not replace fixing the root cause.
1. How to Tell If You’re Affected
You are likely impacted if all or most of the following are true:
- You are using Next.js, especially v13.4 or later
- Your application uses React Server Components
- Your codebase includes the
"use server"directive (Server Actions)
⚠️ Important note
The vulnerable package (react-server-dom-webpack) is usually bundled internally by Next.js.
You will not necessarily see it in package.json, so don’t assume you’re safe just because it’s not listed as a direct dependency.
2. Upgrade Recommendation
Upgrade immediately to the latest security-patched version of Next.js.
At the time of writing, this means:
- Patched releases in Next.js 14.x
- Or newer fixed versions in Next.js 15.x
The React team has addressed the root issue by fixing the unsafe parsing of malicious Thenable objects, which was the core of the deserialization vulnerability.
This is the only complete fix.
Anything else should be treated as a temporary risk-reduction measure.
Priority 2: WAF-Level Mitigation with SafeLine
If immediate upgrading is not possible (for example, due to release freezes or legacy dependencies), you can add a defensive layer at the WAF level.
This does not eliminate the vulnerability, but it can help block known exploit patterns.
Example: SafeLine Custom Deny Rule
In SafeLine WAF, you can configure a custom deny rule with the following conditions:
- Request Header
-
Content-Typematches (regex):multipart
AND
- Request Body
-
Regex match:
[’”]?then[’”]?\s*:\s*[’”]?$1:proto:then
This rule targets payloads attempting to exploit the RSC deserialization logic by abusing Thenable structures in serialized data.
What This Rule Does (and Does Not Do)
✔️ Helps block known exploit signatures
✔️ Reduces exposure during patching windows
❌ Does not guarantee protection against new or obfuscated payloads
❌ Does not replace upgrading Next.js
Think of this as a seatbelt, not a cure.
Conclusion
- If you use Next.js + RSC + Server Actions, you should assume exposure until proven otherwise
- Upgrading is mandatory, not optional
- WAF rules (like those in SafeLine) are best used as defense-in-depth, especially during transition periods
If you’re running production workloads on modern React infrastructure, this is a good reminder that application-layer vulnerabilities can’t be fully solved at the perimeter—but a well-configured WAF can still buy you valuable time.

Top comments (0)