CVE-2024-8858
Executive Summary
CVE-2024-8858 is a Stored Cross-Site Scripting (XSS) vulnerability in the Elementor Addons by Livemesh WordPress plugin, affecting all versions up to and including 8.5. The flaw resides in the piechart_settings parameter, 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 accesses a compromised page. The vulnerability is classified as a WordPress ecosystem issue, not related to Apache or Nginx. No public exploit code or proof-of-concept is currently available, and the patch status remains unknown. CVE-2024-47303 is likely a duplicate of this issue.
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
CVSS Breakdown & Threat Level
- CVSS Score: 6.4 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low (Contributor-level)
- User Interaction: Required (victim must access the page)
- Scope: Changed (impact on other components)
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: Low
The threat level is medium due to the requirement for authenticated access and user interaction, but the potential for widespread exploitation in WordPress environments is significant.
Deep Dive & Mechanics
The vulnerability exists in the piechart_settings parameter of the Elementor Addons by Livemesh plugin. The plugin fails to properly sanitize user input and escape output when rendering pie chart settings. An attacker with Contributor-level access can inject malicious JavaScript into the parameter, which is then stored in the WordPress database. When a victim (including administrators) views the affected page, the injected script executes in their browser context, potentially leading to session hijacking, defacement, or data theft.
The root cause is a lack of input validation and output escaping in the plugin's rendering logic for pie chart elements. The piechart_settings parameter is likely processed by a shortcode or widget that directly outputs user-supplied data without proper sanitization.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code is presumed to be in the plugin's rendering function for pie charts. A typical vulnerable pattern might look like:
// Vulnerable code (hypothetical)
function render_piechart($atts) {
$settings = shortcode_atts(array('piechart_settings' => ''), $atts);
echo '<div class="piechart" data-settings="' . $settings['piechart_settings'] . '">';
// ...
}
A patched version would sanitize the input and escape the output:
// Patched code (hypothetical)
function render_piechart($atts) {
$settings = shortcode_atts(array('piechart_settings' => ''), $atts);
$safe_settings = sanitize_text_field($settings['piechart_settings']);
echo '<div class="piechart" data-settings="' . esc_attr($safe_settings) . '">';
// ...
}
Exploitation & Lab Setup
Red Team
- Prerequisites: Obtain Contributor-level credentials on a WordPress site running the vulnerable plugin.
- Craft Payload: Create a malicious JavaScript payload, e.g.,
<script>alert('XSS')</script>. - Inject: Edit a page or post and insert the payload into the
piechart_settingsparameter of the pie chart shortcode. - Trigger: Wait for an administrator or other user to view the page.
Example payload injection:
[piechart piechart_settings='<script>alert(document.cookie)</script>']
Blue Team
- Monitor: Watch for unusual JavaScript execution in the browser console.
- Audit: Review page/post content for unexpected script tags in shortcode parameters.
- Harden: Restrict Contributor-level access and enforce Content Security Policy (CSP) headers.
Indicators of Compromise (IOCs)
- File: Suspicious entries in
wp_poststable withpost_contentcontaining<script>tags inpiechart_settingsshortcode. - Log: Web server logs showing requests to pages with
piechart_settingsparameter containing encoded JavaScript. - Network: Outbound connections from compromised pages to attacker-controlled domains (if payload exfiltrates data).
Detection Engineering
YARA Rule
rule CVE_2024_8858_Stored_XSS {
meta:
description = "Detects stored XSS payloads in piechart_settings parameter"
author = "Valters IT"
date = "2024-10-01"
reference = "CVE-2024-8858"
strings:
$payload1 = /piechart_settings\s*=\s*['\"][^'\"]*<script[^>]*>/
$payload2 = /piechart_settings\s*=\s*['\"][^'\"]*on\w+\s*=/
condition:
any of them
}
Sigma Rule
title: CVE-2024-8858 Stored XSS Detection
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects potential stored XSS via piechart_settings parameter in WordPress
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains: 'piechart_settings'
cs-uri-query|re: '(<script|on\w+=)'
condition: selection
falsepositives:
- Legitimate use of JavaScript in shortcode parameters (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-8858 Stored XSS Attempt"; flow:to_server,established; content:"piechart_settings"; http_uri; pcre:"/(<script|on\w+=)/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Disable the Elementor Addons by Livemesh plugin until a patch is released.
- Short-term: Restrict Contributor-level access to trusted users only.
- Long-term: Apply input sanitization (e.g.,
sanitize_text_field()) and output escaping (e.g.,esc_attr()) to all shortcode parameters. - Monitor: Use the provided detection rules to identify exploitation attempts.
Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert
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.