☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 6.4 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-1238

CVE-2024-1238 Cross-Site Scripting in Elementskit
📅 PUBLISHED: 2024-03-30 04:31 UTC 🔄 UPDATED: 2026-08-12 14:53 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.26%
👁️
0.26% probability
6.4× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1190
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS VECTOR BREAKDOWN 6.4
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.4
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-1238 is a Stored Cross-Site Scripting (XSS) vulnerability in the ElementsKit Elementor addons plugin for WordPress, affecting all versions up to and including 3.0.6. The flaw resides in the button ID parameter, where insufficient input sanitization and output escaping allow authenticated attackers with contributor-level access or higher to inject arbitrary web scripts. These scripts execute whenever a user accesses a compromised page. The vulnerability has a CVSS score of 6.4 (Medium), and no patch has been confirmed at the time of analysis. CVE-2024-32505 is likely a duplicate of this issue.

⚡ 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. Users are advised to monitor the plugin’s update channel and apply any security patches immediately. No third-party package manager (NPM, PyPI, Go, Ruby) is involved.

CVSS Breakdown & Threat Level

  • CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L
  • Base Score: 6.4 (Medium)
  • Attack Vector: Network
  • Attack Complexity: Low
  • Privileges Required: Low (Contributor)
  • User Interaction: Required
  • Scope: Changed
  • Confidentiality Impact: Low
  • Integrity Impact: Low
  • Availability Impact: Low

The threat level is considered Medium due to the requirement for authenticated access and user interaction, but the potential for widespread exploitation via stored scripts in WordPress pages elevates the risk.

Deep Dive & Mechanics

The vulnerability exists in the button widget of the ElementsKit plugin. The button_id parameter is not properly sanitized before being stored in the database and later rendered in the frontend. An attacker with contributor-level access can craft a malicious payload, such as:

<script>alert('XSS')</script>

When the page is viewed by any user (including administrators), the script executes in the context of the victim’s browser. This can lead to session hijacking, defacement, or redirection to malicious sites.

The root cause is the lack of proper escaping when outputting the button_id value in the widget’s template. The plugin uses echo esc_attr($button_id) but fails to sanitize the input before storage, allowing stored XSS.

Vulnerable vs. Patched Code

Vulnerable Code (<= 3.0.6):

// In elementskit/widgets/button/button.php
$button_id = $settings['button_id'];
// No sanitization before storage
update_post_meta($post_id, '_elementor_data', $data);
// Later in template:
echo '<div id="' . esc_attr($button_id) . '">';

Patched Code (Hypothetical):

// Sanitize input before storage
$button_id = sanitize_html_class($settings['button_id']);
// Or use wp_kses_post for broader sanitization
$button_id = wp_kses_post($settings['button_id']);
// Continue with output escaping
echo '<div id="' . esc_attr($button_id) . '">';

The patch should include input sanitization (e.g., sanitize_html_class or wp_kses_post) in addition to output escaping.

Exploitation & Lab Setup

Red Team

  1. Prerequisites: WordPress instance with ElementsKit <= 3.0.6, a contributor-level account.
  2. Steps:
    • Log in as contributor.
    • Create or edit a page using Elementor.
    • Add the ElementsKit Button widget.
    • In the button ID field, inject: "><script>alert(document.cookie)</script>
    • Save and publish the page.
    • When an admin or visitor views the page, the script executes.

Proof-of-Concept Payload:

"><img src=x onerror=alert('XSS')>

Blue Team

  1. Detection: Monitor for unusual button ID values in Elementor data. Look for patterns like <script>, onerror, or javascript:.
  2. Prevention: Restrict contributor-level access to trusted users only. Implement a Web Application Firewall (WAF) rule to block XSS payloads in POST parameters.
  3. Response: If compromised, remove the malicious page, reset affected user sessions, and audit all pages for injected scripts.

Indicators of Compromise (IOCs)

  • File: wp-content/plugins/elementskit/widgets/button/button.php (vulnerable version)
  • Database: wp_postmeta entries containing _elementor_data with suspicious button_id values.
  • Network: HTTP requests to WordPress pages with button_id parameters containing script tags.
  • Logs: WordPress debug logs showing unexpected script execution errors.

Detection Engineering

YARA Rule

rule CVE_2024_1238_ElementsKit_XSS {
    meta:
        description = "Detects stored XSS payloads in ElementsKit button_id parameter"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2024-1238"
    strings:
        $payload1 = /button_id["']?\s*[:=]\s*["'][^"']*<script/i
        $payload2 = /button_id["']?\s*[:=]\s*["'][^"']*onerror/i
        $payload3 = /button_id["']?\s*[:=]\s*["'][^"']*onload/i
    condition:
        any of them
}

Sigma Rule

title: CVE-2024-1238 ElementsKit Stored XSS Detection
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects stored XSS attempts via ElementsKit button_id parameter
author: Valters IT
date: 2025/04/10
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-method: 'POST'
        cs-uri-query|contains: 'elementor'
        cs-uri-query|contains: 'button_id'
        cs-uri-query|re: 'button_id[^&]*<script'
    condition: selection
falsepositives:
    - Legitimate use of script tags in button IDs (unlikely)
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-1238 ElementsKit Stored XSS Attempt"; flow:to_server,established; content:"POST"; http_method; content:"elementor"; http_uri; content:"button_id"; http_client_body; pcre:"/button_id[^&]*<script/i"; sid:1000001; rev:1;)

Remediation & Mitigation

  1. Immediate: Disable the ElementsKit plugin until a patch is available.
  2. Short-term: Restrict contributor-level access to only trusted users. Implement a WAF rule to block XSS payloads.
  3. Long-term: Apply the official patch once released. Update to the latest version of ElementsKit.
  4. Workaround: Manually sanitize the button_id parameter by adding sanitize_html_class() in the plugin code (if you have developer access).

Valters IT
Securing Digital Frontiers

💣 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-1238/ · 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.