Docker-based lab reproducing CVE-2025-55182 (React2Shell), an unauthenticated RCE in React Server Components Flight Protocol, with PoC exploit and patched comparison.
CVE-2025-55182 (React2Shell) is a CVSS 10.0 critical Unauthenticated Remote Code Execution (RCE) vulnerability in React Server Components (RSC)'s Flight Protocol, affecting react-server-dom-parcel, react-server-dom-turbopack, react-server-dom-webpack packages.
git clone https://github.com/abhaybansal16/cve-2025-55182-lab
cd cve-2025-55182-lab
docker compose build
docker compose up -d
docker ps
docker compose down
| Package | Vulnerable Versions |
|---|---|
| React (react-server-dom-webpack/turbopack/parcel) | 19.0.0, 19.1.0, 19.1.1, 19.2.0 |
| NextJS | 14.3.0-canary.77+, 15.0.0-15.5.6, 16.0.0-16.0.6 |
This lab demonstrates the vulnerability using NextJS 15.5.6 / React 19.1.0 React as the vulnerable pair.
pip install requests
python3 exploit-poc.py http://localhost:3000
python3 exploit-poc.py http://localhost:3001
Status: 500
Output: root:x:0:0:root:/root:/bin/sh\nbin:x:1:1:bin:/bin:/sbin/nologin\ndaemon:x:2:2:daemon:/sbin:/sbin/nologin\nlp:x:4:7:lp:/var/spool/lpd:/sbin/nologin\nsync:x:5:0:sync:/sbin:/bin/sync\nshutdown:x:6:0:shutdown:/sbin:/sbin/shutdown\nhalt:x:7:0:halt:/sbin:/sbin/halt\nmail:x:8:12:mail:/var/mail:/sbin/nologin\nnews:x:9:13:news:/usr/lib/news:/sbin/nologin\nuucp:x:10:14:uucp:/var/spool/uucppublic:/sbin/nologin\ncron:x:16:16:cron:/var/spool/cron:/sbin/nologin\nftp:x:21:21::/var/lib/ftp:/sbin/nologin\nsshd:x:22:22:sshd:/dev/null:/sbin/nologin\ngames:x:35:35:games:/usr/games:/sbin/nologin\nntp:x:123:123:NTP:/var/empty:/sbin/nologin\nguest:x:405:100:guest:/dev/null:/sbin/nologin\nnobody:x:65534:65534:nobody:/:/sbin/nologin\nnode:x:1000:1000::/home/node:/bin/sh
Status: 404
Raw: Server action not found.
docker exec react2shell-vulnerable cat /app/package.json | grep -E '"next"|"react"'
You can also use wappalyzer extension to check the running version of react and next in the appication on browser.
python3 exploit-poc.py <target>
404 Server Action Not Found - PatchedUpgrade to patched versions
npm install [email protected] # for 13.3.x, 13.4.x, 13.5.x, 14.x
npm install [email protected] # for 15.0.x
npm install [email protected] # for 15.1.x
npm install [email protected] # for 15.2.x
npm install [email protected] # for 15.3.x
npm install [email protected] # for 15.4.x
npm install [email protected] # for 15.5.x
npm install [email protected] # for 16.0.x
npm install [email protected] # for 16.1.x
npm install [email protected] // for 15.x canary releases
npm install [email protected] // for 16.x canary releases
15.0.8, 15.1.12, 15.2.9, 15.3.9, 15.4.10, 15.5.10, 15.6.0-canary.61, 16.0.11, 16.1.5
If you are on version 13.3 or later version of Next.js 13 (13.3.x, 13.4.x, or 13.5.x) please upgrade to version 14.2.35. If you are on [email protected] or a later canary release, downgrade to the latest stable 14.x release:
npm install next@14
If you are using React Router’s unstable RSC APIs, you should upgrade the following package.json dependencies if they exist:
npm install react@latest
npm install react-dom@latest
npm install react-server-dom-parcel@latest
npm install react-server-dom-webpack@latest
npm install @vitejs/plugin-rsc@latest
npm install inside app folder first, then rebuild."CredsStore": "" in ~/.docker/config.json.docker compose up -d first.