CVE-2024-12313
📋 TL;DR
The Compare Products for WooCommerce WordPress plugin is vulnerable to PHP object injection through deserialization of untrusted cookie data. Unauthenticated attackers can exploit this to inject malicious PHP objects, potentially leading to arbitrary file deletion, data theft, or code execution if a suitable POP chain exists via other installed plugins/themes. All WordPress sites using this plugin up to version 3.2.1 are affected.
💻 Affected Systems
- Compare Products for WooCommerce WordPress plugin
⚠️ Manual Verification Required
This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.
Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).
🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.
- Review the CVE details at NVD
- Check vendor security advisories for your specific version
- Test if the vulnerability is exploitable in your environment
- Consider updating to the latest version as a precaution
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution leading to complete system compromise, data exfiltration, or website defacement if a suitable POP chain exists in installed plugins/themes.
Likely Case
Denial of service through arbitrary file deletion or limited data exposure if no suitable POP chain exists in the environment.
If Mitigated
Minimal impact with proper web application firewalls and security monitoring detecting suspicious deserialization attempts.
🎯 Exploit Status
Exploitation requires a suitable POP chain from other installed plugins/themes for full impact. Without POP chain, impact is limited.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Version 3.2.2 or later
Restart Required: No
Instructions:
1. Log into WordPress admin panel. 2. Navigate to Plugins → Installed Plugins. 3. Find 'Compare Products for WooCommerce'. 4. Click 'Update Now' if update available. 5. Alternatively, download latest version from WordPress plugin repository and manually update.
🔧 Temporary Workarounds
Cookie Validation Filter
WordPressAdd input validation filter for 'woo_compare_list' cookie to prevent malicious payloads
Add to theme's functions.php or custom plugin: add_filter('woo_compare_cookie_data', function($data) { return is_string($data) ? $data : ''; });
🧯 If You Can't Patch
- Disable the Compare Products for WooCommerce plugin immediately
- Implement web application firewall (WAF) rules to block requests with suspicious cookie content
🔍 How to Verify
Check if Vulnerable:
Check WordPress admin → Plugins → Compare Products for WooCommerce → Version. If version is 3.2.1 or lower, system is vulnerable.
Check Version:
wp plugin list --name='Compare Products for WooCommerce' --field=version
Verify Fix Applied:
Verify plugin version is 3.2.2 or higher in WordPress admin panel.
📡 Detection & Monitoring
Log Indicators:
- Unusual cookie values in 'woo_compare_list' parameter
- PHP deserialization errors in web server logs
- Unexpected file deletion or modification events
Network Indicators:
- HTTP requests with base64-encoded or serialized data in 'woo_compare_list' cookie
- Multiple rapid requests attempting different payloads
SIEM Query:
source="web_logs" AND (cookie="*woo_compare_list*" AND (cookie="*O:*" OR cookie="*a:*" OR cookie="*s:*"))
🔗 References
- https://plugins.trac.wordpress.org/browser/woocommerce-compare-products/trunk/classes/class-wc-compare-functions.php#L219
- https://plugins.trac.wordpress.org/browser/woocommerce-compare-products/trunk/classes/class-wc-compare-functions.php#L237
- https://plugins.trac.wordpress.org/browser/woocommerce-compare-products/trunk/classes/class-wc-compare-functions.php#L256
- https://plugins.trac.wordpress.org/browser/woocommerce-compare-products/trunk/classes/class-wc-compare-functions.php#L275
- https://www.wordfence.com/threat-intel/vulnerabilities/id/638e8e67-38b3-4fc4-bd77-8f268030a93a?source=cve