Woocommerce Custom Product Addons Pro <= 5.4.1 - Unauthenticated Remote Code Execution via Custom Pricing Formula

2026-03-23 10:53
Ren Voza

Strategic Overview

Status
Patched in 5.4.2
Affected Version<= 5.4.1
CVSS9.8Critical
CVECVE-2026-4001
View all Woocommerce Custom Product Addons Pro vulnerabilities

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

REMEDIATION: Update to version 5.4.2, or a newer patched version --- IDENTIFIER: 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).

External References

Vulnerability data © Defiant, Inc., provided under the Wordfence Intelligence T&C

Woocommerce Custom Product Addons Pro <= 5.4.1 - Unauthenticated Remote Code Execution via Custom Pricing Formula (CVE-2026-4001)