# PDF Invoices & Packing Slips for WooCommerce <= 6.0.0 - Authenticated (Shop Manager+) Path Traversal to Local File Inclusion via PDF Template Path Setting

- **ID:** WPSEC-2026-3974
- **Plugin:** PDF Invoices & Packing Slips for WooCommerce (`woocommerce-pdf-invoices-packing-slips`), https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/
- **Affected versions:** from 1.4.7 before 6.0.1
- **Fixed in:** 6.0.1 (Update to 6.0.1 or later.)
- **Severity:** High 7.2 (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H)
- **Weakness:** CWE-22
- **Usage among sites WPSec scans:** plugin Medium, affected versions Medium (as of 2026-11-26)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/woocommerce-pdf-invoices-packing-slips
- **Fix released:** 2026-11-25
- **Published:** 2026-11-26
- **URL:** https://wpsec.com/vuln/WPSEC-2026-3974/

## Description

The PDF Invoices & Packing Slips for WooCommerce plugin for WordPress is vulnerable to Path Traversal leading to Local File Inclusion via the PDF template path setting ('template_path'), which can be saved through the settings form or a settings import, or supplied in settings preview data, in all versions up to, and including, 6.0.0. This is due to the stored template path not being validated against the installed templates: '../' sequences and stream wrappers such as phar:// are accepted, and the template files in that location (such as template-functions.php and invoice.php) are then included with PHP's include. This makes it possible for authenticated attackers who can manage the plugin's settings, which shop managers can do by default, to include and run PHP files from arbitrary directories on the server, or from an uploaded archive through the phar:// wrapper. This can lead to remote code execution.

## References

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

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

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.
