Плагин Printcart Store Web to Print Product Designer for WooCommerce для WordPress уязвим для произвольной загрузки файлов во всех версиях вплоть до 2.13.2. This is due to the `nbu_crop_image` AJAX handler accepting a user-supplied `url` parameter that `Nbdesigner_IO::convert_url_to_path()` concatenates onto the uploads base directory without normalizing or stripping `../` sequences, and then deriving both the output directory and output file extension via `pathinfo()` from the same attacker-controlled path — with no `stripImage()` call before `writeImage()` is invoked. Это позволяет неавторизованным злоумышленникам записывать контролируемый злоумышленником контент PHP в произвольные места за пределами каталога загрузок, что приводит к удаленному выполнению кода, когда впоследствии запрашивается написанный файл.
Эта уязвимость может быть использована только тогда, когда параметр сайта nbdesigner_upload_popup_style установлен в a` (Advanced Upload Popup), что приводит к регистрации обработчика для неаутентифицированных запросов; однако требуемый save-design nonce печатается на полностью общедоступной странице frontend upload-design-file, что делает его тривиальным доступным для любого анонимного посетителя, как только эта конфигурация активна.
Показать оригинальное описание (EN)
The Printcart Store – Web to Print Product Designer for WooCommerce plugin for WordPress is vulnerable to Arbitrary File Upload in all versions up to, and including, 2.13.2. This is due to the `nbu_crop_image` AJAX handler accepting a user-supplied `url` parameter that `Nbdesigner_IO::convert_url_to_path()` concatenates onto the uploads base directory without normalizing or stripping `../` sequences, and then deriving both the output directory and output file extension via `pathinfo()` from the same attacker-controlled path — with no `stripImage()` call before `writeImage()` is invoked. This makes it possible for unauthenticated attackers to write attacker-controlled PHP content to arbitrary locations outside the uploads directory, resulting in remote code execution when the written file is subsequently requested. This vulnerability is only exploitable when the `nbdesigner_upload_popup_style` site option is set to `a` (Advanced Upload Popup), which causes the handler to be registered for unauthenticated requests; however, the required `save-design` nonce is printed on the fully public frontend `upload-design-file` page, making it trivially obtainable by any anonymous visitor once that configuration is active.
Характеристики атаки
Последствия
Строка CVSS v3.1