CVE-2024-47384

7.1 HIGH

📋 TL;DR

This vulnerability allows attackers to inject malicious scripts into web pages generated by the WP Compress 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 WP Compress – Image Optimizer [All-In-One] are affected.

💻 Affected Systems

Products:
  • WP Compress – Image Optimizer [All-In-One]
Versions: All versions through 6.20.13
Operating Systems: Any OS running WordPress
Default Config Vulnerable: ⚠️ Yes
Notes: All WordPress installations with the vulnerable plugin are affected regardless of configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could steal administrator session cookies, take over WordPress sites, install backdoors, or redirect visitors to malicious sites.

🟠

Likely Case

Attackers steal user session cookies or credentials through phishing links, potentially gaining unauthorized access to WordPress admin panels.

🟢

If Mitigated

With proper input validation and output encoding, malicious scripts are neutralized before reaching users' browsers.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Reflected XSS typically requires user interaction (clicking a malicious link) but is easy to weaponize in phishing campaigns.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 6.20.14 or later

Vendor Advisory: https://patchstack.com/database/vulnerability/wp-compress-image-optimizer/wordpress-wp-compress-plugin-6-20-13-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 WP Compress – Image Optimizer. 4. Click 'Update Now' if available. 5. Alternatively, download version 6.20.14+ from WordPress repository and manually update.

🔧 Temporary Workarounds

Disable vulnerable plugin

all

Temporarily disable the WP Compress plugin until patched

wp plugin deactivate wp-compress-image-optimizer

Implement WAF rules

linux

Add web application firewall rules to block XSS payloads

ModSecurity: SecRule ARGS "<script" "id:1001,phase:2,deny"

🧯 If You Can't Patch

  • Implement Content Security Policy (CSP) headers to restrict script execution
  • Use browser security extensions that block reflected XSS attacks

🔍 How to Verify

Check if Vulnerable:

Check WordPress admin → Plugins → WP Compress version. If version is 6.20.13 or earlier, you are vulnerable.

Check Version:

wp plugin get wp-compress-image-optimizer --field=version

Verify Fix Applied:

Verify plugin version is 6.20.14 or later in WordPress admin panel.

📡 Detection & Monitoring

Log Indicators:

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

Network Indicators:

  • HTTP requests with suspicious parameters like ?param=<script>alert()</script>
  • Traffic patterns showing users accessing unusual URLs with encoded payloads

SIEM Query:

source="web_server.log" AND ("<script" OR "javascript:" OR "onload=" OR "onerror=") AND uri_path="/wp-admin/admin-ajax.php"

🔗 References

📤 Share & Export