CVE-2024-54314
📋 TL;DR
This stored cross-site scripting (XSS) vulnerability in the Primary Addon for Elementor WordPress plugin allows attackers to inject malicious scripts into web pages. When users view pages containing the malicious content, the scripts execute in their browsers, potentially stealing credentials or performing unauthorized actions. All WordPress sites using vulnerable versions of this plugin are affected.
💻 Affected Systems
- Primary Addon for Elementor WordPress plugin
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Attackers could steal administrator credentials, take over the WordPress site, deface content, or redirect visitors to malicious sites, potentially compromising the entire website and user data.
Likely Case
Attackers inject malicious JavaScript to steal user session cookies, perform actions on behalf of users, or display phishing content to visitors.
If Mitigated
With proper input validation and output encoding, malicious scripts would be neutralized before reaching users' browsers, preventing exploitation.
🎯 Exploit Status
Stored XSS vulnerabilities typically require some level of access to inject content, but once injected, the payload executes automatically for all visitors.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 1.6.1 or later
Restart Required: No
Instructions:
1. Log into WordPress admin panel. 2. Navigate to Plugins → Installed Plugins. 3. Find 'Primary Addon for Elementor' and click 'Update Now'. 4. Verify the plugin version is 1.6.1 or higher.
🔧 Temporary Workarounds
Disable vulnerable plugin
allTemporarily deactivate the Primary Addon for Elementor plugin until patched
wp plugin deactivate primary-addon-for-elementor
Implement Content Security Policy
allAdd CSP headers to restrict script execution sources
Add to .htaccess: Header set Content-Security-Policy "default-src 'self'; script-src 'self'"
Or add to wp-config.php: header("Content-Security-Policy: default-src 'self'; script-src 'self'");
🧯 If You Can't Patch
- Remove the Primary Addon for Elementor plugin completely and use alternative Elementor addons
- Implement web application firewall (WAF) rules to block XSS payloads in POST/GET requests
🔍 How to Verify
Check if Vulnerable:
Check WordPress admin → Plugins → Installed Plugins for 'Primary Addon for Elementor' version. If version is 1.6.0 or lower, you are vulnerable.
Check Version:
wp plugin get primary-addon-for-elementor --field=version
Verify Fix Applied:
After updating, verify the plugin shows version 1.6.1 or higher in WordPress admin plugins list.
📡 Detection & Monitoring
Log Indicators:
- Unusual POST requests to WordPress admin-ajax.php or admin-post.php containing script tags
- Multiple failed login attempts followed by successful login and plugin modification
Network Indicators:
- HTTP requests containing <script> tags in parameters, especially to plugin-specific endpoints
- Outbound connections to suspicious domains from your WordPress site
SIEM Query:
source="wordpress.log" AND ("primary-addon" OR "elementor") AND ("<script>" OR "javascript:" OR "onerror=" OR "onload=")