The WP Random Button plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'cat', 'nocat', and 'text' shortcode attributes of the 'wp_random_button' shortcode in all versions up to, and including, 1.0. This is due to insufficient input sanitization and output escaping on user-supplied shortcode attributes. Specifically, the random_button_html() function directly concatenates the 'cat' and 'nocat' parameters into HTML data-attributes without esc_attr(), and the 'text' parameter into HTML content without esc_html(). 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 accesses an injected page.
The WP Random Button WordPress plugin versions up to 1.0 contains a Stored Cross-Site Scripting vulnerability in shortcode attributes that allows authenticated contributors to inject malicious scripts. Attackers can exploit insufficient input sanitization in the 'cat', 'nocat', and 'text' parameters to execute arbitrary JavaScript when users view affected pages.
ثغرة XSS المخزنة في إضافة WP Random Button تسمح للمستخدمين المصرحين بمستوى المساهم أو أعلى بحقن نصوص برمجية ضارة عبر سمات shortcode. تنشأ الثغرة من عدم تنظيف المدخلات بشكل صحيح في معاملات 'cat' و 'nocat' و 'text' التي يتم تنفيذها عند عرض الصفحات.
WP Random Button plugin for WordPress up to version 1.0 is vulnerable to Stored XSS through shortcode attributes, allowing authenticated users with Contributor access to inject malicious scripts. The vulnerability stems from improper sanitization of 'cat', 'nocat', and 'text' parameters that execute when pages are viewed.
Update WP Random Button plugin to version 1.1 or later immediately. Implement proper input sanitization using sanitize_text_field() and output escaping using esc_attr() for HTML attributes and esc_html() for HTML content. Restrict shortcode usage to trusted administrators only and audit all existing shortcodes for malicious content.
قم بتحديث إضافة WP Random Button إلى الإصدار 1.1 أو أحدث فوراً. طبق تنظيف المدخلات الصحيح باستخدام sanitize_text_field() وتجنب المخرجات باستخدام esc_attr() للسمات و esc_html() للمحتوى. قيد استخدام Shortcode للمسؤولين الموثوقين فقط وتدقيق جميع Shortcodes الموجودة للكشف عن المحتوى الضار.