CVE-2024-49220

7.1 HIGH

📋 TL;DR

This vulnerability in the WordPress Cookie Scanner plugin allows attackers to perform Cross-Site Request Forgery (CSRF) attacks that lead to Stored Cross-Site Scripting (XSS). Attackers can trick authenticated administrators into executing malicious actions that inject persistent scripts into the website. All WordPress sites using vulnerable versions of the Cookie Scanner plugin are affected.

💻 Affected Systems

Products:
  • WordPress Cookie Scanner plugin by Nikel Schubert
Versions: All versions up to and including 1.1
Operating Systems: Any OS running WordPress
Default Config Vulnerable: ⚠️ Yes
Notes: Requires WordPress installation with the vulnerable plugin activated. The plugin must have admin or editor access enabled for the CSRF attack vector.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete site takeover through admin account compromise, data theft, malware distribution to visitors, and defacement.

🟠

Likely Case

Unauthorized script injection leading to session hijacking, credential theft from site visitors, and content manipulation.

🟢

If Mitigated

Limited impact with proper CSRF tokens and Content Security Policy (CSP) in place, though some risk remains.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires tricking an authenticated user (typically admin) to click a malicious link. The CSRF leads to stored XSS payload injection.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.2 or later

Vendor Advisory: https://patchstack.com/database/vulnerability/cookie-scanner/wordpress-cookie-scanner-plugin-1-1-csrf-to-stored-xss-vulnerability?_s_id=cve

Restart Required: No

Instructions:

1. Log into WordPress admin panel. 2. Navigate to Plugins > Installed Plugins. 3. Find 'Cookie Scanner' plugin. 4. Click 'Update Now' if available. 5. If no update appears, manually download version 1.2+ from WordPress repository and replace files via FTP/SFTP.

🔧 Temporary Workarounds

Disable Plugin

all

Temporarily deactivate the Cookie Scanner plugin until patched.

wp plugin deactivate cookie-scanner

Implement CSRF Protection

all

Add nonce verification to plugin forms if custom patching is possible.

Add wp_nonce_field() and wp_verify_nonce() calls in plugin PHP files

🧯 If You Can't Patch

  • Restrict admin access to trusted networks only
  • Implement strict Content Security Policy (CSP) headers to mitigate XSS impact

🔍 How to Verify

Check if Vulnerable:

Check WordPress admin > Plugins > Cookie Scanner. If version is 1.1 or lower, you are vulnerable.

Check Version:

wp plugin get cookie-scanner --field=version

Verify Fix Applied:

Confirm plugin version is 1.2 or higher in WordPress admin panel.

📡 Detection & Monitoring

Log Indicators:

  • Unusual POST requests to wp-admin/admin-ajax.php with cookie-scanner actions
  • Multiple failed nonce verification attempts

Network Indicators:

  • HTTP requests with suspicious script tags in parameters
  • Cross-origin requests to admin endpoints without referrer validation

SIEM Query:

source="wordpress.log" AND "cookie-scanner" AND ("admin-ajax" OR "wp-admin") AND ("script" OR "onerror" OR "javascript:")

🔗 References

📤 Share & Export