# YITH WooCommerce Wishlist <= 4.21.0 - Authenticated (Contributor+) Stored Cross-Site Scripting via prettyPhoto Popup Link Attributes

- **ID:** WPSEC-2026-3871
- **Plugin:** YITH WooCommerce Wishlist (`yith-woocommerce-wishlist`), https://wordpress.org/plugins/yith-woocommerce-wishlist/
- **Affected versions:** all versions before 4.21.1
- **Fixed in:** 4.21.1 (Update to 4.21.1 or later.)
- **Severity:** Medium 5.4 (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N)
- **Weakness:** CWE-79
- **Usage among sites WPSec scans:** plugin High, affected versions High (as of 2026-11-25)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/yith-woocommerce-wishlist
- **Fix released:** 2026-11-24
- **Published:** 2026-11-25
- **URL:** https://wpsec.com/vuln/WPSEC-2026-3871/

## Description

The YITH WooCommerce Wishlist plugin for WordPress is vulnerable to Stored Cross-Site Scripting via prettyPhoto popup links in all versions up to, and including, 4.21.0. This is due to the wishlist script starting prettyPhoto on any anchor on the page whose 'data-rel' value is prettyPhoto[ask_an_estimate] or prettyPhoto[create_wishlist], not only on links the plugin generated. prettyPhoto then writes the alt text of an image inside the link, and the link's title attribute, into the page as HTML without sanitization. This makes it possible for authenticated attackers with Contributor-level access and above to inject arbitrary web scripts into pages that load the wishlist script. The scripts run when a user clicks the injected link.

## References

- https://wpsec.com/vuln/WPSEC-2026-3871/
- https://plugins.svn.wordpress.org/yith-woocommerce-wishlist/tags/4.21.1/
- https://wordpress.org/plugins/yith-woocommerce-wishlist/

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

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.
