CVE-2024-0827
Executive Summary
CVE-2024-0827 is a Cross-Site Request Forgery (CSRF) vulnerability affecting the Play.ht – Make Your Blog Posts Accessible With Text to Speech Audio plugin for WordPress, up to and including version 3.6.4. The vulnerability stems from missing or incorrect nonce validation on several plugin functions, allowing an unauthenticated attacker to forge requests that, when triggered by a logged-in administrator (e.g., via clicking a malicious link), can perform unauthorized actions on the WordPress site. The CVSS v3.1 base score is 4.3 (Medium), with a low EPSS score of 0.0%, indicating low exploitation likelihood in the wild. No public proof-of-concept (PoC) or exploit code is available at this time.
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 specific to the WordPress plugin ecosystem. The plugin is distributed via the official WordPress plugin repository. Users should verify the integrity of their plugin files and ensure they are sourced from the official repository. No supply chain compromise has been reported.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
- Base Score: 4.3 (Medium)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: None (PR:N)
- User Interaction: Required (UI:R) – the attacker must trick an administrator into clicking a link.
- Scope: Unchanged (S:U)
- Confidentiality Impact: None (C:N)
- Integrity Impact: Low (I:L) – unauthorized actions can be performed, but data confidentiality is not directly affected.
- Availability Impact: None (A:N)
Threat Level: Medium. While the CVSS score is moderate, the requirement for user interaction reduces the immediate risk. However, in a social engineering context, this can be exploited to modify plugin settings or perform other administrative actions.
Deep Dive & Mechanics
The Play.ht plugin provides text-to-speech functionality for WordPress posts. The vulnerability lies in the plugin’s AJAX handlers and other administrative functions that lack proper CSRF nonce validation. In WordPress, a nonce is a security token used to verify that a request originated from the intended user and not from a third party. Without this check, an attacker can craft a malicious link or form that, when visited by an authenticated administrator, will execute arbitrary plugin functions.
Affected Functions: The plugin’s codebase includes several functions (e.g., saving settings, generating audio, etc.) that are registered via add_action with wp_ajax_ hooks. These hooks are intended for authenticated users but do not call check_ajax_referer() or wp_verify_nonce().
Attack Flow:
- Attacker crafts a malicious HTML page or email containing a forged request (e.g., a POST to
wp-admin/admin-ajax.phpwith actionplay_ht_save_settingsand malicious parameters). - Attacker tricks an authenticated WordPress administrator into visiting the crafted page (e.g., via phishing email or social media).
- The administrator’s browser sends the forged request, including their valid cookies/session.
- The plugin processes the request without verifying the nonce, leading to unauthorized changes (e.g., altering API keys, disabling features, or injecting malicious audio).
Vulnerable vs. Patched Code
Vulnerable Code (version 3.6.4):
// Example of a vulnerable AJAX handler without nonce check
add_action('wp_ajax_play_ht_save_settings', 'play_ht_save_settings_callback');
function play_ht_save_settings_callback() {
// Process and save settings without nonce verification
update_option('play_ht_api_key', $_POST['api_key']);
wp_die();
}
Patched Code (hypothetical fix):
add_action('wp_ajax_play_ht_save_settings', 'play_ht_save_settings_callback');
function play_ht_save_settings_callback() {
// Verify nonce before processing
if (!wp_verify_nonce($_POST['_wpnonce'], 'play_ht_save_settings_nonce')) {
wp_die('CSRF validation failed.');
}
update_option('play_ht_api_key', sanitize_text_field($_POST['api_key']));
wp_die();
}
The patch adds a call to wp_verify_nonce() using a unique action name, ensuring that only requests originating from the legitimate admin interface are processed.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A WordPress site with Play.ht plugin version <= 3.6.4.
- An authenticated administrator session (the victim).
Exploitation Steps:
- Identify the vulnerable AJAX actions by reviewing the plugin source or using a tool like Burp Suite to intercept admin requests.
- Craft a malicious HTML page that auto-submits a form to the target site:
<html> <body> <form action="http://target-site.com/wp-admin/admin-ajax.php" method="POST"> <input type="hidden" name="action" value="play_ht_save_settings"> <input type="hidden" name="api_key" value="attacker_controlled_key"> <input type="submit" value="Click me"> </form> <script>document.forms[0].submit();</script> </body> </html> - Host the page and send the link to the victim administrator (e.g., via email).
- Once the victim visits the page, the request is sent with their cookies, and the plugin settings are modified.
Note: No public exploit code is available; this is a conceptual demonstration.
Blue Team (Detection & Defense)
Detection:
- Monitor for unusual AJAX requests to
admin-ajax.phpwith actions related to Play.ht (e.g.,play_ht_*). - Look for requests lacking a valid
_wpnonceparameter or with suspicious referer headers. - Use web application firewalls (WAF) to block requests with missing or invalid nonces.
Defense:
- Immediately update the plugin to a patched version once available.
- Implement additional CSRF protections at the WordPress level (e.g., using
wp_nonce_field()in forms). - Educate administrators about phishing risks and the importance of verifying links before clicking.
Indicators of Compromise (IOCs)
- Network IOCs:
- HTTP POST requests to
/wp-admin/admin-ajax.phpwithactionparameter containingplay_ht_prefix. - Requests missing the
_wpnonceparameter or with an invalid nonce.
- HTTP POST requests to
- File IOCs:
- Modified plugin files (e.g.,
play-ht/play-ht.php) with altered settings or backdoor code.
- Modified plugin files (e.g.,
- Log IOCs:
- WordPress debug log entries showing failed nonce checks (if logging is enabled).
- Unusual changes to
wp_optionstable entries forplay_ht_*options.
Detection Engineering
YARA Rule
rule detect_playht_csrf_vulnerability {
meta:
description = "Detects vulnerable Play.ht plugin files missing nonce checks"
author = "Valters IT"
date = "2024-01-01"
reference = "CVE-2024-0827"
strings:
$ajax_action = /add_action\s*\(\s*['\"]wp_ajax_play_ht_/
$nonce_check = /check_ajax_referer|wp_verify_nonce/
condition:
$ajax_action and not $nonce_check
}
Sigma Rule
title: Play.ht CSRF Exploitation Attempt
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects potential CSRF attacks against Play.ht plugin
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: 'admin-ajax.php'
cs-uri-query|contains: 'action=play_ht_'
filter:
cs-uri-query|contains: '_wpnonce'
condition: selection and not filter
falsepositives:
- Legitimate admin actions with valid nonce
level: medium
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-0827 Play.ht CSRF Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/admin-ajax.php"; http_uri; content:"action=play_ht_"; http_client_body; pcre:"/^(?!.*_wpnonce).*$/"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Update the plugin: Check the WordPress plugin repository for an updated version. If unavailable, consider disabling the plugin until a patch is released.
- Implement virtual patching: Use a WAF to block requests to
admin-ajax.phpthat containaction=play_ht_without a valid nonce. - Harden WordPress: Ensure all admin users have strong passwords and enable two-factor authentication (2FA) to reduce the risk of session hijacking.
Long-term Fix:
- The vendor must add nonce validation to all AJAX handlers and administrative functions. This can be done by calling
check_ajax_referer()orwp_verify_nonce()before processing any request.
Workaround:
- If the plugin cannot be updated, restrict access to
wp-admin/admin-ajax.phpvia.htaccessor server-level rules for non-whitelisted IPs (not recommended for production).
Valters IT
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.