Плагин Woocommerce Custom Product Addons Pro для WordPress уязвим к удаленному выполнению кода во всех версиях до 5.4.1 включительно через пользовательскую формулу ценообразования eval() в функцииprocess_custom_formula() внутри include/process/price.php. Это связано с недостаточной очисткой и проверкой значений полей, отправленных пользователем, перед их передачей в функцию PHP eval(). Метод sanitize_values() удаляет HTML-теги, но не экранирует одинарные кавычки и не предотвращает внедрение PHP-кода.
Это позволяет злоумышленникам, не прошедшим проверку подлинности, выполнить произвольный код на сервере, отправив созданное значение в текстовое поле WCPA, настроенное с помощью специальной формулы ценообразования (pricingType: «custom» с {this.value}).
Показать оригинальное описание (EN)
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}).
Характеристики атаки
Последствия
Строка CVSS v3.1