一个命令行安全扫描器,用于识别可能暴露于 CVE-2025-29927 的公开可访问 Next.js 应用程序。
本工具旨在用于授权的安全测试、漏洞评估、研究和防御性安全工作。
仅扫描您拥有或已获得明确测试许可的系统。
该扫描器执行外部指纹识别,并在明确请求时执行主动安全测试。报告为可能易受攻击的结果不应被视为已遭入侵的确定性证据。
# Clone the repository
git clone https://github.com/ferpalma21/Automated-Next.js-Security-Scanner-for-CVE-2025-29927.git
cd Automated-Next.js-Security-Scanner-for-CVE-2025-29927.git
# Install dependencies
npm install
npm install -g nextjs-cve-2025-29927-scanner
## 使用方法
使用不同选项运行脚本:
```sh
node index.js -u "https://example.com" -v
| 选项 | 别名 | 描述 |
|---|---|---|
-u | --urls | URL 列表(以空格/逗号分隔) |
-f | --file | 包含 URL 的文件(每行一个) |
-c | --chrome | Chromium 路径(默认:/snap/bin/chromium) |
-o | --output | 保存易受攻击站点结果的文件 |
-v | --verbose | 启用详细输出 |
-r | --redirect | 跟随重定向(可选,可能导致误报) |
-a | --attack | 尝试利用(请谨慎使用) |
-w | --wordlist | 用于利用的字典文件 |
-t | --headless | 以无头模式运行 Puppeteer |
-x | --headers | 如果利用失败,将使用不同的标头重试 |
node index.js -u "https://example.com"
node index.js -u "https://site1.com, https://site2.com"
node index.js -f urls.txt
node index.js -u "https://example.com" -o results.txt
node index.js -u "https://example.com" -v
node index.js -u "https://example.com" -a -w wordlist.txt
-v):将详细日志打印到控制台。-v 时,结果以 JSON 格式打印。-o):将检测到的漏洞保存到文件。Analyzing: https://example.com
https://example.com is running Next.js version: 13.5.9.
Potentially vulnerable to CVE-2025-29927.
升级到 Next.js 14.2.25 或 15.2.3 或更高版本。如果无法升级,请在 WAF 或服务器层面阻止 x-middleware-subrequest 标头。已修复版本:15.2.3、14.2.25、13.5.9、12.3.5
本项目根据 MIT 许可证授权。