# PDF Invoices & Packing Slips for WooCommerce <= 5.16.4 - Unauthenticated Stored Cross-Site Scripting via Order Address, Custom Field, and Note Values

- **ID:** WPSEC-2026-1302
- **Plugin:** PDF Invoices & Packing Slips for WooCommerce (`woocommerce-pdf-invoices-packing-slips`), https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/
- **Affected versions:** all versions before 5.16.5
- **Fixed in:** 5.16.5 (Update to 5.16.5 or later.)
- **Severity:** Medium 5.4 (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N)
- **Weakness:** CWE-79
- **Usage among sites WPSec scans:** plugin Low, affected versions Low (as of 2026-10-21)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/woocommerce-pdf-invoices-packing-slips
- **Fix released:** 2026-10-20
- **Published:** 2026-10-21
- **URL:** https://wpsec.com/vuln/WPSEC-2026-1302/

## Description

The PDF Invoices & Packing Slips for WooCommerce plugin for WordPress is vulnerable to Stored Cross-Site Scripting via order billing and shipping addresses, custom fields, shipping notes, order notes and item meta in all versions up to, and including, 5.16.4, due to the rendered document HTML being passed through htmlspecialchars_decode() after sanitization, which turns HTML-entity-encoded customer input back into live markup. This makes it possible for unauthenticated attackers who can place orders (for example through guest checkout) to inject arbitrary web scripts that run when a store manager or administrator views the generated document in HTML output mode.

## References

- https://wpsec.com/vuln/WPSEC-2026-1302/
- https://plugins.svn.wordpress.org/woocommerce-pdf-invoices-packing-slips/tags/5.16.5/
- https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/

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

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.
