CVE-2024-12313

8.1 HIGH

📋 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

Products:
  • Compare Products for WooCommerce WordPress plugin
Versions: All versions up to and including 3.2.1
Operating Systems: Any OS running WordPress
Default Config Vulnerable: ⚠️ Yes
Notes: Requires WooCommerce to be installed. Vulnerability is present in default configuration.

⚠️ 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.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. 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.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: MEDIUM

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

Vendor Advisory: https://plugins.trac.wordpress.org/changeset?sfp_email=&sfph_mail=&reponame=&old=3078475%40woocommerce-compare-products&new=3078475%40woocommerce-compare-products

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

WordPress

Add 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

📤 Share & Export