Плагин Blocksy Companion для WordPress уязвим к произвольной загрузке файлов во всех версиях до 2.1.46 включительно через функцию save_attachments. Это связано с тем, что расширение Custom Fonts регистрирует фильтр wp_check_filetype_and_ext, который утверждает любое имя файла, содержащее .woff2 или .ttf, в качестве подстроки через strpos(), а не проверяет, что эти строки отображаются как окончательное расширение через PATHINFO_EXTENSION, что позволяет именам файлов с двойным расширением, таким как Shell.woff2.php, проходить проверку MIME и обрабатываться как разрешенные файлы шрифтов. Это позволяет неаутентифицированным злоумышленникам загружать файлы, которые могут быть исполняемыми, что делает возможным удаленное выполнение кода.
Эту уязвимость можно использовать только в том случае, если установлена премиум-версия плагина (blocksy-companion-pro) с активными расширениями WooCommerce Extra (Advanced Reviews) и Custom Fonts; бесплатный плагин Blocky-Companion не содержит уязвимых путей кода.
Показать оригинальное описание (EN)
The Blocksy Companion plugin for WordPress is vulnerable to Arbitrary File Upload in all versions up to, and including, 2.1.46 via the save_attachments function. This is due to the Custom Fonts extension registering a wp_check_filetype_and_ext filter that approves any filename containing .woff2 or .ttf as a substring via strpos() rather than validating that those strings appear as the final extension via PATHINFO_EXTENSION — allowing double-extension filenames such as shell.woff2.php to pass MIME validation and be handled as permitted font files. This makes it possible for unauthenticated attackers to upload files that may be executable, which makes remote code execution possible. This vulnerability is only exploitable when the premium version of the plugin (blocksy-companion-pro) is installed with both the WooCommerce Extra (Advanced Reviews) and Custom Fonts extensions active; the free blocksy-companion plugin does not contain the vulnerable code paths.
Характеристики атаки
Последствия
Строка CVSS v3.1