CVE-2024-8433
Executive Summary
CVE-2024-8433 is a Stored Cross-Site Scripting (XSS) vulnerability in the Easy Mega Menu Plugin for WordPress – ThemeHunk plugin. The flaw resides in the themehunk_megamenu_bg_image parameter, which is insufficiently sanitized and escaped. Authenticated attackers with subscriber-level access or higher can inject arbitrary web scripts that execute when any user visits a page containing the injected payload. The vendor released version 1.1.0 with partial authorization fixes, but the core XSS issue remains unpatched. This vulnerability is part of the WordPress ecosystem and does not affect Apache or Nginx directly.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability affects a WordPress plugin distributed via the official WordPress plugin repository. No known supply chain compromise has been reported, but the lack of a complete patch increases risk for sites using this plugin. Administrators should monitor for updates and consider removing the plugin if no full fix is provided.
CVSS Breakdown & Threat Level
- CVSS Score: 6.4 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low (Subscriber)
- User Interaction: None
- Scope: Changed
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
Threat Level: Medium. The vulnerability requires authentication but is easily exploitable by low-privilege users. The stored XSS can lead to session hijacking, defacement, or phishing attacks.
Deep Dive & Mechanics
The vulnerability exists in the themehunk_megamenu_bg_image parameter, which is used to set a background image URL for mega menu items. The plugin fails to properly sanitize user input and escape output when rendering this parameter. An authenticated attacker with subscriber-level access can inject malicious JavaScript code into the parameter. When an administrator or other user views the menu settings or a page that renders the menu, the injected script executes in the context of the victim’s browser.
The partial fix in version 1.1.0 added authorization checks to prevent unauthorized access to the menu settings, but it did not address the underlying input sanitization issue. Therefore, any user who can still access the menu settings (e.g., editors or administrators) can exploit the XSS.
Vulnerable vs. Patched Code
Vulnerable Code (<= 1.1.0):
// In themehunk-megamenu.php or similar
$bg_image = $_POST['themehunk_megamenu_bg_image'];
// No sanitization or escaping
update_option('themehunk_megamenu_bg_image', $bg_image);
Patched Code (Not available):
// Expected fix
$bg_image = sanitize_url($_POST['themehunk_megamenu_bg_image']);
update_option('themehunk_megamenu_bg_image', esc_url($bg_image));
The vulnerable code directly stores user input without sanitization. A proper fix would use sanitize_url() on input and esc_url() on output.
Exploitation & Lab Setup
Red Team
Prerequisites: WordPress installation with Easy Mega Menu Plugin <= 1.1.0, a subscriber-level account.
Steps:
- Log in as a subscriber.
- Navigate to the menu settings (e.g.,
/wp-admin/admin.php?page=themehunk-megamenu). - Set the
themehunk_megamenu_bg_imageparameter to a malicious payload:" onerror="alert('XSS')" x=" - Save the settings.
- When an administrator visits the menu settings or a page rendering the menu, the script executes.
Proof of Concept:
curl -X POST 'http://target/wp-admin/admin.php?page=themehunk-megamenu' \ -d 'themehunk_megamenu_bg_image=" onerror="alert(document.cookie)" x="' \ --cookie 'wordpress_logged_in_xxx=subscriber_cookie'
Blue Team
- Detection: Monitor for unusual POST requests to
admin.php?page=themehunk-megamenuwith suspiciousthemehunk_megamenu_bg_imagevalues. - Mitigation:
- Disable the plugin until a full patch is released.
- Use a Web Application Firewall (WAF) to block XSS payloads.
- Restrict access to menu settings to trusted roles only.
Indicators of Compromise (IOCs)
- File:
/wp-content/plugins/themehunk-megamenu/themehunk-megamenu.php - Database Option:
themehunk_megamenu_bg_imagecontaining malicious JavaScript. - Network: POST requests to
/wp-admin/admin.php?page=themehunk-megamenuwiththemehunk_megamenu_bg_imageparameter containing script tags or event handlers. - Logs: WordPress debug logs showing unexpected script execution.
Detection Engineering
YARA Rule
rule CVE_2024_8433_Stored_XSS {
meta:
description = "Detects stored XSS payload in themehunk_megamenu_bg_image option"
author = "Valters IT"
date = "2025-04-01"
reference = "CVE-2024-8433"
strings:
$payload1 = /themehunk_megamenu_bg_image.*<script/i
$payload2 = /themehunk_megamenu_bg_image.*onerror/i
$payload3 = /themehunk_megamenu_bg_image.*onload/i
condition:
any of them
}
Sigma Rule
title: CVE-2024-8433 Stored XSS in Easy Mega Menu Plugin
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects exploitation attempts of stored XSS via themehunk_megamenu_bg_image parameter
author: Valters IT
date: 2025-04-01
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: 'admin.php?page=themehunk-megamenu'
cs-uri-query|contains: 'themehunk_megamenu_bg_image'
condition: selection
falsepositives:
- Legitimate admin updates with safe URLs
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2024-8433 Stored XSS in Easy Mega Menu Plugin";
flow:to_server,established;
content:"POST";
http_method;
content:"admin.php?page=themehunk-megamenu";
http_uri;
content:"themehunk_megamenu_bg_image";
http_client_body;
pcre:"/themehunk_megamenu_bg_image=[^&]*<[^>]*script/i";
sid:1000001;
rev:1;
reference:cve,2024-8433;
)
Remediation & Mitigation
- Immediate: Disable the Easy Mega Menu Plugin until a full patch is released.
- Short-term:
- Implement a WAF rule to block XSS payloads in the
themehunk_megamenu_bg_imageparameter. - Restrict access to menu settings to administrators only.
- Implement a WAF rule to block XSS payloads in the
- Long-term:
- Apply input sanitization (
sanitize_url()) and output escaping (esc_url()) to the vulnerable parameter. - Monitor the plugin repository for an official patch.
- Apply input sanitization (
- Workaround: If the plugin is essential, manually edit the code to add sanitization as shown in the patched code section.
Valters IT
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.