CVE-2024-39652

7.1 HIGH

📋 TL;DR

This vulnerability allows attackers to inject malicious scripts into web pages generated by the WooCommerce PDF Vouchers WordPress plugin. When users visit a specially crafted URL, the script executes in their browser, potentially stealing session cookies or performing actions on their behalf. All WordPress sites using vulnerable versions of this plugin are affected.

💻 Affected Systems

Products:
  • WPWeb Elite WooCommerce PDF Vouchers
Versions: All versions before 4.9.5
Operating Systems: Any OS running WordPress
Default Config Vulnerable: ⚠️ Yes
Notes: Requires WordPress with WooCommerce and the PDF Vouchers plugin installed. The vulnerability is in the plugin's web page generation.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers steal administrator session cookies, gain full control of the WordPress site, install backdoors, deface the site, or steal customer data including payment information.

🟠

Likely Case

Attackers steal user session cookies, redirect users to malicious sites, or perform actions on behalf of authenticated users.

🟢

If Mitigated

Script execution is blocked by browser security features or Content Security Policy, limiting damage to session hijacking attempts.

🌐 Internet-Facing: HIGH
🏢 Internal Only: LOW

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Reflected XSS typically requires user interaction (clicking a malicious link), but exploitation is straightforward once a malicious URL is crafted.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 4.9.5

Vendor Advisory: https://patchstack.com/database/vulnerability/woocommerce-pdf-vouchers/wordpress-woocommerce-pdf-vouchers-plugin-4-9-5-reflected-cross-site-scripting-xss-vulnerability?_s_id=cve

Restart Required: No

Instructions:

1. Log into WordPress admin panel. 2. Navigate to Plugins > Installed Plugins. 3. Find 'WooCommerce PDF Vouchers' and click 'Update Now'. 4. Verify version is 4.9.5 or higher.

🔧 Temporary Workarounds

Implement Content Security Policy

all

Add CSP headers to block inline script execution and restrict script sources.

Add to .htaccess: Header set Content-Security-Policy "default-src 'self'; script-src 'self'"
Add to nginx config: add_header Content-Security-Policy "default-src 'self'; script-src 'self';";

Input Validation Filter

all

Add WordPress filter to sanitize all input parameters before processing.

Add to theme functions.php: add_filter('sanitize_text_field', 'custom_sanitize_input'); function custom_sanitize_input($input) { return htmlspecialchars($input, ENT_QUOTES, 'UTF-8'); }

🧯 If You Can't Patch

  • Disable the WooCommerce PDF Vouchers plugin immediately.
  • Implement a Web Application Firewall (WAF) with XSS protection rules.

🔍 How to Verify

Check if Vulnerable:

Check plugin version in WordPress admin under Plugins > Installed Plugins. If version is below 4.9.5, you are vulnerable.

Check Version:

wp plugin list --name='woocommerce-pdf-vouchers' --field=version

Verify Fix Applied:

Confirm plugin version is 4.9.5 or higher in WordPress admin. Test vulnerable endpoints with XSS payloads to ensure they are properly sanitized.

📡 Detection & Monitoring

Log Indicators:

  • Unusual GET/POST requests containing script tags or JavaScript code in URL parameters
  • Multiple failed XSS attempts in web server logs

Network Indicators:

  • HTTP requests with suspicious parameters like <script>, javascript:, or encoded payloads

SIEM Query:

source="web_server_logs" AND (url="*<script>*" OR url="*javascript:*" OR url="*%3Cscript%3E*")

🔗 References

📤 Share & Export