CVE-2021-24863
📋 TL;DR
This vulnerability allows attackers to perform SQL injection attacks by manipulating the User-Agent header in requests to WordPress sites using the StopBadBots plugin. Attackers can potentially execute arbitrary SQL commands, leading to data theft, modification, or complete system compromise. All WordPress sites running vulnerable versions of the StopBadBots plugin are affected.
💻 Affected Systems
- StopBadBots WordPress Plugin
📦 What is this software?
Stop Bad Bots by Billminozzi
⚠️ Risk & Real-World Impact
Worst Case
Complete database compromise allowing data exfiltration, privilege escalation, remote code execution, and full site takeover.
Likely Case
Database information disclosure, user data theft, and potential administrative access to the WordPress site.
If Mitigated
Limited impact with proper input validation and parameterized queries preventing SQL injection.
🎯 Exploit Status
Exploitation requires sending specially crafted HTTP requests with malicious User-Agent headers.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 6.67
Vendor Advisory: https://wpscan.com/vulnerability/1e4dd002-6c96-44f9-bd55-61359265f7ae
Restart Required: No
Instructions:
1. Log into WordPress admin panel. 2. Navigate to Plugins. 3. Find StopBadBots plugin. 4. Click 'Update Now' if available. 5. Alternatively, download version 6.67+ from WordPress repository and manually update.
🔧 Temporary Workarounds
Disable StopBadBots Plugin
allTemporarily disable the vulnerable plugin until patching is possible.
wp plugin deactivate stopbadbots
Web Application Firewall Rule
allBlock malicious User-Agent patterns containing SQL injection attempts.
🧯 If You Can't Patch
- Implement strict input validation for User-Agent headers at the web server level
- Deploy a WAF with SQL injection protection rules
🔍 How to Verify
Check if Vulnerable:
Check WordPress admin panel > Plugins > StopBadBots for version number below 6.67
Check Version:
wp plugin list --name=stopbadbots --field=version
Verify Fix Applied:
Confirm plugin version is 6.67 or higher in WordPress admin panel
📡 Detection & Monitoring
Log Indicators:
- Unusual SQL errors in WordPress logs
- Requests with suspicious User-Agent strings containing SQL keywords
Network Indicators:
- HTTP requests with User-Agent containing SQL injection payloads
SIEM Query:
source="wordpress.log" AND "SQL syntax" AND "User-Agent"