CVE-2024-4481
Executive Summary
CVE-2024-4481 is a Stored Cross-Site Scripting (XSS) vulnerability in the Gutenberg Blocks with AI by Kadence WP plugin for WordPress. The flaw resides in the insufficient sanitization and output escaping of the link attribute within the plugin's blocks. An authenticated attacker with contributor-level access or higher can inject arbitrary web scripts that execute when any user visits a page containing the malicious block. This vulnerability affects all versions up to and including 3.2.36. The CVSS score is 6.4 (Medium), and no public exploit or patch is currently available. As a WordPress plugin vulnerability, it directly impacts the WordPress ecosystem and does not involve Apache or Nginx.
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 is specific to the WordPress plugin ecosystem. The Kadence Blocks plugin is distributed via the official WordPress plugin repository. Users should monitor for updates from the vendor and consider removing or disabling the plugin until a patch is released. No NPM, PyPI, Go, or Ruby packages are 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
- Attack Complexity: Low
- Privileges Required: Low (Contributor-level access)
- User Interaction: None
- Scope: Changed (impact on other components)
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
The threat level is medium due to the requirement for authenticated access, but the potential for widespread impact on site visitors and administrators makes it a significant risk.
Deep Dive & Mechanics
The vulnerability is a classic Stored XSS in the WordPress block editor. The Kadence Blocks plugin allows users to create custom blocks with various attributes, including a link attribute. When a user with contributor-level access or higher creates or edits a block, the link attribute is not properly sanitized or escaped before being stored in the database. When the block is rendered on a page, the malicious script is executed in the context of the visitor's browser.
Attack Flow:
- An authenticated attacker with contributor-level access logs into WordPress.
- The attacker creates a new post or page and adds a Kadence block (e.g., a button or image block) that accepts a
linkattribute. - The attacker injects a malicious payload into the
linkattribute, such asjavascript:alert('XSS')or a more complex script. - The payload is stored in the WordPress database without proper sanitization.
- When any user (including administrators) visits the page, the script executes, potentially stealing cookies, redirecting users, or performing other malicious actions.
Root Cause: Insufficient input sanitization and output escaping on the link attribute in the plugin's block rendering code.
Vulnerable vs. Patched Code
Since no official patch is available, the vulnerable code is presumed to be in the block rendering functions. A typical vulnerable pattern might look like:
Vulnerable Code (PHP):
function render_kadence_block($attributes) {
$link = $attributes['link'];
return '<a href="' . $link . '">Click here</a>';
}
Patched Code (Expected):
function render_kadence_block($attributes) {
$link = esc_url($attributes['link']);
return '<a href="' . $link . '">Click here</a>';
}
The patched version would use esc_url() to sanitize the URL and esc_attr() for attribute escaping.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A WordPress instance with Kadence Blocks plugin version <= 3.2.36.
- An authenticated user account with contributor-level privileges.
Steps:
- Log in to WordPress as a contributor.
- Create a new post or page.
- Add a Kadence block that accepts a
linkattribute (e.g., a Button block). - In the block settings, set the
linkattribute to a malicious payload:javascript:alert(document.cookie) - Publish or save the post.
- When any user visits the post, the XSS payload executes.
Proof of Concept (PoC):
<!-- Malicious block link attribute -->
<a href="javascript:alert('XSS')">Click me</a>
Blue Team (Detection & Defense)
Detection:
- Monitor for unusual
linkattribute values in Kadence blocks. - Use WAF rules to block
javascript:URIs in block attributes. - Implement Content Security Policy (CSP) headers to mitigate XSS.
Defense:
- Disable the Kadence Blocks plugin until a patch is available.
- Restrict contributor-level access to trusted users only.
- Use a WordPress security plugin that scans for XSS vulnerabilities.
Indicators of Compromise (IOCs)
- Network: HTTP requests containing
javascript:ordata:URIs in block attributes. - File: Modified WordPress database entries in
wp_poststable with maliciouslinkattributes. - Log: WordPress audit logs showing creation of posts with suspicious block attributes.
- Behavior: Unexpected redirects or cookie theft on pages using Kadence blocks.
Detection Engineering
YARA Rule
rule CVE_2024_4481_Kadence_XSS {
meta:
description = "Detects malicious link attributes in Kadence Blocks"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-4481"
strings:
$xss_payload = /href\s*=\s*["']\s*javascript\s*:/i
$xss_payload2 = /href\s*=\s*["']\s*data\s*:/i
condition:
any of them
}
Sigma Rule
title: CVE-2024-4481 Kadence Blocks Stored XSS
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects stored XSS via Kadence Blocks link attribute
author: Valters IT
date: 2025-04-10
logsource:
category: web
product: wordpress
detection:
selection:
http.method: POST
http.url: /wp-admin/post.php
http.body: 'link='
keywords:
- 'javascript:'
- 'data:'
condition: selection and keywords
falsepositives:
- Legitimate use of javascript: links (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-4481 Kadence Blocks Stored XSS"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/post.php"; http_uri; content:"link="; http_client_body; pcre:"/(javascript|data)\s*:/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin: Deactivate and remove the Kadence Blocks plugin until a patch is released.
- Restrict user roles: Limit contributor-level access to only trusted users.
- Apply WAF rules: Block requests containing
javascript:ordata:URIs in block attributes.
Long-term Fix:
- Monitor the vendor's website for a patched version (expected to be > 3.2.36).
- Once available, update the plugin immediately.
- Implement Content Security Policy (CSP) headers to prevent XSS execution.
Workaround:
- Use a WordPress security plugin that provides virtual patching for known vulnerabilities.
Valters IT
DevSecOps & Cyber Threat Intelligence
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.