Woocommerce Custom Product Addons Pro <= 5.4.1 - Unauthenticated Remote Code Execution via Custom Pricing Formula
Strategic Overview
- Status
- Patched in 5.4.2
- Affected Plugin
- Woocommerce Custom Product Addons Pro
- Affected Version
<= 5.4.1- CVSS
- 9.8Critical
- Weakness type
- CWE-95 · Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')
- CVE
CVE-2026-4001
At a glance
CVE-2026-4001 is a critical-severity Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection') vulnerability in the Woocommerce Custom Product Addons Pro WordPress plugin, affecting versions <= 5.4.1. It carries a CVSS score of 9.8 (reachable over the network; low attack complexity; high confidentiality, integrity, availability impact). Exploitation requires no authentication. The issue is fixed in version 5.4.2; sites on affected versions should update now. Disclosed March 2026, reported by Ren Voza.
Vulnerability Overview
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}).
Technical Analysis
The vector marks this flaw as remotely reachable over the network, with low attack complexity — no special timing or configuration is needed, and no privileges on the target site, and no interaction from a victim user. A successful exploit has high impact on confidentiality, integrity, availability — full site compromise territory.
CWE-95: Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')
The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes code syntax before using the input in a dynamic evaluation call (e.g. eval).
Remediation
Update to version 5.4.2, or a newer patched version
How does WordSec protect against this?
Requests carrying this pattern arrive without a session, so nothing upstream of the firewall gets a chance to reject them: WordSec's web application firewall inspects request payloads before WordPress loads them. Classes like this one can leave something behind, so the staged malware scanner is the second half: it looks for dropped files and modified code rather than for the request that created them. None of that substitutes for the fix: Woocommerce Custom Product Addons Pro 5.4.2 closes this, and updating the plugin is the step that ends it.
- Firewall
- Scanner
- Login Security
External References
Vulnerability data © Defiant, Inc., provided under the Wordfence Intelligence T&C