Плагин Real3D Flipbook Lite для WordPress уязвим для Stored Cross-Site Scripting через атрибут короткого кода «lightboxtext» (и другие несанкционированные атрибуты, обрабатываемые on_shortcode()) в версиях вплоть до 5.1.1. Это связано с недостаточной санацией ввода и выводом в функциях on_shortcode() и print_global_options(): значения атрибутов shortcode дословно копируются в $this->flipbook_options, а затем передаются через wp_json_encode() внутри блока <script type"application/json"> без флага JSON_HEX_TAG, что позволяет буквальной последовательности байтов в значении атрибута вырваться из контекста JSON. Поскольку WordPress shortcode_parse_atts() применяет stripclashes() для значений атрибутов, злоумышленник может закодировать тег прорыва как \x3c/script\x3e\x3cscript\x3e…\x3c/script\x3e, который выдерживает фильтр сохранения wp_kses_post, применяемый к контенту Contributor (байты спасения являются безопасными текстовыми символами, а не тегами HTML) и декодируется в реальные угловые скобки во время рендеринга.
Это позволяет аутентифицированным злоумышленникам, с доступом Contributor-level и выше, вводить произвольные веб-скрипты на страницах, которые будут выполняться всякий раз, когда пользователь (как правило, предварительный просмотр Editor или Administrator / модерация ожидающего поста) получает доступ к введенной странице.
Показать оригинальное описание (EN)
The Real3D Flipbook Lite plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'lightboxtext' shortcode attribute (and other unsanitized attributes handled by on_shortcode()) in versions up to, and including, 5.1.1. This is due to insufficient input sanitization and output escaping in the on_shortcode() and print_global_options() functions: shortcode attribute values are copied verbatim into $this->flipbook_options and then emitted via wp_json_encode() inside a <script type="application/json"> block without the JSON_HEX_TAG flag, allowing a literal </script> byte sequence in the attribute value to break out of the JSON script context. Because WordPress's shortcode_parse_atts() applies stripcslashes() to attribute values, an attacker can encode the breakout tag as \x3c/script\x3e\x3cscript\x3e…\x3c/script\x3e, which survives the wp_kses_post save-time filter applied to Contributor content (the escape bytes are safe text characters, not HTML tags) and is decoded to real angle brackets at render time. This makes it possible for authenticated attackers, with Contributor-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user (typically an Editor or Administrator previewing/moderating the pending post) accesses an injected page.
Характеристики атаки
Последствия
Строка CVSS v3.1