此脚本扫描一系列URL,检测它们是否使用 Next.js,并判断是否存在 CVE-2025-29927 漏洞。它可选地使用字典尝试利用漏洞。
# 克隆仓库
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
# 安装依赖
npm install
使用不同选项运行脚本:
node index.js -u "https://example.com" -v
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):将检测到的漏洞保存到文件。正在分析:https://example.com
https://example.com 运行 Next.js 版本:13.5.9。
可能存在 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 许可证。
| 选项 | 别名 | 描述 |
|---|
-u | --urls | URL列表(以空格或逗号分隔) |
-f | --file | 包含URL的文件(每行一个URL) |
-c | --chrome | Chromium路径(默认:/snap/bin/chromium) |
-o | --output | 保存漏洞网站结果的文件 |
-v | --verbose | 启用详细输出 |
-r | --redirect | 跟踪重定向(可选,可能导致误报) |
-a | --attack | 尝试利用漏洞(请谨慎使用) |
-w | --wordlist | 用于漏洞利用的字典文件 |
-t | --headless | 以无头模式运行 Puppeteer |
-x | --headers | 若利用失败,将使用不同请求头重试 |