CVE-2024-39646
📋 TL;DR
This vulnerability allows attackers to inject malicious scripts into web pages generated by the Custom 404 Pro WordPress plugin. When users visit specially crafted URLs, their browsers execute attacker-controlled JavaScript. All WordPress sites using vulnerable versions of this plugin are affected.
💻 Affected Systems
- WordPress Custom 404 Pro plugin
📦 What is this software?
Custom 404 Pro by Kunalnagar
⚠️ Risk & Real-World Impact
Worst Case
Attackers could steal session cookies, redirect users to malicious sites, perform actions on behalf of authenticated users, or deface websites.
Likely Case
Attackers typically use this to steal session cookies or credentials, potentially gaining administrative access to WordPress sites.
If Mitigated
With proper input validation and output encoding, malicious scripts would be neutralized before reaching users' browsers.
🎯 Exploit Status
Reflected XSS vulnerabilities are commonly exploited and require minimal technical skill.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Versions after 3.11.1
Restart Required: No
Instructions:
1. Log into WordPress admin panel
2. Navigate to Plugins > Installed Plugins
3. Find Custom 404 Pro plugin
4. Click 'Update Now' if available
5. Alternatively, download latest version from WordPress repository and replace plugin files
🔧 Temporary Workarounds
Disable plugin
allTemporarily disable the Custom 404 Pro plugin until patched
wp plugin deactivate custom-404-pro
Web Application Firewall
allDeploy WAF rules to block XSS payloads
🧯 If You Can't Patch
- Implement Content Security Policy (CSP) headers to restrict script execution
- Use browser security features like HttpOnly cookies and SameSite attributes
🔍 How to Verify
Check if Vulnerable:
Check WordPress admin panel > Plugins > Custom 404 Pro for version number
Check Version:
wp plugin get custom-404-pro --field=version
Verify Fix Applied:
Verify plugin version is greater than 3.11.1
📡 Detection & Monitoring
Log Indicators:
- Unusual GET/POST requests with script tags or JavaScript in URL parameters
- 404 error logs containing suspicious parameters
Network Indicators:
- HTTP requests with JavaScript payloads in query strings
- Unusual redirects from 404 pages
SIEM Query:
source="wordpress.log" AND ("<script" OR "javascript:" OR "onerror=" OR "onload=")