
一款用于检测 CVE-2025-66470 的快速简易扫描器 —— NiceGUI 中 ui.interactive_image 组件的 XSS 漏洞。
**
| 字段 | 值 |
|---|---|
| CVE | CVE-2025-66470 |
| GHSA | GHSA-2m4f-cg75-76w2 |
| 组件 | ui.interactive_image |
| 受影响版本 | NiceGUI ≤ 3.3.1 |
| 修复版本 | NiceGUI 3.4.0+ |
| 类型 | 存储型/反射型 XSS |
ui.interactive_image 组件使用 Vue 的 v-html 指令渲染 SVG 内容,且未进行净化处理,导致可通过 <foreignObject> 标签实现 XSS。
漏洞代码:
<g v-html="content"></g>
| 文件 | 描述 |
|---|---|
nicegui_scanner.py | 简单扫描器——每个目标输出单行简洁结果 |
nicegui_xss_scanner.py | 完整扫描器——带报告的详细分析 |
targets.txt | 用于批量扫描的示例目标文件 |
git clone https://github.com/yourusername/nicegui-xss-scanner.git
cd nicegui-xss-scanner
pip install requests
单个目标:
python nicegui_scanner.py http://target.com/
批量扫描(从文件):
python nicegui_scanner.py -l targets.txt
完整分析:
python nicegui_xss_scanner.py http://target.com/
usage: nicegui_scanner.py [-h] [-l LIST] [--timeout TIMEOUT] [target]
NiceGUI XSS Scanner - CVE-2025-66470
positional arguments:
target Target URL
options:
-h, --help Show help message
-l, --list LIST File with URLs (one per line)
--timeout TIMEOUT Request timeout (default: 10)
╔══════════════════════════════════════════════════════════════╗
║ NiceGUI XSS Scanner - CVE-2025-66470 ║
╚══════════════════════════════════════════════════════════════╝
[*] Scanning 3 target(s)...
──────────────────────────────────────────────────────────────────────
[1/3] http://192.168.1.10:8080/... 🚨 CONFIRMED (v2.1.0)
[2/3] http://192.168.1.20:5000/... ⚠ VULN_VER (v3.3.0)
[3/3] http://example.com/... ✓ NOT_NICEGUI
──────────────────────────────────────────────────────────────────────
SUMMARY:
Total scanned: 3
XSS CONFIRMED: 1
✓ Saved: nicegui_CONFIRMED_174530.txt
| 状态 | 含义 |
|---|---|
| 🚨 CONFIRMED | XSS 漏洞已确认(三个检查全部通过) |
| ⚠ VULN_VER | 检测到存在漏洞的版本,需手动测试 |
| ✓ NOT_NICEGUI | 非 NiceGUI 应用 |
要将 XSS 标记为 CONFIRMED,必须通过全部三项检查:
<foreignObject>
<body xmlns="http://www.w3.org/1999/xhtml">
</body>
</foreignObject>
# Comments start with #
http://target1.com/
http://target2.com:8080/
https://target3.com/login
requests 库pip install requests
此工具仅用于授权的安全测试。请负责任地使用,并仅对您拥有测试权限的系统进行测试。
MIT 许可证 - 详见 LICENSE。