PHP2Shell: Read our blog on the critical RCE vulnerabilities affecting 70% of the Internet

CVE-2026-6246: 
WordPress vulnerability analysis and mitigation

Overview

CVE-2026-6246 is a Stored Cross-Site Scripting (XSS) vulnerability in the Simple Random Posts Shortcode plugin for WordPress, affecting all versions up to and including 0.3. The flaw exists in the container_right_width attribute of the simple_random_posts shortcode due to insufficient input sanitization and output escaping on user-supplied attributes. It was published on April 22, 2026, and assigned a CVSS v3.1 base score of 6.4 (Medium) (GitHub Advisory, Wordfence).

Technical details

The vulnerability is classified as CWE-79 (Improper Neutralization of Input During Web Page Generation — Cross-site Scripting). The root cause is the failure to sanitize or escape the container_right_width attribute value before rendering it in the page output, allowing arbitrary HTML/JavaScript to be stored and later executed in visitors' browsers. Exploitation requires only contributor-level WordPress authentication (low privileges), no user interaction from the attacker's side, and network access to the WordPress instance. The vulnerable code is located at line 54 of simple-random-posts-shortcode.php (GitHub Advisory, Plugin Source).

Impact

Successful exploitation allows authenticated attackers with contributor-level access or higher to inject persistent malicious scripts into WordPress pages. Any user — including administrators — who visits an injected page will have the script execute in their browser, potentially leading to session hijacking, credential theft, malware distribution, or unauthorized administrative actions. The scope is changed (cross-boundary), meaning the impact extends beyond the attacker's own session to affect other site users (GitHub Advisory, Wordfence).

Exploitability

There is no public proof-of-concept exploit and no evidence of in-the-wild exploitation at this time. The EPSS score is approximately 0.01% (2nd percentile), indicating a very low near-term exploitation probability. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation requires at minimum a contributor-level WordPress account, which limits the attack surface compared to unauthenticated vulnerabilities (GitHub Advisory, Wordfence).

Exploitation steps

  1. Gain contributor access: Obtain or register a WordPress account with at least contributor-level privileges on the target site.
  2. Create or edit a post: Navigate to the WordPress editor and create or edit a post or page where the simple_random_posts shortcode can be inserted.
  3. Inject malicious payload: Insert the shortcode with a crafted container_right_width attribute containing a JavaScript payload, for example: [simple_random_posts container_right_width="100\" onmouseover=\"alert(document.cookie)\""] or a more sophisticated payload that exfiltrates session cookies to an attacker-controlled server.
  4. Publish the content: Save and publish the post so the injected shortcode is stored in the database.
  5. Trigger execution: When any user (including administrators) visits the page containing the injected shortcode, the malicious script executes in their browser, enabling session hijacking or further attacks (GitHub Advisory, Plugin Source).

Indicators of compromise

  • Logs: WordPress access logs showing POST requests to wp-admin/post.php or the REST API containing simple_random_posts shortcode with unusual values in the container_right_width parameter (e.g., containing <script>, onerror=, onmouseover=, or encoded JavaScript).
  • Database: Unexpected JavaScript or HTML event handler strings stored in the wp_posts table within shortcode attributes for simple_random_posts.
  • Network: Outbound HTTP requests from site visitors' browsers to unknown external domains shortly after loading pages containing the simple_random_posts shortcode, potentially carrying cookie or session data.
  • File System: No direct file system artifacts expected for this stored XSS, but review recently modified posts/pages in the WordPress database for injected shortcode content.

Mitigation and workarounds

Update the Simple Random Posts Shortcode plugin to a version beyond 0.3 that includes proper input sanitization and output escaping. If no patched version is yet available in the WordPress plugin repository, consider deactivating and removing the plugin until a fix is released. As interim mitigations: restrict contributor-level and higher roles to trusted users only, deploy a Web Application Firewall (WAF) capable of filtering XSS payloads in shortcode attributes, and regularly audit installed plugins for unpatched vulnerabilities (GitHub Advisory, Wordfence).

Community reactions

Wordfence, which discovered and reported the vulnerability, included it in their weekly WordPress vulnerability report for April 20–26, 2026. No significant broader media coverage or notable researcher commentary beyond the standard disclosure process has been identified (Wordfence Weekly Report).

Additional resources


Source: This report was generated using AI

Related WordPress vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-110018HIGH8.8
  • ablocks
NoYesOct 24, 2026
CVE-2026-103359MEDIUM5.3
  • paydunya-woocommerce-payment-gateway
NoNoOct 24, 2026
CVE-2026-103332MEDIUM5.3
  • payex-payment-gateway-for-woocommerce
NoNoOct 24, 2026
CVE-2026-103312MEDIUM5.3
  • payment-integration-wompi
NoNoOct 24, 2026
CVE-2026-103325LOW3.7
  • tienda-crypto-woo
NoNoOct 24, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management