CVE-2023-40196

7.1 HIGH

📋 TL;DR

Unauthenticated Reflected Cross-Site Scripting (XSS) vulnerability in the ImageRecycle PDF & Image Compression WordPress plugin allows attackers to inject malicious scripts via crafted URLs. When users click malicious links, attackers can steal session cookies, redirect users, or perform actions on their behalf. This affects WordPress sites using ImageRecycle plugin version 3.1.11 or earlier.

💻 Affected Systems

Products:
  • ImageRecycle PDF & Image Compression WordPress Plugin
Versions: <= 3.1.11
Operating Systems: Any OS running WordPress
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects WordPress installations with the ImageRecycle plugin installed and activated.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers steal administrator session cookies, gain full control of WordPress site, install backdoors, deface website, or steal sensitive data.

🟠

Likely Case

Attackers steal user session cookies, redirect visitors to malicious sites, or perform limited actions within user permissions.

🟢

If Mitigated

With proper Content Security Policy (CSP) headers and input validation, impact is limited to script execution in isolated contexts.

🌐 Internet-Facing: HIGH - WordPress sites are typically internet-facing, and unauthenticated exploitation makes this easily accessible to attackers.
🏢 Internal Only: MEDIUM - Internal users could still be targeted via phishing or compromised internal systems.

🎯 Exploit Status

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

Reflected XSS vulnerabilities are commonly exploited via phishing or malicious links. No authentication required.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 3.1.12 or later

Vendor Advisory: https://patchstack.com/database/vulnerability/imagerecycle-pdf-image-compression/wordpress-imagerecycle-pdf-image-compression-plugin-3-1-11-reflected-cross-site-scripting-xss-vulnerability

Restart Required: No

Instructions:

1. Log into WordPress admin panel. 2. Go to Plugins → Installed Plugins. 3. Find 'ImageRecycle pdf & image compression'. 4. Click 'Update Now' if available. 5. If no update appears, manually download version 3.1.12+ from WordPress.org and replace plugin files.

🔧 Temporary Workarounds

Disable Plugin

all

Temporarily deactivate the ImageRecycle plugin until patched.

wp plugin deactivate imagerecycle-pdf-image-compression

Implement WAF Rules

all

Add Web Application Firewall rules to block XSS payloads targeting ImageRecycle endpoints.

🧯 If You Can't Patch

  • Implement strict Content Security Policy (CSP) headers to limit script execution
  • Use browser security features like X-XSS-Protection and X-Content-Type-Options headers

🔍 How to Verify

Check if Vulnerable:

Check WordPress admin → Plugins → Installed Plugins → ImageRecycle pdf & image compression → Version number. If version is 3.1.11 or lower, you are vulnerable.

Check Version:

wp plugin get imagerecycle-pdf-image-compression --field=version

Verify Fix Applied:

After updating, verify plugin version shows 3.1.12 or higher in WordPress admin panel.

📡 Detection & Monitoring

Log Indicators:

  • Unusual GET/POST requests to ImageRecycle plugin endpoints with script tags or JavaScript payloads
  • Multiple 400/404 errors from XSS filter blocks

Network Indicators:

  • HTTP requests containing <script>, javascript:, or encoded XSS payloads in query parameters

SIEM Query:

source="wordpress.log" AND ("imagerecycle" OR "wp-content/plugins/imagerecycle") AND ("<script>" OR "javascript:" OR "onerror=" OR "onload=")

🔗 References

📤 Share & Export