Dynamic Product Gallery for WooCommerce до 3.6.2 содержит хранимую уязвимость межсайтового скриптинга, которая позволяет аутентифицированным злоумышленникам с доступом Contributor-level или выше вводить произвольный JavaScript через атрибут product_id коротких кодов [wc_product_dgallery] и [wc_product_dynamic_gallery]. Функция parse_shortcode_product_dynamic_gallery() передает product_id только через esc_attr(), и get_gallery_main() выводит его незамеченным в встроенный скрипт a3-wc-dynamic-gallery-init-inline-script как часть имени переменной JavaScript, поэтому такое значение, как 342;alert(document.domain)// вырывается из объявления. Введенный скрипт выполняется в браузере любого пользователя, который просматривает сообщение, включая редакторов или администраторов, которые просматривают или одобряют его.
Показать оригинальное описание (EN)
Dynamic Product Gallery for WooCommerce before 3.6.2 contains a stored cross-site scripting vulnerability that allows authenticated attackers with Contributor-level access or above to inject arbitrary JavaScript via the product_id attribute of the [wc_product_dgallery] and [wc_product_dynamic_gallery] shortcodes. The parse_shortcode_product_dynamic_gallery() function passes product_id only through esc_attr(), and get_gallery_main() prints it unescaped into the a3-wc-dynamic-gallery-init-inline-script inline script as part of a JavaScript variable name, so a value such as 342;alert(document.domain)// breaks out of the declaration. The injected script executes in the browser of any user who views the post, including editors or administrators who preview or approve it.
Характеристики атаки
Последствия
Строка CVSS v4.0