
Um scanner rápido e simples para detectar a CVE-2025-66470 - vulnerabilidade XSS no componente ui.interactive_image do NiceGUI.

** Um scanner rápido e simples para detectar CVE-2025-66470 - vulnerabilidade XSS no componente ui.interactive_image do NiceGUI.
**
| Campo | Valor |
|---|---|
| CVE | CVE-2025-66470 |
| GHSA | GHSA-2m4f-cg75-76w2 |
| Componente | ui.interactive_image |
| Afetado | NiceGUI ≤ 3.3.1 |
| Corrigido | NiceGUI 3.4.0+ |
| Tipo | XSS Armazenado/Refletido |
O componente ui.interactive_image renderiza conteúdo SVG usando a diretiva v-html do Vue sem sanitização, permitindo XSS via tag <foreignObject>.
Código vulnerável:
<g v-html="content"></g>
| Arquivo | Descrição |
|---|---|
nicegui_scanner.py | Scanner simples - Saída limpa de uma linha por alvo |
nicegui_xss_scanner.py | Scanner completo - Análise detalhada com relatórios |
targets.txt | Arquivo de alvos de exemplo para varredura em lote |
git clone https://github.com/yourusername/nicegui-xss-scanner.git
cd nicegui-xss-scanner
pip install requests
Alvo Único:
python nicegui_scanner.py http://target.com/
Varredura em Lote (a partir de arquivo):
python nicegui_scanner.py -l targets.txt
Análise Completa:
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
| Status | Significado |
|---|---|
| 🚨 CONFIRMED | Vulnerabilidade XSS confirmada (todas as 3 verificações passaram) |
| ⚠ VULN_VER | Versão vulnerável detectada, requer teste manual |
| ✓ NOT_NICEGUI | Não é uma aplicação NiceGUI |
Para que o XSS seja marcado como CONFIRMED, todas as 3 verificações devem passar:
<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
requestspip install requests
Esta ferramenta é apenas para testes de segurança autorizados. Use com responsabilidade e somente em sistemas nos quais você tenha permissão para testar.
Licença MIT - Consulte LICENSE para obter detalhes.