# YayPricing – WooCommerce Dynamic Pricing & Discounts <= 3.6.2 - Authenticated (Shop Manager+) Stored Cross-Site Scripting via Pricing Rule Values

- **ID:** WPSEC-2026-4168
- **Plugin:** YayPricing – WooCommerce Dynamic Pricing & Discounts (`yaypricing`), https://wordpress.org/plugins/yaypricing/
- **Affected versions:** all versions before 3.6.3
- **Fixed in:** 3.6.3 (Update to 3.6.3 or later.)
- **Severity:** Medium 4.4 (CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:L/I:L/A:N)
- **Weakness:** CWE-79
- **Usage among sites WPSec scans:** plugin Medium, affected versions Medium (as of 2026-11-28)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/yaypricing
- **Fix released:** 2026-11-27
- **Published:** 2026-11-28
- **URL:** https://wpsec.com/vuln/WPSEC-2026-4168/

## Description

The YayPricing – WooCommerce Dynamic Pricing & Discounts plugin for WordPress is vulnerable to Stored Cross-Site Scripting via pricing rule values in all versions up to, and including, 3.6.2. This is due to insufficient input sanitization and output escaping. The stored pricing value and maximum discount of a rule are placed unchanged into a JavaScript price formula. That formula is printed without escaping in the 'data-formula' attribute of offer descriptions, and the storefront variation script passes it to JavaScript eval(). This makes it possible for authenticated attackers with Shop Manager-level access and above, who can save pricing rules through the plugin's REST API, to inject arbitrary web scripts. The scripts run when a shopper views an affected product page. This only affects multi-site installations and installations where unfiltered_html has been disabled.

## References

- https://wpsec.com/vuln/WPSEC-2026-4168/
- https://plugins.svn.wordpress.org/yaypricing/tags/3.6.3/
- https://wordpress.org/plugins/yaypricing/

Source: WPSec, https://wpsec.com/vuln/WPSEC-2026-4168/

License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Free to use, share and adapt, also commercially, if you credit WPSec and link to this advisory.
