Skip to main content
Vulnerability Database/CVE-2024-11361

CVE-2024-11361: WooCommerce PDF Generator XSS Vulnerability

CVE-2024-11361 is a reflected cross-site scripting vulnerability in PDF Invoices & Packing Slips Generator for WooCommerce plugin that enables unauthenticated attackers to inject malicious scripts. This article covers technical details, affected versions, impact assessment, and mitigation strategies.

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-11361 Overview

CVE-2024-11361 is a Reflected Cross-Site Scripting (XSS) vulnerability affecting the PDF Invoices & Packing Slips Generator for WooCommerce plugin for WordPress. The flaw stems from unsafe use of the add_query_arg function without proper output escaping on URL parameters. Unauthenticated attackers can inject arbitrary JavaScript into vulnerable pages. Successful exploitation requires tricking an authenticated user into clicking a crafted link. The issue affects all versions up to and including 2.2.1 and is tracked under [CWE-79]. The vulnerability is cataloged in the Wordfence Vulnerability Report.

Critical Impact

Attackers can execute arbitrary scripts in a victim's browser session, enabling session theft, administrative action hijacking, and WordPress site compromise through social engineering.

Affected Products

  • PDF Invoices & Packing Slips Generator for WooCommerce (WordPress plugin)
  • All versions up to and including 2.2.1
  • WordPress sites running WooCommerce with the vulnerable plugin installed

Discovery Timeline

  • 2024-11-23 - CVE-2024-11361 published to the National Vulnerability Database
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2024-11361

Vulnerability Analysis

The plugin constructs administrative URLs using WordPress's add_query_arg function without escaping the result before rendering it in HTML output. When add_query_arg is called without arguments, it reuses the current request URI, allowing attacker-controlled query parameters to flow directly into generated links. Any script payload reflected into that output executes in the context of the visiting user's browser. The affected code paths reside in includes/class-alg-wc-pdf-invoicing-admin.php at lines 213 and 244, as referenced in the plugin source trac.

Root Cause

The root cause is missing output escaping. The plugin passes the return value of add_query_arg directly into HTML attributes without wrapping it in esc_url(). This is a well-known WordPress coding pitfall documented in multiple security advisories.

Attack Vector

The attack requires user interaction. An attacker crafts a URL containing malicious query string parameters pointing to a vulnerable admin page. When an authenticated administrator clicks the link, the payload reflects into the response and executes in the browser. Because the vulnerability has a changed scope and requires only victim interaction, exploitation can be delivered through phishing emails, forum posts, or malicious advertisements.

No verified public exploitation code is available. See the WordPress Plugin Change Set for the applied fix.

Detection Methods for CVE-2024-11361

Indicators of Compromise

  • Suspicious HTTP requests to WordPress admin endpoints containing encoded <script>, onerror=, or javascript: payloads in query strings
  • Access log entries referencing the plugin's admin pages with unusually long or encoded URL parameters
  • Unexpected administrative actions originating from legitimate admin accounts shortly after clicking external links

Detection Strategies

  • Deploy a Web Application Firewall rule to flag requests containing script tags or event handlers in query parameters targeting /wp-admin/ pages
  • Review WordPress audit logs for anomalous administrator session activity following external link interactions
  • Monitor browser Content Security Policy (CSP) violation reports for inline script executions on admin pages

Monitoring Recommendations

  • Enable verbose access logging on the WordPress admin interface and forward logs to a centralized analytics platform
  • Alert on repeated 200 responses to admin URLs containing URL-encoded HTML metacharacters
  • Track plugin version inventory across managed WordPress sites to identify installations still running 2.2.1 or earlier

How to Mitigate CVE-2024-11361

Immediate Actions Required

  • Update the PDF Invoices & Packing Slips Generator for WooCommerce plugin to a version later than 2.2.1
  • Audit administrator accounts for unauthorized activity, including new users, modified roles, or injected plugins and themes
  • Rotate administrator passwords and invalidate active sessions on sites running the vulnerable version

Patch Information

The vendor committed a fix in revision 3194265 to the plugin repository. Site operators should upgrade through the WordPress plugin updater or by downloading the latest release from the plugin directory. Review the WordPress Plugin Change Set for the specific code changes.

Workarounds

  • Temporarily deactivate the plugin on affected WordPress installations until the update is applied
  • Enforce a strict Content Security Policy that blocks inline script execution on /wp-admin/ routes
  • Require administrators to access the WordPress dashboard only from dedicated, hardened browser profiles that do not open untrusted external links
bash
# Example WP-CLI command to upgrade the vulnerable plugin
wp plugin update pdf-invoicing-for-woocommerce --version=latest

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.