Skip to main content

CVE-2024-8873: WooCommerce Receipt Uploader XSS Vulnerability

CVE-2024-8873 is a reflected cross-site scripting vulnerability in PeproDev WooCommerce Receipt Uploader plugin that enables attackers to inject malicious scripts through crafted URLs. This article covers technical details, impact, and remediation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2024-8873 Overview

CVE-2024-8873 is a Reflected Cross-Site Scripting (XSS) vulnerability in the PeproDev WooCommerce Receipt Uploader plugin for WordPress. The flaw affects all versions up to and including 2.6.9. The plugin uses add_query_arg without proper URL escaping, allowing unauthenticated attackers to inject arbitrary JavaScript into pages. Successful exploitation requires tricking a user into clicking a crafted link. CVE-2025-24574 is likely a duplicate of this issue.

Critical Impact

Unauthenticated attackers can execute arbitrary scripts in a victim's browser session, enabling session hijacking, credential theft, or redirection to attacker-controlled infrastructure.

Affected Products

  • PeproDev WooCommerce Receipt Uploader plugin for WordPress
  • All versions up to and including 2.6.9
  • WordPress sites running WooCommerce with this plugin installed

Discovery Timeline

  • 2024-11-16 - CVE-2024-8873 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2024-8873

Vulnerability Analysis

The vulnerability is a Reflected Cross-Site Scripting flaw [CWE-79] in the wc-upload-reciept.php file of the PeproDev WooCommerce Receipt Uploader plugin. The plugin calls WordPress's add_query_arg function without properly escaping the current URL before echoing it back into the page. Because add_query_arg reflects the request URI into the HTML output, an attacker can append crafted query parameters that break out of the attribute context and inject arbitrary JavaScript. Reflected XSS requires user interaction, since the payload must travel inside a URL the victim clicks.

Root Cause

The root cause is missing output encoding on URL data returned by add_query_arg. WordPress developer documentation explicitly warns that the return value of add_query_arg can contain user input and must be passed through esc_url before being written to HTML. The vulnerable code did neither escape nor validate the reflected URL, allowing arbitrary characters, including script tags and event handlers, to reach the browser.

Attack Vector

An unauthenticated attacker crafts a URL to a page served by the vulnerable plugin and appends a malicious query string. The attacker delivers the link through phishing emails, forum posts, or malicious advertisements. When a logged-in administrator or customer clicks the link, the injected script executes in their browser under the trusted site origin. The attacker can then exfiltrate cookies, perform actions as the victim, or stage further attacks against the WooCommerce store.

See the Wordfence Vulnerability Report and the WordPress Plugin Code Snippet for technical details on the vulnerable call site.

Detection Methods for CVE-2024-8873

Indicators of Compromise

  • Web server access logs showing requests to receipt uploader endpoints containing URL-encoded <script>, javascript:, or event handlers such as onerror= and onload=.
  • Unusual query parameters appended to WooCommerce receipt upload URLs originating from external referrers.
  • Browser console errors or outbound requests from administrator sessions to unknown third-party domains after visiting a plugin page.

Detection Strategies

  • Inspect HTTP request logs for query strings containing script payloads, encoded angle brackets (%3Cscript%3E), or data: URIs targeting plugin endpoints.
  • Deploy a web application firewall rule that blocks reflected XSS patterns in requests to /wc-upload-reciept.php and related plugin routes.
  • Correlate authenticated administrator sessions with external referrer URLs pointing to WooCommerce receipt pages.

Monitoring Recommendations

  • Monitor WordPress audit logs for administrative actions originating from suspicious user agents or geolocations.
  • Alert on content security policy (CSP) violations reported by browsers visiting the WooCommerce site.
  • Track installed plugin versions across managed WordPress instances and flag any PeproDev WooCommerce Receipt Uploader version at or below 2.6.9.

How to Mitigate CVE-2024-8873

Immediate Actions Required

  • Update the PeproDev WooCommerce Receipt Uploader plugin to the version released after 2.6.9 that includes the fix referenced in WordPress Plugin Changeset 3194699.
  • Audit administrator and customer accounts for unauthorized changes made since the plugin was installed.
  • Rotate session cookies and administrator passwords if any suspicious activity is observed.

Patch Information

The plugin maintainer addressed the issue in the changeset published at WordPress Plugin Changeset 3194699. The fix applies proper escaping to the URL returned by add_query_arg before it is reflected in HTML output. Site administrators should upgrade to the latest version available on the WordPress plugin repository.

Workarounds

  • Deactivate and remove the PeproDev WooCommerce Receipt Uploader plugin until the patched version is installed.
  • Deploy a web application firewall rule to block requests containing XSS payloads targeting the plugin's endpoints.
  • Enforce a strict Content Security Policy that disallows inline scripts and restricts script sources to trusted origins.
bash
# Example WP-CLI command to update the plugin to the patched version
wp plugin update pepro-bacs-receipt-upload-for-woocommerce

# Verify the installed version is above 2.6.9
wp plugin get pepro-bacs-receipt-upload-for-woocommerce --field=version

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.