WP Contact Form 7 DB Handler Plugin CSRF leading to Arbitrary File Deletion (CVE-2026-6455)
The WP Contact Form 7 DB Handler plugin for WordPress is vulnerable to Cross-Site Request Forgery (CSRF), leading to arbitrary file deletion via SQL injection and PHP object injection due to missing nonce verification and unsafe deserialization, allowing attackers to delete arbitrary files on the server.
The WP Contact Form 7 DB Handler plugin, up to version 3.0, contains a critical vulnerability that can be exploited by an attacker through Cross-Site Request Forgery (CSRF). Specifically, the process_bulk_action() function lacks proper nonce verification, which can be bypassed by omitting the _wpnonce field. This, combined with unsanitized SQL input and unsafe deserialization of the post_content field, creates a path for arbitrary file deletion. A malicious actor could craft a CSRF page that tricks a logged-in WordPress administrator into triggering a SQL injection and PHP Object Injection, ultimately leading to the deletion of sensitive files on the server. This vulnerability allows the deletion of critical files like wp-config.php or system files, potentially crippling the affected website. The vulnerability is identified as CVE-2026-6455.
Attack Chain
- Attacker crafts a malicious CSRF HTML page designed to exploit the
process_bulk_action()function. - The CSRF page is sent to a logged-in WordPress administrator (e.g., via phishing or other social engineering techniques).
- The administrator unknowingly visits the attacker-controlled page, triggering a POST request to the vulnerable endpoint without a valid nonce (
_wpnonceis omitted). - The POST request contains a UNION-based SQL injection payload embedded within the request parameters targeting a numeric SQL context (e.g.,
WHERE ID = $ID). The CHAR() function is used to bypassesc_sqlquote-escaping. - The SQL injection crafts a malicious serialized PHP array as
post_contentin the database response. - The plugin deserializes the
post_contentfield without proper sanitization. - Array values associated with keys containing
ys_cfdbh_fileare extracted and used as file paths, appended to the uploads directory path. - The extracted paths are passed to the
wp_delete_file()function without any path traversal validation, resulting in arbitrary file deletion on the server.
Impact
Successful exploitation of CVE-2026-6455 allows an attacker to delete arbitrary files on the WordPress server. This includes critical files such as wp-config.php, which contains database credentials and other sensitive configuration information. The deletion of such files can lead to complete website compromise, data loss, and significant disruption of service. The CVSS v3.1 base score for this vulnerability is 8.1, indicating a high severity.
Recommendation
- Apply available patches or updates for the WP Contact Form 7 DB Handler plugin to remediate CVE-2026-6455.
- Deploy the Sigma rule
Detect Suspicious POST Requests to WP Contact Form 7 DB Handlerto identify potential exploitation attempts targeting the vulnerable endpoint. - Implement strict input validation and sanitization for user-supplied values used in SQL queries to prevent SQL injection vulnerabilities, as highlighted in the overview of CVE-2026-6455.
- Enforce nonce verification for all administrative actions to mitigate CSRF attacks, as the
process_bulk_action()function lacks proper nonce validation.
Detection coverage 2
Detect Suspicious POST Requests to WP Contact Form 7 DB Handler
mediumDetects suspicious POST requests to the WP Contact Form 7 DB Handler plugin indicative of potential exploitation attempts targeting CVE-2026-6455.
Detect SQL Injection Attempts in WP Contact Form 7 DB Handler Requests
highDetects SQL injection attempts in requests to the WP Contact Form 7 DB Handler plugin by identifying common SQL injection payloads in request parameters, related to CVE-2026-6455.
Detection queries are available on the platform. Get full rules →