React 服务端组件中的 CVSS 10.0 RCE。你的 React 19 应用存在漏洞吗?
用于检测 CVE-2025-55182(React2Shell)的快速、精准扫描器——这是一个已被在野利用的严重远程代码执行漏洞。凭借智能的服务端组件检测实现零误报。
React2Shell 是 React 服务端组件中的一个**最高严重级别(CVSS 10.0)**漏洞,允许未经身份验证的远程代码执行。攻击者可通过向服务端函数端点发送特制的 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' 指令| 属性 | 值 |
|---|---|
| CVE ID | CVE-2025-55182 |
| 名称 | React2Shell |
| CVSS 评分 | 10.0(严重) |
| CVSS 向量 | AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
| 攻击向量 | 网络 |
| 身份验证 | 无需 |
| 影响 | 系统完全失陷 |
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.3414.3.0-canary.0 至 14.3.0-canary.8715.0.0 至 15.0.615.1.0 至 15.1.815.2.0 至 15.2.515.3.0 至 15.3.515.4.0 至 15.4.715.5.0 至 15.5.616.0.0 至 16.0.9其他受影响框架(根据 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(推荐贡献者)
# 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
| 选项 | 描述 |
|---|---|
-r, --recursive | 扫描所有子目录中的 Node.js 项目 |
-v, --verbose | 显示详细输出 |
--json | 以 JSON 格式输出结果 |
--ci | 若发现漏洞则以退出码 1 退出(用于 CI/CD) |
-h, --help | 显示帮助信息 |
| 代码 | 含义 |
|---|---|
| 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
该扫描器执行以下检查: