# InPost for WooCommerce <= 2.0.1 - Unauthenticated HTML Injection via Parcel Locker ID

- **ID:** WPSEC-2026-4598
- **Plugin:** InPost PL (`inpost-for-woocommerce`), https://wordpress.org/plugins/inpost-for-woocommerce/
- **Affected versions:** all versions before 2.0.2
- **Fixed in:** 2.0.2 (Update to 2.0.2 or later.)
- **Severity:** Medium 5.3 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N)
- **Weakness:** CWE-80
- **Usage among sites WPSec scans:** plugin Low, affected versions Low (as of 2026-12-04)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/inpost-for-woocommerce
- **Fix released:** 2026-12-03
- **Published:** 2026-12-04
- **URL:** https://wpsec.com/vuln/WPSEC-2026-4598/

## Description

The InPost PL plugin for WordPress is vulnerable to HTML Injection via the parcel locker ID (the 'parcel_machine_id' checkout field, the Store API 'inpost-parcel-locker-id' extension value, and the session value saved through the 'inpost_save_to_wc_session' AJAX action) in all versions up to, and including, 2.0.1. This is due to insufficient input validation: the value was only passed through sanitize_text_field(), which keeps text such as '< div ...>', and it was then output through wp_kses_post() in the order email and in order notes, which turns it back into markup. This makes it possible for unauthenticated attackers who can place an order to inject arbitrary HTML allowed by wp_kses_post(), such as links and images, into order emails and the order notes a shop administrator views. Script execution is not possible because wp_kses_post() removes event handlers and script tags.

## References

- https://wpsec.com/vuln/WPSEC-2026-4598/
- https://plugins.svn.wordpress.org/inpost-for-woocommerce/tags/2.0.2/
- https://wordpress.org/plugins/inpost-for-woocommerce/

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

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.
