CVE-2026-4086
Received Received - Intake
Stored XSS in WP Random Button Plugin Shortcode Attributes

Publication date: 2026-03-21

Last updated on: 2026-03-21

Assigner: Wordfence

Description
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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-03-21
Last Modified
2026-03-21
Generated
2026-05-27
AI Q&A
2026-03-21
EPSS Evaluated
2026-05-25
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
wp_random_button wp_random_button to 1.0 (inc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-79 The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

The WP Random Button plugin for WordPress has a Stored Cross-Site Scripting (XSS) vulnerability in its 'wp_random_button' shortcode. This vulnerability arises because the plugin does not properly sanitize or escape user-supplied shortcode attributes named 'cat', 'nocat', and 'text'. Specifically, the 'cat' and 'nocat' attributes are directly inserted into HTML data-attributes without proper escaping, and the 'text' attribute is inserted into HTML content without escaping. As a result, authenticated users with Contributor-level access or higher can inject malicious scripts that will execute whenever any user views the affected page.


How can this vulnerability impact me? :

This vulnerability can allow attackers with Contributor-level access to inject arbitrary malicious scripts into pages on a WordPress site using the WP Random Button plugin. These scripts can execute in the browsers of users who visit the infected pages, potentially leading to theft of sensitive information, session hijacking, defacement, or other malicious actions. Because the vulnerability does not require user interaction to trigger (no UI needed), it can be exploited to compromise site visitors and damage the site's integrity and user trust.


How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

I don't know


How can this vulnerability be detected on my network or system? Can you suggest some commands?

I don't know


What immediate steps should I take to mitigate this vulnerability?

I don't know


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart