CVE-2024-4702

6.4 MEDIUM

📋 TL;DR

The Mega Elements plugin for WordPress has a stored cross-site scripting (XSS) vulnerability in its Button widget. Authenticated attackers with contributor-level access or higher can inject malicious scripts that execute when users view compromised pages. This affects all versions up to and including 1.2.1.

💻 Affected Systems

Products:
  • Mega Elements Addons for Elementor
Versions: All versions up to and including 1.2.1
Operating Systems: Any OS running WordPress
Default Config Vulnerable: ⚠️ Yes
Notes: Requires WordPress with Elementor plugin installed. Contributor-level authentication is required for exploitation.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could steal session cookies, redirect users to malicious sites, deface websites, or perform actions on behalf of authenticated users.

🟠

Likely Case

Attackers with contributor access inject malicious scripts to steal admin credentials or perform limited site defacement.

🟢

If Mitigated

With proper input validation and output escaping, no script execution occurs, though malicious code may still be stored in the database.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires contributor-level WordPress access. The vulnerability is in a popular plugin, making it an attractive target.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.2.2

Vendor Advisory: https://plugins.trac.wordpress.org/changeset/3085457/mega-elements-addons-for-elementor

Restart Required: No

Instructions:

1. Log into WordPress admin panel. 2. Navigate to Plugins > Installed Plugins. 3. Find 'Mega Elements Addons for Elementor'. 4. Click 'Update Now' if available, or manually update to version 1.2.2+. 5. Verify the update completed successfully.

🔧 Temporary Workarounds

Remove Contributor Access

all

Temporarily restrict contributor-level user creation or limit existing contributor permissions.

Disable Button Widget

all

Deactivate or remove the vulnerable Button widget from the plugin if possible.

🧯 If You Can't Patch

  • Implement web application firewall (WAF) rules to block XSS payloads in POST requests.
  • Regularly audit user accounts and remove unnecessary contributor-level access.

🔍 How to Verify

Check if Vulnerable:

Check WordPress admin panel > Plugins > Installed Plugins for Mega Elements Addons for Elementor version 1.2.1 or lower.

Check Version:

wp plugin list --name='mega-elements-addons-for-elementor' --field=version

Verify Fix Applied:

Confirm plugin version is 1.2.2 or higher in WordPress admin panel.

📡 Detection & Monitoring

Log Indicators:

  • Unusual POST requests to WordPress admin-ajax.php with script tags in parameters
  • Multiple failed login attempts followed by successful contributor login

Network Indicators:

  • HTTP requests containing <script> tags in button widget parameters
  • Unexpected outbound connections from WordPress site after page views

SIEM Query:

source="wordpress.log" AND ("mega-elements" OR "button-widget") AND ("<script>" OR "javascript:")

🔗 References

📤 Share & Export