CVE-2024-5061
📋 TL;DR
This vulnerability allows authenticated WordPress users with Contributor-level access or higher to inject malicious scripts into web pages using the Enfold theme. The scripts execute whenever users view the compromised pages, enabling session hijacking, defacement, or malware distribution. All WordPress sites using Enfold theme versions up to 6.0.3 are affected.
💻 Affected Systems
- Enfold - Responsive Multi-Purpose Theme for WordPress
📦 What is this software?
Enfold by Kriesi
⚠️ Risk & Real-World Impact
Worst Case
Attackers could steal administrator credentials, redirect users to malicious sites, install backdoors, or completely compromise the WordPress site and potentially the underlying server.
Likely Case
Attackers with contributor access inject malicious scripts to steal user session cookies, display fraudulent content, or redirect users to phishing pages.
If Mitigated
With proper input validation and output escaping, the attack surface is reduced, but authenticated users could still attempt injection if other vulnerabilities exist.
🎯 Exploit Status
Exploitation requires authenticated access but is straightforward once attacker has Contributor privileges. The vulnerability is well-documented and easy to weaponize.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 6.0.4 or later
Vendor Advisory: https://themeforest.net/item/enfold-responsive-multipurpose-theme/4519990
Restart Required: No
Instructions:
1. Log into WordPress admin panel. 2. Navigate to Appearance > Themes. 3. Check for Enfold theme updates. 4. Update to version 6.0.4 or later. 5. Clear any caching plugins/CDN caches.
🔧 Temporary Workarounds
Remove Contributor Role Access
allTemporarily remove Contributor role access or restrict user registration until patching is complete.
Input Sanitization Plugin
allInstall and configure a WordPress security plugin that provides additional input sanitization and XSS protection.
🧯 If You Can't Patch
- Implement strict role-based access control and audit all users with Contributor+ privileges
- Deploy a Web Application Firewall (WAF) with XSS protection rules and monitor for injection attempts
🔍 How to Verify
Check if Vulnerable:
Check WordPress admin panel > Appearance > Themes > Enfold theme version. If version is 6.0.3 or lower, the site is vulnerable.
Check Version:
wp theme list --field=name,version --path=/path/to/wordpress | grep enfold
Verify Fix Applied:
After updating, verify Enfold theme version shows 6.0.4 or higher in WordPress admin panel.
📡 Detection & Monitoring
Log Indicators:
- Unusual POST requests to theme files with wrapper_class or class parameters containing script tags
- Multiple failed login attempts followed by successful Contributor-level login
Network Indicators:
- Outbound connections to suspicious domains from your WordPress server
- Unexpected JavaScript payloads in HTTP responses
SIEM Query:
source="wordpress.log" AND ("wrapper_class" OR "class") AND ("<script>" OR "javascript:" OR "onload=" OR "onerror=")