CVE-2024-4459
Executive Summary
CVE-2024-4459 is a Stored Cross-Site Scripting (XSS) vulnerability in the Themesflat Addons For Elementor WordPress plugin, affecting all versions up to and including 2.1.2. The flaw resides in the plugin's widget title attributes, where insufficient input sanitization and output escaping allow authenticated attackers with contributor-level access or higher to inject arbitrary web scripts. These scripts execute whenever a user visits a compromised page, leading to potential session hijacking, credential theft, or defacement. The vulnerability is classified as a WordPress ecosystem issue, not related to Apache or Nginx. No public exploit code or patch is currently available.
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. Users are advised to monitor the plugin's update channel and apply any patches immediately. Since the plugin is a third-party addon for Elementor, the supply chain risk is moderate, as compromised plugins can lead to widespread site infections.
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 (contributor-level)
- User Interaction: None
- Scope: Changed
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
The medium severity reflects the need for authenticated access but the potential for widespread impact due to stored XSS.
Deep Dive & Mechanics
The vulnerability exists in the widget title rendering of the Themesflat Addons For Elementor plugin. When a user with contributor-level access or higher creates or edits a page using the plugin's widgets, the title attribute is not properly sanitized. The plugin fails to escape user-supplied attributes before outputting them in the HTML, allowing an attacker to inject JavaScript code.
Attack Flow:
- An authenticated attacker with contributor-level privileges creates a new page or post.
- The attacker inserts a vulnerable widget (e.g., a heading or icon box) and sets the title attribute to a malicious payload like
<img src=x onerror=alert('XSS')>. - The plugin stores the payload in the WordPress database without proper sanitization.
- When any user (including administrators) visits the page, the payload executes in their browser context.
The vulnerability is triggered via the title attribute of the widget, which is rendered without escaping. The plugin uses esc_attr() or similar functions incorrectly, or omits them entirely.
Vulnerable vs. Patched Code
Vulnerable Code (version <= 2.1.2):
// In widget output function
echo '<h2 class="widget-title">' . $settings['title'] . '</h2>';
The $settings['title'] is output directly without escaping.
Patched Code (hypothetical):
// Properly escaped
echo '<h2 class="widget-title">' . esc_html( $settings['title'] ) . '</h2>';
The patch would use esc_html() or wp_kses_post() to sanitize the output.
Exploitation & Lab Setup
Red Team
Prerequisites:
- WordPress installation with Themesflat Addons For Elementor <= 2.1.2
- Contributor-level account or higher
Exploitation Steps:
- Log in as a contributor.
- Create a new page or post.
- Add a vulnerable widget (e.g., "Heading" or "Icon Box").
- In the widget's title field, inject a payload:
<img src=x onerror=alert(document.cookie)> - Publish or save the page.
- When an administrator or other user visits the page, the XSS triggers.
Proof-of-Concept (PoC):
<!-- Stored XSS payload -->
<script>alert('XSS')</script>
Blue Team
Detection:
- Monitor for unusual widget title content in page/post revisions.
- Look for JavaScript event handlers in widget attributes (e.g.,
onerror,onload). - Use Web Application Firewall (WAF) rules to block common XSS patterns.
Hunting:
- Search the WordPress database for suspicious patterns in
wp_postmetaorwp_posts:SELECT * FROM wp_postmeta WHERE meta_value LIKE '%<script%' OR meta_value LIKE '%onerror%';
Indicators of Compromise (IOCs)
- File:
/wp-content/plugins/themesflat-addons-for-elementor/(presence of vulnerable version) - Database: Entries in
wp_postmetawithmeta_keycontaining_elementor_dataandmeta_valuecontaining XSS payloads. - Network: Outbound connections from compromised pages to attacker-controlled domains (if payload exfiltrates data).
- Logs: WordPress debug logs showing unexpected JavaScript execution errors.
Detection Engineering
YARA Rule
rule CVE_2024_4459_Themesflat_XSS {
meta:
description = "Detects stored XSS payloads in Themesflat Addons For Elementor widget titles"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-4459"
strings:
$xss1 = /<[^>]*onerror\s*=[^>]*>/i
$xss2 = /<[^>]*onload\s*=[^>]*>/i
$xss3 = /<script[^>]*>.*<\/script>/i
$xss4 = /javascript\s*:/i
condition:
any of ($xss*) and filesize < 10KB
}
Sigma Rule
title: CVE-2024-4459 Stored XSS in Themesflat Addons For Elementor
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects stored XSS payloads in WordPress widget titles
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: wordpress
detection:
selection:
http.url|contains: "/wp-content/plugins/themesflat-addons-for-elementor/"
http.body|contains|all:
- "widget-title"
- "onerror"
- "onload"
- "<script"
condition: selection
falsepositives:
- Legitimate use of JavaScript in widget titles (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-4459 Stored XSS in Themesflat Addons For Elementor"; flow:to_server,established; content:"/wp-content/plugins/themesflat-addons-for-elementor/"; http_uri; pcre:"/(onerror|onload|javascript\s*:)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is available.
- Restrict contributor-level access to trusted users only.
- Implement a Web Application Firewall (WAF) with rules to block XSS payloads.
Long-term Fix:
- Apply the official patch from the plugin vendor when released.
- Update to a patched version (currently unknown).
- Conduct a security audit of all third-party plugins.
Workarounds:
- Use a security plugin like Wordfence to add virtual patching.
- Manually edit the plugin files to add
esc_html()to widget title outputs (not recommended for non-developers).
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.