Skip to main content
Vulnerability Database/CVE-2025-11821

CVE-2025-11821: WooCommerce Custom Tax Plugin XSS Flaw

CVE-2025-11821 is a stored cross-site scripting vulnerability in the WooCommerce Products By Custom Tax plugin for WordPress that allows authenticated attackers to inject malicious scripts. This article covers technical details, affected versions, impact analysis, 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-2025-11821 Overview

CVE-2025-11821 is a Stored Cross-Site Scripting (XSS) vulnerability in the WooCommerce – Products By Custom Tax plugin for WordPress. The flaw affects all versions up to and including 2.2. The plugin fails to sanitize input and escape output on user-supplied attributes passed to the woo_products_custom_tax shortcode. Authenticated users with Contributor-level permissions or higher can inject arbitrary JavaScript into pages. The injected scripts execute in the browser of any user who visits an affected page, enabling session theft, redirection, and administrative action abuse.

Critical Impact

Contributor-level accounts can plant persistent JavaScript that runs against site visitors, including administrators, leading to account takeover and WordPress site compromise.

Affected Products

  • WooCommerce – Products By Custom Tax plugin for WordPress
  • All versions up to and including 2.2
  • WordPress sites running WooCommerce with this extension installed

Discovery Timeline

  • 2025-11-11 - CVE-2025-11821 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2025-11821

Vulnerability Analysis

The vulnerability is a stored Cross-Site Scripting flaw classified under CWE-79. It lives in the plugin's public shortcode handler for woo_products_custom_tax, defined in public/class-woocommerce-products-by-custom-tax-public.php. Shortcode attributes supplied by an authenticated user are rendered into page output without proper sanitization or escaping. Because WordPress stores shortcode content inside post and page records, the payload persists across sessions and executes in every visitor's browser. The attack is scoped (CVSS scope changed) because the injected script runs in the trust context of the WordPress site, not the plugin itself.

Root Cause

The shortcode handler accepts attribute values from $atts and emits them into the HTML response without passing them through esc_attr(), esc_html(), or wp_kses(). WordPress exposes shortcode attribute editing to any user who can create or edit posts, which includes the Contributor role. The absence of both input filtering and output encoding allows HTML and JavaScript to break out of the attribute context and execute as script.

Attack Vector

An attacker authenticates to WordPress with Contributor-level access or higher. The attacker creates or edits a post that contains the woo_products_custom_tax shortcode with a crafted attribute value carrying JavaScript. When an administrator reviews the post for publication or a site visitor loads the page, the browser executes the attacker-controlled script. Payloads commonly used for this class of flaw target the WordPress REST API to create new administrator accounts, exfiltrate session cookies, or alter site content. The vulnerability requires network access to the WordPress login interface and a low-privilege account. See the Wordfence Vulnerability Report and the WordPress Plugin File Reference for the vulnerable code path.

Detection Methods for CVE-2025-11821

Indicators of Compromise

  • Posts, pages, or custom post types containing woo_products_custom_tax shortcodes with attribute values that include <script>, onerror=, onload=, javascript:, or encoded variants.
  • Unexpected administrator accounts created shortly after a Contributor edits or publishes a post.
  • Outbound requests from authenticated admin sessions to unfamiliar domains referenced in page HTML.
  • New or modified WordPress users, options, or plugin installations with no corresponding administrator activity in audit logs.

Detection Strategies

  • Query the wp_posts table for post_content entries matching the shortcode name combined with HTML event handlers or <script substrings.
  • Review WordPress audit logs for Contributor and Author accounts editing posts that use the shortcode.
  • Inspect server access logs for POST requests to /wp-admin/post.php and /wp-json/wp/v2/posts originating from low-privilege accounts.
  • Scan rendered pages with a headless browser to detect script execution from unexpected origins.

Monitoring Recommendations

  • Enable file integrity monitoring on the WordPress plugins directory and theme files.
  • Forward WordPress audit logs and web server logs to a centralized analytics platform for correlation.
  • Alert on creation of new users with administrator role or on privilege elevation events.
  • Monitor outbound HTTP traffic from browsers accessing the WordPress admin panel for suspicious destinations.

How to Mitigate CVE-2025-11821

Immediate Actions Required

  • Deactivate the WooCommerce – Products By Custom Tax plugin until a patched release is available and installed.
  • Audit all WordPress users with Contributor-level access or higher and remove unused accounts.
  • Review existing posts and pages for woo_products_custom_tax shortcodes containing suspicious attribute values and remove them.
  • Rotate credentials for administrator accounts that may have viewed compromised pages.

Patch Information

No fixed version has been published at the time of NVD release. All versions up to and including 2.2 remain vulnerable. Monitor the WordPress Plugin Overview page and the Wordfence Vulnerability Report for updates on a patched release.

Workarounds

  • Restrict the Contributor, Author, and Editor roles from using the vulnerable shortcode by filtering post_content on save.
  • Deploy a web application firewall rule that blocks requests containing woo_products_custom_tax combined with script tags or event handlers.
  • Enforce a strict Content Security Policy that disallows inline scripts and restricts script sources.
  • Replace the plugin with an alternative that is actively maintained and receives timely security updates.
bash
# Example WP-CLI command to locate posts containing the vulnerable shortcode
wp db query "SELECT ID, post_title, post_status FROM wp_posts \
  WHERE post_content LIKE '%woo_products_custom_tax%' \
  AND (post_content LIKE '%<script%' OR post_content LIKE '%onerror=%' OR post_content LIKE '%onload=%');"

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.