CVE-2023-51540

7.1 HIGH

📋 TL;DR

This stored cross-site scripting (XSS) vulnerability in the WordPress Custom 404 Pro plugin allows attackers to inject malicious scripts into web pages. When users view affected pages, the scripts execute in their browsers, potentially stealing credentials or performing unauthorized actions. All WordPress sites using Custom 404 Pro versions up to 3.10.0 are affected.

💻 Affected Systems

Products:
  • WordPress Custom 404 Pro plugin
Versions: All versions up to and including 3.10.0
Operating Systems: Any OS running WordPress
Default Config Vulnerable: ⚠️ Yes
Notes: Requires WordPress installation with Custom 404 Pro plugin enabled. The vulnerability exists in how the plugin handles input during web page generation.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could steal administrator credentials, take over WordPress sites, install backdoors, deface websites, or redirect visitors to malicious sites.

🟠

Likely Case

Attackers inject malicious JavaScript to steal user session cookies, perform actions as authenticated users, or redirect users to phishing pages.

🟢

If Mitigated

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

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Stored XSS vulnerabilities are commonly exploited. While no public PoC is confirmed, the vulnerability type is well-understood and easily weaponized.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Versions after 3.10.0

Vendor Advisory: https://patchstack.com/database/vulnerability/custom-404-pro/wordpress-custom-404-pro-plugin-3-10-0-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 Custom 404 Pro and click 'Update Now'. 4. If no update is available, deactivate and delete the plugin immediately.

🔧 Temporary Workarounds

Disable Custom 404 Pro Plugin

all

Temporarily deactivate the vulnerable plugin until patched version is available

wp plugin deactivate custom-404-pro

Implement Content Security Policy

all

Add CSP headers to restrict script execution sources

Add to .htaccess: Header set Content-Security-Policy "default-src 'self'; script-src 'self'"
Add to wp-config.php: header("Content-Security-Policy: default-src 'self'; script-src 'self'");

🧯 If You Can't Patch

  • Disable the Custom 404 Pro plugin immediately
  • Implement web application firewall (WAF) rules to block XSS payloads

🔍 How to Verify

Check if Vulnerable:

Check WordPress admin → Plugins → Installed Plugins for Custom 404 Pro version 3.10.0 or earlier

Check Version:

wp plugin get custom-404-pro --field=version

Verify Fix Applied:

Verify plugin version is higher than 3.10.0 in WordPress admin panel

📡 Detection & Monitoring

Log Indicators:

  • Unusual POST requests to WordPress admin-ajax.php or admin-post.php with script tags
  • Multiple 404 errors followed by suspicious parameter values

Network Indicators:

  • HTTP requests containing <script> tags in URL parameters or POST data
  • Outbound connections to suspicious domains after visiting 404 pages

SIEM Query:

source="wordpress.log" AND ("custom-404-pro" OR "404-pro") AND ("<script>" OR "javascript:" OR "onerror=" OR "onload=")

🔗 References

📤 Share & Export