
React Server Components에서 CVE-2025-55182(React2Shell) RCE 취약점을 탐지합니다. 오탐(False Positive) 없이 빠르고 정확한 스캐너입니다.
React Server Components의 CVSS 10.0 RCE. React 19 앱이 취약한가요?
CVE-2025-55182(React2Shell)에 대한 빠르고 정확한 스캐너입니다. 실제 환경에서 악용되고 있는 치명적인 원격 코드 실행 취약점입니다. 지능형 Server Components 탐지로 오탐(false positive)이 전혀 없습니다.
React2Shell은 인증 없이 원격 코드 실행이 가능한 React Server Components의 최대 심각도(CVSS 10.0) 취약점입니다. 공격자는 Server Function 엔드포인트에 특수하게 조작된 HTTP 요청을 보내 이를 악용할 수 있습니다.
주요 사실:
⚠️ 중요 참고: React 19.x만 취약합니다. React 18.x 및 이전 버전은 영향을 받지 않습니다.
# Option A: Node.js scanner (recommended - cross-platform, no dependencies)
npx react2shell-scanner /path/to/your/project
# Option B: Direct download and run
curl -sSL https://raw.githubusercontent.com/nxgn-kd01/react2shell-scanner/main/scan.js > scan.js
node scan.js /path/to/your/project
# Option C: Clone and run
git clone https://github.com/nxgn-kd01/react2shell-scanner.git
cd react2shell-scanner
node scan.js /path/to/your/project
몇 초 안에 결과 확인: 🚨 취약 | ⚠️ 경고 | ✅ 안전
이 도구는 지능형 취약점 탐지를 수행합니다:
'use server' 지시문 스캔React:
19.0.0, 19.1.0, 19.1.1, 19.2.0React Server DOM 패키지:
react-server-dom-webpack 19.0.0 - 19.2.0react-server-dom-parcel 19.0.0 - 19.2.0react-server-dom-turbopack 19.0.0 - 19.2.0Next.js:
14.0.0부터 14.2.34까지14.3.0-canary.0부터 14.3.0-canary.87까지15.0.0부터 15.0.6까지15.1.0부터 15.1.8까지15.2.0부터 15.2.5까지15.3.0부터 15.3.5까지15.4.0부터 15.4.7까지15.5.0부터 까지추가 영향받는 프레임워크(React 공식 권고 기준):
react-router 7.0.0 - 7.1.3waku 0.21.0 - 0.21.5@parcel/rsc 2.12.0 - 2.13.2@vitejs/plugin-rsc 0.1.0 - 0.2.0rwsdk (Redwood SDK) 0.1.0 - 0.4.0expo 52.0.0 - 52.0.9React: 19.2.1 이상
Next.js:
14.2.35+, 14.3.0-canary.88+15.0.7+, 15.1.9+, 15.2.6+, 15.3.6+, 15.4.8+, 15.5.7+16.0.10+기타 프레임워크:
react-router: 7.1.4+waku: 0.21.6+@parcel/rsc: 2.13.3+@vitejs/plugin-rsc: 0.2.1+rwsdk: 0.4.1+expo: 52.0.10+Node.js 스캐너(권장):
Bash 스캐너:
# Install jq (if using Bash scanner)
# macOS
brew install jq
# Ubuntu/Debian
sudo apt-get install jq
# RHEL/CentOS
sudo yum install jq
옵션 A: 클론(사용자에게 권장)
# Clone the repository
git clone https://github.com/nxgn-kd01/react2shell-scanner.git
cd react2shell-scanner
# Make scripts executable
chmod +x scan.sh scan.js
옵션 B: 포크(기여자에게 권장)
# Fork on GitHub (click "Fork" button on repository page)
# Then clone your fork
git clone https://github.com/YOUR_USERNAME/react2shell-scanner.git
cd react2shell-scanner
# Make scripts executable
chmod +x scan.sh scan.js
# Add upstream remote to stay updated
git remote add upstream https://github.com/nxgn-kd01/react2shell-scanner.git
옵션 C: 직접 다운로드
# Node.js version (recommended - cross-platform)
curl -O https://raw.githubusercontent.com/nxgn-kd01/react2shell-scanner/main/scan.js
chmod +x scan.js
# Bash version (Unix/Linux/macOS only)
curl -O https://raw.githubusercontent.com/nxgn-kd01/react2shell-scanner/main/scan.sh
chmod +x scan.sh
🔍 현재 디렉터리 스캔:
# Using Node.js (recommended)
node scan.js
# Using Bash
./scan.sh
📁 특정 프로젝트 스캔:
node scan.js /path/to/project
./scan.sh /path/to/project
🗂️ 재귀 스캔(모든 하위 디렉터리):
node scan.js -r
./scan.sh -r
JSON 출력(자동화용):
node scan.js --json
./scan.sh --json
CI/CD 모드(취약한 경우 코드 1로 종료):
node scan.js --ci
./scan.sh --ci
상세 출력:
node scan.js -v
./scan.sh -v
옵션 조합:
node scan.js /path/to/projects -r --json --ci
./scan.sh /path/to/projects -r --json --ci
| 코드 | 의미 |
|---|---|
| 0 | 취약점 없음 |
| 1 | 취약점 발견(--ci 플래그 사용 시) |
| 2 | 스캔 오류 발생 |
$ node scan.js ~/my-react-app
╔════════════════════════════════════════════════════════════╗
║ CVE-2025-55182 Scanner (React2Shell) ║
╚════════════════════════════════════════════════════════════╝
Severity: CRITICAL (CVSS 10.0)
Description: Unauthenticated RCE in React Server Components
Scan Summary:
Total projects: 1
Vulnerable: 1
Safe: 0
⚠ VULNERABLE PROJECTS FOUND:
1. /Users/user/my-react-app
└─ react 19.0.0 → 19.2.1
└─ next 15.0.3 → 15.0.5
Fix command:
$ cd /Users/user/my-react-app
$ npm install [email protected] [email protected]
$ node scan.js ~/projects -r --json > results.json
{
"vulnerability": "CVE-2025-55182",
"severity": "CRITICAL",
"cvss": 10.0,
"scanned": 5,
"vulnerable": 2,
"results": [
{
"path": "/Users/user/projects/app1",
"vulnerable": true,
"packages": [
{
"name": "react",
"version": "19.0.0",
"fixVersion": "19.2.1"
}
],
"packageManager": "npm",
"fixCommands": [
"cd /Users/user/projects/app1",
"npm install [email protected]"
]
}
]
}
.github/workflows/security-scan.yml
name: CVE-2025-55182 Security Scan
on: [push, pull_request]
jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Download CVE-2025-55182 Scanner
run: |
curl -O https://raw.githubusercontent.com/nxgn-kd01/cve-2025-55182-scanner/main/scan.js
chmod +x scan.js
- name: Scan for vulnerabilities
run: node scan.js --ci
GitLab CI (.gitlab-ci.yml)
security-scan:
stage: test
image: node:18
script:
- curl -O https://raw.githubusercontent.com/nxgn-kd01/cve-2025-55182-scanner/main/scan.js
- chmod +x scan.js
- node scan.js --ci
allow_failure: false
스캐너는 다음 검사를 수행합니다:
package.json 파일을 찾아 Node.js 프로젝트를 찾습니다dependencies와 devDependencies 모두에서 의존성을 파싱합니다'use server' 지시문을 찾아 Server Functions를 스캔합니다'use server' 지시문 존재 여부(Server Functions 사용 중임을 나타냄)스캐너는 오탐을 방지하기 위한 지능형 탐지를 포함합니다:
output: 'export'를 사용하는 프로젝트는 안전할 가능성이 높은 것으로 표시됩니다'use server' 지시문을 스캔하여 실제 Server Component 사용을 확인합니다출력 예시:
✓ No vulnerable projects found
ℹ Projects with analysis notes:
1. /path/to/project
ℹ Next.js ^15.1.3 is in vulnerable range, but using React 18 (safe - only React 19 affected)
2. /path/to/another-project
ℹ Next.js 16.0.5 with React 19 detected, but no 'use server' directives found (likely safe).
Note: dynamically imported Server Functions require manual review.
node scan.js -r
각 취약 프로젝트에 대해 제안된 수정 명령을 실행합니다:
cd /path/to/project
npm install [email protected] [email protected] # Example
또는 yarn 사용:
yarn upgrade [email protected] [email protected]
또는 pnpm 사용:
pnpm update [email protected] [email protected]
npm test
npm run build
node scan.js --ci
A: 현재 스캐너는 package.json의 직접 의존성만 확인합니다. 심층 의존성 스캔이 필요한 경우 이 도구와 함께 npm audit 또는 yarn audit을 사용하세요.
A: 아니요, React 18은 영향을 받지 않습니다 ✅
CVE-2025-55182는 React 19.x Server Components에만 영향을 미칩니다. 취약 범위에 해당하는 Next.js 15.x 또는 16.x 버전을 사용하더라도 스캐너는 React 18 앱을 안전한 것으로 올바르게 식별합니다.
A: 네! --ci 플래그를 사용하면 취약점이 발견될 때 스캐너가 코드 1로 종료되어 파이프라인이 실패합니다. 위의 CI/CD 통합 예시를 참조하세요.
A: 임시 완화 조치(업그레이드가 유일한 확실한 해결책입니다):
⚠️ 중요: 이는 임시 조치일 뿐입니다. 가능한 한 빨리 패치된 버전으로 업그레이드하세요.
A: 지능형 오탐 방지 기능으로 매우 정확합니다:
'use server' 지시문을 스캔하여 실제 취약점 확인A: 스캐너는 소스 파일에서 'use server' 지시문을 감지합니다. 그러나 동적으로 가져온 Server Functions(런타임에 import()를 통해 로드됨)는 정적으로 감지되지 않을 수 있습니다. 스캐너가 "'use server' 지시문을 찾을 수 없음"으로 보고하지만 Server Functions에 동적 가져오기를 사용하는 경우 해당 파일을 수동으로 검토해야 합니다. 스캐너는 이 점을 상기시키는 메모를 포함합니다.
기여는 언제나 환영합니다! 이슈나 풀 리퀘스트를 자유롭게 제출해 주세요.
# Test on sample projects
./test-scanner.sh
이 스캐너는 이제 React 공식 권고에 따라 모든 주요 RSC 지원 프레임워크를 감지합니다:
추가 프레임워크가 필요한 경우 이슈를 열거나 PR을 제출해 주세요.
MIT 라이선스 - 자세한 내용은 LICENSE 파일을 참조하세요
이 도구는 취약한 프로젝트를 식별하는 데 도움이 되도록 커뮤니티에 있는 그대로(as-is) 제공됩니다. 프로덕션에 배포하기 전에 항상 스캐너 결과를 검증하고 업데이트를 안전한 환경에서 테스트하세요.
이 도구가 유용하다고 생각되면 다음을 부탁드립니다:
안전을 유지하고 의존성을 최신 상태로 유지하세요!
| 속성 | 값 |
|---|
| CVE ID | CVE-2025-55182 |
| 이름 | React2Shell |
| CVSS 점수 | 10.0 (CRITICAL) |
| CVSS 벡터 | AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
| 공격 경로 | 네트워크 |
| 인증 | 불필요 |
| 영향 | 완전한 시스템 장악 |
15.5.616.0.0부터 16.0.9까지| 옵션 | 설명 |
|---|
-r, --recursive | Node.js 프로젝트의 모든 하위 디렉터리 스캔 |
-v, --verbose | 상세 출력 표시 |
--json | 결과를 JSON으로 출력 |
--ci | 취약점이 발견되면 코드 1로 종료(CI/CD용) |
-h, --help | 도움말 메시지 표시 |