
A comprehensive vulnerability scanner for CVE-2025-13780, a Remote Code Execution (RCE) vulnerability in pgAdmin 4 versions ≤ 8.14.
Ein umfassender Schwachstellenscanner für CVE-2025-13780, eine Remote-Code-Ausführungs-Schwachstelle (RCE) in pgAdmin 4 Versionen ≤ 8.14.
Die Schwachstelle befindet sich in der Wiederherstellungs-Funktion von pgAdmin 4. Die Anwendung versucht, gefährliche Shell-Befehle (beginnend mit \) mit einem regulären Ausdruck zu blockieren. Diese Prüfung kann jedoch umgangen werden.
(^|\n)[ \t]*\\\xef\xbb\xbf führt dazu, dass der Regex nicht matcht\n\r anstelle von \n vor dem Backslash# Clone the repository
git clone https://github.com/ThemeHackers/CVE-2025-13780.git
cd CVE-2025-13780
# Install dependencies
pip install -r requirements.txt
requests – HTTP-Bibliothek für API-Anfragenrich (optional) – Verbesserte Terminalausgabe mit Farben und Fortschrittsbalkenpython-socketio und websocket-client (optional) – WebSocket-Unterstützung für den Exploit-Modus# Basic scan
python3 scanner.py http://localhost:5050
# With authentication
python3 scanner.py http://localhost:5050 --email [email protected] --password admin
# Verbose mode
python3 scanner.py http://localhost:5050 -v
# Scan from file
python3 scanner.py -f targets.txt
# With multi-threading (default: 5 threads)
python3 scanner.py -f targets.txt --threads 10
# Export results to JSON
python3 scanner.py -f targets.txt -o results.json --json
Der Scanner berechnet einen Konfidenz-Score (0-100) basierend auf mehreren Faktoren:
Für Versionen ≤ 8.14:
Für Versionen > 8.14:
Für unbekannte Versionen:
Verwenden Sie Docker Compose, um eine anfällige pgAdmin 4-Instanz einzurichten:
docker-compose up -d
[email protected]admin| Code | Bedeutung |
|---|---|
| 0 | Keine Schwachstellen gefunden |
| 1 | Ein oder mehrere anfällige Ziele gefunden |
| 2 | Scan-Fehler aufgetreten |
╔═══════════════════════════════════════════════════════════════╗
║ CVE-2025-13780 pgAdmin 4 Scanner ║
║ Regex Bypass Remote Code Execution ║
║ ║
║ Affected: pgAdmin 4 <= 8.14 ║
╚═══════════════════════════════════════════════════════════════╝
[*] Checking connectivity to http://localhost:5050
[+] Target appears to be pgAdmin
[+] Detected version: 8.14
[+] CSRF token obtained
[!] Version 8.14 is in vulnerable range (<= 8.14)
[*] Testing regex bypass patterns
[+] BOM bypass: BYPASSED
[+] CRLF bypass: BYPASSED
⚠️ VULNERABILITY DETECTED ⚠️
Dieses Tool wird ausschließlich für pädagogische und autorisierte Sicherheitstests bereitgestellt.
Dieses Projekt ist unter der MIT-Lizenz lizenziert – siehe die Datei LICENSE für Details.
| Option | Beschreibung |
|---|
target | Ziel-URL (z.B. http://localhost:5050) |
-f, --file | Datei mit Liste der Ziele (eines pro Zeile) |
-e, --email | pgAdmin-E-Mail zur Authentifizierung |
-p, --password | pgAdmin-Passwort zur Authentifizierung |
-o, --output | Ausgabedatei für Ergebnisse |
--json | Ergebnisse im JSON-Format ausgeben |
-q, --quiet | Banner und Info-Meldungen unterdrücken |
-v, --verbose | Detailierte/Debug-Ausgabe aktivieren |
-t, --timeout | Timeout für Anfragen in Sekunden (Standard: 10) |
--threads | Anzahl der Threads für das Scannen mehrerer Ziele (Standard: 5) |
--exploit-demo | Exploit-Demonstrationsmodus ausführen |
--exploit | Echten Exploit ausführen (erfordert --lhost) |
--lhost | IP des Angreifers für Reverse-Shell-Callback |
--lport | Port des Angreifers für Reverse-Shell (Standard: 4444) |
--cmd | Benutzerdefinierter Befehl zur Ausführung (optional) |
| Faktor | Max Punkte | Details |
|---|
| Version im anfälligen Bereich (≤ 8.14) | 40 | Version als ≤ 8.14 erkannt |
| Version unbekannt | 15 | Wenn die Version nicht ermittelt werden kann |
| Restore-Endpunkt zugänglich | 25 | Restore-API ohne Authentifizierung zugänglich |
| Restore-Endpunkt (erfordert Authentifizierung) | 15 | Restore-API existiert, erfordert aber Authentifizierung |
| Beide Umgehungsmethoden (BOM und CRLF) funktionieren | 25 | Beide Regex-Umgehungsmethoden erfolgreich |
| Eine Umgehungsmethode funktioniert | 20 | Entweder BOM- oder CRLF-Umgehung erfolgreich |
| Browser-Endpunkt zugänglich | 10 | Hauptschnittstelle von pgAdmin zugänglich |