CVE-2024-4452
Executive Summary
CVE-2024-4452 is a Stored Cross-Site Scripting (XSS) vulnerability in the ElementsKit Pro WordPress plugin, affecting versions up to and including 3.6.1. The flaw resides in the url parameter, where insufficient input sanitization and output escaping allow authenticated attackers with contributor-level permissions or higher to inject arbitrary web scripts. These scripts execute whenever a user accesses a compromised page, leading to potential session hijacking, data theft, or defacement. The vulnerability is part of the WordPress ecosystem and is not related to Apache or Nginx.
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 commercial WordPress plugin distributed via the ElementsKit Pro ecosystem. No open-source package (NPM, PyPI, Go, Ruby) is involved. Users must obtain patches directly from the vendor or disable the plugin until a fix is applied.
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 (impact on other components)
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
The threat level is medium due to the requirement for authenticated access, but the potential for widespread exploitation via stored scripts makes it a significant risk for WordPress sites using the plugin.
Deep Dive & Mechanics
The vulnerability is a classic Stored XSS in the url parameter of the ElementsKit Pro plugin. The plugin fails to properly sanitize user-supplied URLs before storing them in the database and later rendering them in the frontend. An attacker with contributor-level access can craft a malicious URL containing JavaScript payloads, such as:
javascript:alert('XSS')
or
" onmouseover="alert(1)
When the URL is rendered in a page (e.g., in a button or link), the script executes in the context of the victim's browser. The lack of output escaping allows the injected script to bypass standard protections.
Vulnerable vs. Patched Code
Vulnerable Code (<= 3.6.1):
The plugin likely uses a function like esc_url() incorrectly or not at all. Example vulnerable snippet:
$url = $_POST['url'];
// No sanitization or escaping
echo '<a href="' . $url . '">Click</a>';
Patched Code (Hypothetical):
A proper fix would involve using esc_url() for output and sanitize_text_field() for input:
$url = sanitize_text_field($_POST['url']);
echo '<a href="' . esc_url($url) . '">Click</a>';
Exploitation & Lab Setup
Red Team
Prerequisites: WordPress site with ElementsKit Pro <= 3.6.1, contributor-level account.
Steps:
- Log in as a contributor.
- Navigate to a page or post editor where ElementsKit Pro widgets are available.
- Insert a widget that accepts a URL (e.g., button, link).
- In the URL field, inject a payload such as:
javascript:alert(document.cookie) - Save/publish the page.
- When an admin or visitor views the page, the script executes.
Advanced Payload:
" onfocus="alert(1)" autofocus="
Blue Team
- Detection: Monitor for unusual URL parameters in page/post submissions from contributor-level users.
- Prevention: Implement Web Application Firewall (WAF) rules to block
javascript:URIs and event handlers. - Response: If compromised, remove the malicious content from the database and reset affected user sessions.
Indicators of Compromise (IOCs)
- Network: HTTP requests containing
javascript:oron*=in URL parameters. - Host: Database entries in
wp_postsorwp_postmetacontaining<script>tags or event handlers. - File: Modified plugin files (though unlikely, as the vulnerability is in stored data).
- Logs: WordPress debug logs showing unexpected script execution.
Detection Engineering
YARA Rule
rule CVE_2024_4452_ElementsKit_XSS {
meta:
description = "Detects stored XSS payloads in ElementsKit Pro URL fields"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-4452"
strings:
$payload1 = /javascript\s*:/ nocase
$payload2 = /on\w+\s*=\s*["']?[^"']*["']?/ nocase
$payload3 = /<script[^>]*>/i
condition:
any of them
}
Sigma Rule
title: CVE-2024-4452 ElementsKit Pro Stored XSS
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects stored XSS attempts via URL parameter in ElementsKit Pro
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
c-uri|contains:
- 'javascript:'
- 'onmouseover='
- 'onfocus='
condition: selection
falsepositives:
- Legitimate use of javascript: URIs (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-4452 ElementsKit Pro Stored XSS Attempt"; flow:to_server; content:"javascript:"; nocase; http_uri; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Disable the ElementsKit Pro plugin until a patch is released.
- Short-term: Restrict contributor-level users from using URL fields in widgets.
- Long-term: Apply vendor patch when available (check ElementsKit Pro changelog).
- Compensating Controls: Use a WAF to block XSS payloads, enforce Content Security Policy (CSP), and sanitize all user inputs.
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.