
React Server Actions 익스플로잇 벡터 탐지 – CVE-2025-55182 / CVE-2025-66478
CVE-2025-55182 / CVE-2025-66478 탐지 – React Server Components / Next.js
이 저장소에는 다수의 Next.js 배포를 포함한 React Server Components(RSC) 및 React Server Actions(RSA) 구현체에 영향을 미치는 중대한 취약점인 React2Shell을 안전하게 탐지하도록 설계된, Lua로 작성된 Nmap Scripting Engine(NSE) 스크립트가 포함되어 있습니다.
이 탐지 방법은 잘못된 형식의 React Flight 페이로드를 처리할 때 나타나는 서버 측 오류 동작에 기반한 비침습적 사이드 채널 기법을 사용합니다. 익스플로잇, 코드 실행 또는 안전하지 않은 작업은 수행되지 않습니다.
React2Shell(CVE-2025-55182 / CVE-2025-66478)은 React Server Components 파이프라인의 심각한 설계 결함으로, 다음과 같은 공격을 허용할 수 있습니다:
내부 컴포넌트 참조에 대한 무단 액세스
임의 속성 액세스
특정 프레임워크에서의 잠재적 원격 코드 실행(RCE)
서버 측 데이터 유출 및 실행 흐름 조작
이 취약점은 React가 다음과 같은 조작된 React Flight 참조를 해석하려고 할 때 트리거됩니다:
["$1:aa:aa"]
취약한 서버에서는 이로 인해 특징적인 패턴을 포함한 500 오류가 발생합니다:
E{"digest":"..."}
이 스크립트는 유해한 작업을 시도하지 않고 해당 패턴을 탐지합니다.
✔ 안전하고 수동적인 탐지(익스플로잇 없음, RCE 시도 없음)
✔ 고정확도 React Flight 크래시 시그니처 탐지
✔ HTTP 및 HTTPS 지원
✔ 사용자 구성 가능한 경로 및 타임아웃
✔ Vercel/Netlify 완화 조치로 인한 오탐 자동 회피
✔ 자동화 파이프라인 및 SIEM 수집과 호환되는 출력
✔ 경량화되어 레드 팀 운영, 버그 바운티, 침해 대응 및 CI/CD 스캐닝에 적합
git clone https://github.com/MoisesTapia/http-react2shell.git
cd http-react2shell
파일을 Nmap 스크립트 디렉터리에 배치하세요:
sudo cp http-react2shell.nse /usr/share/nmap/scripts/
스크립트 인덱스를 업데이트하세요:
sudo nmap --script-updatedb
nmap -p80 --script http-react2shell <host>
nmap -p443 --script http-react2shell \
--script-args 'react2shell.path=/'
<host>
nmap -p443 --script http-react2shell \
--script-args 'react2shell.path=/api/action'
<host>
nmap -p443 --script http-react2shell \
--script-args 'react2shell.path=/,react2shell.timeout=20000'
<host>
nmap -iL targets.txt -p80,443 \
--script http-react2shell
nmap -sV -p80,443 \
--script "http-react2shell,http-headers,http-server-header,http-security-headers" \
<host>
PORT STATE SERVICE
443/tcp open https
| http-react2shell:
| Path: /login
| Scheme: auto (http/https decided by Nmap http library)
| No characteristic crash pattern observed.
| This suggests the tested endpoint is not vulnerable or is patched,
|_ but this is not a guarantee (other RSC/Server Actions paths may exist).
PORT STATE SERVICE
443/tcp open https
| http-react2shell:
| Path: /login
| Scheme: auto (http/https decided by Nmap http library)
| VULNERABLE: possible React2Shell (CVE-2025-55182 / CVE-2025-66478)
| Evidence: HTTP 500 + digest-like pattern found in response
|_ Notes: high-fidelity side-channel; verify manually and patch immediately.
PORT STATE SERVICE
443/tcp open https
| http-react2shell:
| Path: /login
| Scheme: auto (http/https decided by Nmap http library)
|_ ERROR: HTTP request failed (connection reset by peer)
https://github.com/lachlan2k/React2Shell-CVE-2025-55182-original-poc
https://github.com/sammwyy/R2SAE
React Flight 내부 구조에 관한 기술 분석 기사 및 연구 논문
이 프로젝트는 교육, 연구 및 방어적 보안 목적으로만 제공됩니다. 소유하지 않았거나 명시적 테스트 권한이 없는 시스템을 스캔하지 마세요. 유지관리자는 오용 또는 이로 인한 손상에 대해 책임을 지지 않습니다.
풀 리퀘스트, 개선 사항 및 추가 탐지 휴리스틱을 환영합니다. 기여할 수 있는 항목:
다중 경로 스캐닝 지원
WAF 우회 모드
추가 핑거프린팅
Nmap 내장 취약점 프레임워크와의 통합
이 도구가 레드 팀 운영, 버그 바운티 또는 방어적 보안에 도움이 된다면, GitHub 저장소에 별표 ⭐를 눌러 주세요!