一个用于检测和修复 React Server Components 与 Next.js 应用中严重 CVE-2025-55182(React2Shell)漏洞的 CLI 工具。
CVE-2025-55182 是一个严重的(CVSS 10.0)未认证远程代码执行漏洞,影响范围包括:
该漏洞是 React Server Components Flight 协议中的一个不安全反序列化缺陷。利用该漏洞仅需一个精心构造的 HTTP 请求,且已有公开的漏洞利用代码。
没有变通方案 — 必须升级到已修补的版本。
npx @amirmalek/fix-react2shell
git clone https://github.com/amir-malek/react-cve-2025-55182.git
cd react-cve-2025-55182
node fix-react2shell.js
curl -O https://raw.githubusercontent.com/amir-malek/react-cve-2025-55182/main/fix-react2shell.js
node fix-react2shell.js
进入你的 React/Next.js 项目目录并运行:
# Dry-run mode (default) - shows what would be upgraded
npx @amirmalek/fix-react2shell
# Actually perform the upgrades
npx @amirmalek/fix-react2shell --fix
# Show detailed version information
npx @amirmalek/fix-react2shell --verbose
# Show help
npx @amirmalek/fix-react2shell --help
╔══════════════════════════════════════════════════════════════╗
║ CVE-2025-55182 (React2Shell) Vulnerability Scanner ║
╚══════════════════════════════════════════════════════════════╝
Package manager: yarn
Project: my-nextjs-app
⚠ Found 1 vulnerable package(s):
✗ next
Current: 15.3.5 → Safe: 15.3.7
────────────────────────────────────────────────────────────
DRY RUN MODE - No changes made.
Run with --fix to upgrade packages.
Command that would be run:
yarn add [email protected]
--fix,否则以试运行模式运行| 软件包 | 受影响版本 | 安全版本 |
|---|---|---|
react-server-dom-webpack |
在修补版本并重新部署应用后,强烈建议执行以下操作:
MIT
欢迎在 github.com/amir-malek/react-cve-2025-55182 提交 Issue 和 Pull Request。
| 19.0.0, 19.1.0, 19.1.1, 19.2.0 |
| 19.0.1, 19.1.2, 19.2.1 |
react-server-dom-parcel | 19.0.0, 19.1.0, 19.1.1, 19.2.0 | 19.0.1, 19.1.2, 19.2.1 |
react-server-dom-turbopack | 19.0.0, 19.1.0, 19.1.1, 19.2.0 | 19.0.1, 19.1.2, 19.2.1 |
| 分支 | 安全版本 |
|---|
| 15.0.x | 15.0.5 |
| 15.1.x | 15.1.9 |
| 15.2.x | 15.2.6 |
| 15.3.x | 15.3.6 |
| 15.4.x | 15.4.8 |
| 15.5.x | 15.5.7 |
| 16.0.x | 16.0.7 |