用于检测使用 React Server Components 的 Next.js 应用中 CVE-2025-55182 和 CVE-2025-66478 的命令行工具。
有关漏洞及检测方法的技术细节,请参阅我们的博客文章:https://slcyber.io/research-center/high-fidelity-detection-mechanism-for-rsc-next-js-rce-cve-2025-55182-cve-2025-66478
默认情况下,扫描器会发送一个精心构造的 multipart POST 请求,其中包含一个可执行确定性数学运算(41*271 = 11111)的 RCE 概念验证(PoC)载荷。存在漏洞的主机会在 X-Action-Redirect 响应头中返回结果,形如 /login?a=11111。
扫描器默认测试根路径(/)。可使用 --path 或 --path-file 测试自定义路径。如果目标不存在漏洞,它会跟随同主机重定向(例如从 / 到 /en/)并测试重定向目标。不跟随跨域重定向。
--safe-check 标志使用一种替代检测方法,该方法依赖侧信道指标(带有特定错误摘要的 500 状态码),而无需在目标上执行代码。当不希望执行 RCE 时,请使用此模式。
--waf-bypass 标志会在 multipart 请求体前附加随机垃圾数据。这有助于规避仅分析请求体开头部分的 WAF 内容检查。默认大小为 128KB,可通过 --waf-bypass-size 配置。启用 WAF 绕过时,超时时间会自动增加到 20 秒(除非已显式设置)。
--vercel-waf-bypass 标志使用一种专门为绕过 Vercel WAF 防护而设计的替代载荷变体。该变体使用不同的 multipart 结构,并包含一个额外的表单字段。
对于运行在 Windows 上的目标,--windows 标志会将载荷从 Unix shell(echo $((41*271)))切换为 PowerShell(powershell -c "41*271")。
pip install -r requirements.txt
扫描单个主机:
python3 scanner.py -u https://example.com
扫描主机列表:
python3 scanner.py -l hosts.txt
使用多线程扫描并保存结果:
python3 scanner.py -l hosts.txt -t 20 -o results.json
使用自定义请求头扫描:
python3 scanner.py -u https://example.com -H "Authorization: Bearer token" -H "Cookie: session=abc"
使用安全侧信道检测:
python3 scanner.py -u https://example.com --safe-check
扫描 Windows 目标:
python3 scanner.py -u https://example.com --windows
使用 WAF 绕过扫描:
python3 scanner.py -u https://example.com --waf-bypass
扫描自定义路径:
python3 scanner.py -u https://example.com --path /_next
python3 scanner.py -u https://example.com --path /_next --path /api
python3 scanner.py -u https://example.com --path-file paths.txt
-u, --url Single URL to check
-l, --list File containing hosts (one per line)
-t, --threads Number of concurrent threads (default: 10)
--timeout Request timeout in seconds (default: 10)
-o, --output Output file for results (JSON)
--all-results Save all results, not just vulnerable hosts
-k, --insecure Disable SSL certificate verification
-H, --header Custom header (can be used multiple times)
-v, --verbose Show response details for vulnerable hosts
-q, --quiet Only output vulnerable hosts
--no-color Disable colored output
--safe-check Use safe side-channel detection instead of RCE PoC
--windows Use Windows PowerShell payload instead of Unix shell
--waf-bypass Add junk data to bypass WAF content inspection
--waf-bypass-size Size of junk data in KB (default: 128)
--path Custom path to test (can be used multiple times)
--path-file File containing paths to test (one per line)
RCE PoC 最初由 @maple3142 公开披露 —— 我们非常感谢他们发布了一个可用的 PoC。
该工具最初是作为一种安全检测 RCE 的方式而构建的。此功能仍可通过 --safe-check(即“安全检测”模式)使用。
结果会打印到终端。使用 -o 时,存在漏洞的主机会保存到一个 JSON 文件中,其中包含完整的 HTTP 请求和响应,以便验证。