# Coupon Affiliates – Affiliate Plugin for WooCommerce <= 8.7.1 - Unauthenticated Stored Cross-Site Scripting via Registration Coupon Code

- **ID:** WPSEC-2026-3117
- **Plugin:** Coupon Affiliates – Affiliate Plugin for WooCommerce (`woo-coupon-usage`), https://wordpress.org/plugins/woo-coupon-usage/
- **Affected versions:** from 5.2.0 before 8.7.2
- **Fixed in:** 8.7.2 (Update to 8.7.2 or later.)
- **Severity:** Medium 6.1 (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N)
- **Weakness:** CWE-79
- **Usage among sites WPSec scans:** plugin Low, affected versions Low (as of 2026-11-13)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/woo-coupon-usage
- **Fix released:** 2026-11-12
- **Published:** 2026-11-13
- **URL:** https://wpsec.com/vuln/WPSEC-2026-3117/

## Description

The Coupon Affiliates – Affiliate Plugin for WooCommerce plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the coupon code an applicant chooses on the affiliate registration form in all versions up to, and including, 8.7.1, due to insufficient input sanitization and output escaping. The coupon code is printed inside the JavaScript string of inline onClick handlers (the Decline and Delete confirmation buttons on the admin Registrations page, and the affiliate portal's tab links) with escaping that does not stop HTML entities, which the browser decodes inside the attribute, from breaking out of the string. This makes it possible for unauthenticated attackers, where affiliate registration is open to visitors, to inject arbitrary web scripts that execute when an administrator clicks one of those buttons for the attacker's application.

## References

- https://wpsec.com/vuln/WPSEC-2026-3117/
- https://plugins.svn.wordpress.org/woo-coupon-usage/tags/8.7.2/
- https://wordpress.org/plugins/woo-coupon-usage/

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

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.
