CVE-2024-3990
📋 TL;DR
This stored XSS vulnerability in the HT Mega WordPress plugin allows authenticated attackers with contributor-level access or higher to inject malicious scripts into web pages. The scripts execute when users visit the compromised pages, potentially stealing session cookies, redirecting users, or performing actions on their behalf. All WordPress sites using HT Mega plugin versions up to 2.5.0 are affected.
💻 Affected Systems
- HT Mega - Absolute Addons For Elementor WordPress plugin
📦 What is this software?
Ht Mega by Hasthemes
⚠️ Risk & Real-World Impact
Worst Case
Attackers could steal administrator session cookies, take over the WordPress site, install backdoors, deface the site, or redirect users to malicious sites.
Likely Case
Attackers with contributor access inject malicious scripts that steal user session cookies or redirect visitors to phishing pages.
If Mitigated
With proper user role management and input validation, the risk is limited to trusted contributors who might accidentally trigger the vulnerability.
🎯 Exploit Status
Exploitation requires authenticated access (contributor role or higher). The vulnerability is in the Tooltip & Popover widget where user-supplied attributes aren't properly sanitized.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 2.5.1
Restart Required: No
Instructions:
1. Log into WordPress admin panel. 2. Go to Plugins → Installed Plugins. 3. Find 'HT Mega - Absolute Addons For Elementor'. 4. Click 'Update Now' if update is available. 5. Alternatively, download version 2.5.1+ from WordPress.org and manually update.
🔧 Temporary Workarounds
Disable Tooltip & Popover Widget
allTemporarily disable the vulnerable widget until patching is possible
Edit WordPress theme functions.php and add: add_filter('elementor/widgets/register', function($widgets_manager) { $widgets_manager->unregister('htmega-tooltip'); });
Restrict Contributor Access
allTemporarily remove contributor role access or limit to trusted users only
Use WordPress role management plugins like 'User Role Editor' to modify permissions
🧯 If You Can't Patch
- Remove the HT Mega plugin entirely and use alternative Elementor addons
- Implement strict Content Security Policy (CSP) headers to mitigate XSS impact
🔍 How to Verify
Check if Vulnerable:
Check WordPress admin → Plugins → Installed Plugins → HT Mega version. If version is 2.5.0 or lower, you are vulnerable.
Check Version:
wp plugin get ht-mega-for-elementor --field=version (if WP-CLI installed)
Verify Fix Applied:
After updating, verify the plugin version shows 2.5.1 or higher in WordPress admin plugins page.
📡 Detection & Monitoring
Log Indicators:
- Unusual POST requests to /wp-admin/admin-ajax.php with tooltip/popover parameters
- Multiple failed login attempts followed by successful contributor-level login
Network Indicators:
- Unexpected JavaScript payloads in page responses containing tooltip or popover attributes
SIEM Query:
source="wordpress.log" AND ("htmega_tooltip" OR "tooltip widget" OR "popover widget") AND ("script" OR "javascript" OR "onclick")
🔗 References
- https://plugins.trac.wordpress.org/browser/ht-mega-for-elementor/tags/2.5.0/includes/widgets/htmega_tooltip.php#L620
- https://plugins.trac.wordpress.org/changeset?sfp_email=&sfph_mail=&reponame=&old=3074490%40ht-mega-for-elementor&new=3074490%40ht-mega-for-elementor&sfp_email=&sfph_mail=#file4
- https://plugins.trac.wordpress.org/changeset?sfp_email=&sfph_mail=&reponame=&old=3074490%40ht-mega-for-elementor&new=3074490%40ht-mega-for-elementor&sfp_email=&sfph_mail=#file5
- https://www.wordfence.com/threat-intel/vulnerabilities/id/98e74a23-b586-4d6a-b1ab-78838b0eed61?source=cve
- https://plugins.trac.wordpress.org/browser/ht-mega-for-elementor/tags/2.5.0/includes/widgets/htmega_tooltip.php#L620
- https://plugins.trac.wordpress.org/changeset?sfp_email=&sfph_mail=&reponame=&old=3074490%40ht-mega-for-elementor&new=3074490%40ht-mega-for-elementor&sfp_email=&sfph_mail=#file4
- https://plugins.trac.wordpress.org/changeset?sfp_email=&sfph_mail=&reponame=&old=3074490%40ht-mega-for-elementor&new=3074490%40ht-mega-for-elementor&sfp_email=&sfph_mail=#file5
- https://www.wordfence.com/threat-intel/vulnerabilities/id/98e74a23-b586-4d6a-b1ab-78838b0eed61?source=cve