# PW WooCommerce Gift Cards <= 2.57 - Unauthenticated HTML Injection via Gift Card To, From, and Message Fields

- **ID:** WPSEC-2026-4325
- **Plugin:** PW WooCommerce Gift Cards (`pw-woocommerce-gift-cards`), https://wordpress.org/plugins/pw-woocommerce-gift-cards/
- **Affected versions:** all versions before 2.58
- **Fixed in:** 2.58 (Update to 2.58 or later.)
- **Severity:** Medium 4.7 (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:N)
- **Weakness:** CWE-80
- **Usage among sites WPSec scans:** plugin Low, affected versions Low (as of 2026-12-01)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/pw-woocommerce-gift-cards
- **Fix released:** 2026-11-30
- **Published:** 2026-12-01
- **URL:** https://wpsec.com/vuln/WPSEC-2026-4325/

## Description

The PW WooCommerce Gift Cards plugin for WordPress is vulnerable to HTML Injection via the gift card To, From, and Message fields in all versions up to, and including, 2.57. This is due to insufficient input sanitization and output escaping. The values are only passed through sanitize_text_field()/sanitize_textarea_field(), which leave tag-like sequences with whitespace after the opening angle bracket intact. When the order item meta is displayed, wp_kses_post() turns those sequences into real HTML elements. This makes it possible for unauthenticated attackers who order a gift card to inject arbitrary HTML that wp_kses_post() allows, such as links, images and styled elements, into the order details viewed by store administrators.

## References

- https://wpsec.com/vuln/WPSEC-2026-4325/
- https://plugins.svn.wordpress.org/pw-woocommerce-gift-cards/tags/2.58/
- https://wordpress.org/plugins/pw-woocommerce-gift-cards/

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

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.
