CVE-2026-4001 Woocommerce Custom Product Addons Pro <= 5.4.1 - Unauthenticated Remote Code Execution via Custom Pricing Formula
Unauthenticated attackers can execute arbitrary code on servers using the WooCommerce Custom Product Addons Pro plugin by injecting PHP code into custom pricing formulas.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2026-4001?
CVE-2026-4001 is a critical code injection vulnerability in acowebs Woocommerce Custom Product Addons Pro, published on 23 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
The Woocommerce Custom Product Addons Pro plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 5.4.1 via the custom pricing formula eval() in the process_custom_formula() function within includes/process/price.php. This is due to insufficient sanitization and validation of user-submitted field values before passing them to PHP's eval() function. The sanitize_values() method strips HTML tags but does not escape single quotes or prevent PHP code injection. This makes it possible for unauthenticated attackers to execute arbitrary code on the server by submitting a crafted value to a WCPA text field configured with custom pricing formula (pricingType: "custom" with {this.value}).
Weakness: CWE-95
Which versions are affected by CVE-2026-4001?
How do I fix CVE-2026-4001?
No fix has been published for CVE-2026-4001 yet. Limit exposure of the affected software until one is available.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2026-4001 being exploited?
There is no known exploitation of CVE-2026-4001 in the wild and no public exploit code.
Public exploit code: 1 proofs of concept on GitHub.
Sources
Also known as GHSA-2qpc-rpxq-phv6.