CVE-2024-52358
Executive Summary
CVE-2024-52358 is a DOM-Based Cross-Site Scripting (XSS) vulnerability found in the WordPress plugin "Responsive Addons for Elementor" by CyberChimps, affecting versions up to and including 1.5.4. This vulnerability allows an attacker to inject malicious scripts into a web page via the Document Object Model (DOM) without proper input neutralization. The attack requires user interaction (e.g., clicking a crafted link) and can lead to session hijacking, data theft, or defacement within the context of the victim's browser. As of this report, no official patch has been released, and no public exploit code is 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 resides in a WordPress plugin ecosystem. The plugin is distributed via the official WordPress plugin repository and third-party marketplaces. Users are advised to monitor the plugin's update channel for a patched version. No known supply chain compromise has been reported, but the lack of a patch increases risk for sites using this plugin.
CVSS Breakdown & Threat Level
- CVSS Score: 6.5 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Attack Vector (AV): Network – Exploitable remotely.
- Attack Complexity (AC): Low – No special conditions required.
- Privileges Required (PR): None – No authentication needed.
- User Interaction (UI): Required – Victim must click a malicious link or visit a crafted page.
- Scope (S): Changed – Impact extends beyond the vulnerable component.
- Confidentiality (C): Low – Limited data exposure.
- Integrity (I): Low – Limited ability to modify content.
- Availability (A): None – No impact on service availability.
Threat Level: Medium. The requirement for user interaction reduces the immediate risk, but the lack of a patch and the widespread use of Elementor make this a significant concern for WordPress site administrators.
Deep Dive & Mechanics
The vulnerability is a DOM-Based XSS, meaning the malicious payload is executed entirely on the client side without being sent to the server. The plugin's JavaScript code improperly handles user-controlled input (e.g., via URL fragments or query parameters) and injects it into the DOM without sanitization.
Root Cause: The plugin uses innerHTML or similar DOM manipulation methods to render dynamic content from user input (e.g., element IDs, attributes, or URL parameters) without proper encoding or validation. An attacker can craft a URL containing a malicious script payload (e.g., #<img src=x onerror=alert(1)>) that, when processed by the plugin's JavaScript, executes in the victim's browser.
Attack Flow:
- Attacker crafts a malicious URL targeting a page using the vulnerable plugin.
- Victim clicks the link (e.g., via phishing email or social engineering).
- The plugin's JavaScript reads the URL fragment or parameter and injects it into the DOM.
- The injected script executes, allowing the attacker to steal cookies, redirect the user, or perform actions on behalf of the victim.
Vulnerable vs. Patched Code
Since no patch is available, the following is a hypothetical comparison based on common fixes for DOM XSS.
Vulnerable Code (JavaScript):
// Vulnerable: Directly sets innerHTML from user input
var userInput = window.location.hash.substring(1);
document.getElementById('dynamic-content').innerHTML = userInput;
Patched Code (Hypothetical):
// Patched: Uses textContent to prevent HTML injection
var userInput = window.location.hash.substring(1);
document.getElementById('dynamic-content').textContent = userInput;
Explanation: The vulnerable code uses innerHTML, which interprets the input as HTML and executes any embedded scripts. The patched version uses textContent, which treats the input as plain text, preventing script execution.
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- A WordPress site with "Responsive Addons for Elementor" version <= 1.5.4 installed and active.
- A page using the vulnerable plugin's features (e.g., a custom element that reads URL parameters).
Exploitation Steps:
- Identify a page that uses the vulnerable plugin (e.g., a page with a dynamic element that reflects URL fragments).
- Craft a malicious URL:
http://target-site.com/vulnerable-page/#<img src=x onerror=alert(document.cookie)> - Send the URL to the victim via phishing or social engineering.
- When the victim clicks the link, the script executes, displaying their cookies in an alert box (or exfiltrating them to an attacker-controlled server).
Note: No public exploit code is available. The above is a conceptual demonstration.
Blue Team (Defensive)
Detection & Response:
- Monitor web server logs for unusual URL fragments containing
<script>,<img onerror>, or other HTML event handlers. - Implement Content Security Policy (CSP) headers to block inline scripts and restrict script sources.
- Use Web Application Firewall (WAF) rules to filter malicious payloads in URL fragments.
- Educate users about phishing links and the risks of clicking untrusted URLs.
Indicators of Compromise (IOCs)
- URL Patterns: URLs containing fragments with HTML tags or JavaScript event handlers (e.g.,
#<script>,#<img onerror=,#<svg onload=). - Client-Side Behavior: Unexpected JavaScript execution, alert boxes, or network requests to unknown domains.
- Log Entries: HTTP requests with unusual fragment identifiers (e.g.,
GET /page#<img src=x onerror=...>).
Detection Engineering
YARA Rule
rule CVE_2024_52358_DOM_XSS {
meta:
description = "Detects DOM-based XSS payloads targeting CVE-2024-52358"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-52358"
strings:
$payload1 = /#<[^>]*onerror\s*=/ nocase
$payload2 = /#<[^>]*onload\s*=/ nocase
$payload3 = /#<script[^>]*>/ nocase
$payload4 = /#javascript:/ nocase
condition:
any of them
}
Sigma Rule
title: CVE-2024-52358 DOM-Based XSS Detection
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects potential DOM-based XSS attempts targeting CVE-2024-52358
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access_log
detection:
selection:
cs-uri-query|contains:
- '#<script'
- '#<img'
- '#<svg'
- '#<iframe'
- '#javascript:'
condition: selection
falsepositives:
- Legitimate use of hash fragments with HTML-like content (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-52358 DOM-Based XSS Attempt"; flow:to_server,established; content:"#<"; http_uri; pcre:"/#<(script|img|svg|iframe|input)[^>]*>/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is released.
- Implement a Web Application Firewall (WAF) with rules to block malicious URL fragments.
- Add Content Security Policy (CSP) headers to mitigate XSS:
Content-Security-Policy: default-src 'self'; script-src 'self'; object-src 'none'; - Monitor logs for suspicious URL patterns.
Long-Term Fix:
- Apply the official patch once released by CyberChimps.
- If no patch is forthcoming, consider replacing the plugin with an alternative.
Workaround:
- Use a security plugin (e.g., Wordfence) to block malicious requests.
- Manually edit the plugin's JavaScript to use
textContentinstead ofinnerHTML(requires developer skills).
Valters IT
Securing Digital Frontiers
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.