Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2025-11161 Overview
CVE-2025-11161 is a Stored Cross-Site Scripting (XSS) vulnerability in the WPBakery Page Builder plugin for WordPress. The flaw affects all versions up to and including 8.6.1. It resides in the vc_custom_heading shortcode, where the plugin fails to properly restrict allowed HTML tags and sanitize user-supplied attributes in the font_container parameter. Authenticated users with contributor-level access or higher can inject arbitrary JavaScript that executes when other users view the affected page. The vulnerability is tracked under CWE-80: Improper Neutralization of Script-Related HTML Tags.
Critical Impact
Contributor-level attackers can inject persistent JavaScript that executes in the browsers of site visitors and administrators, enabling session theft, account takeover, and malicious redirects.
Affected Products
- WPBakery Page Builder for WordPress, all versions up to and including 8.6.1
- WordPress sites where contributor-level accounts have access to WPBakery shortcodes
- Any WordPress installation that renders pages containing the vc_custom_heading shortcode
Discovery Timeline
- 2025-10-15 - CVE-2025-11161 published to the National Vulnerability Database
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2025-11161
Vulnerability Analysis
The vulnerability originates in the vc_custom_heading shortcode handler within WPBakery Page Builder. The shortcode accepts a font_container parameter that specifies HTML tag and text styling attributes. The plugin does not sufficiently restrict which HTML tags are permitted, nor does it sanitize attribute values before rendering them into the page markup.
Authenticated attackers holding contributor privileges or higher can supply crafted tag and text attributes containing script payloads. Because the malicious markup is stored in the post content, every visitor who loads the page triggers the injected script in their browser session. Successful exploitation allows attackers to hijack administrator sessions, perform actions on behalf of authenticated users, exfiltrate cookies, or redirect visitors to attacker-controlled infrastructure.
Exploitation requires user interaction, since a victim must view the injected page. The scope change reflected in the CVSS vector indicates the injected script executes in the security context of the WordPress front-end, affecting resources beyond the attacker's own contributor privileges.
Root Cause
The root cause is insufficient input validation and output encoding in the font_container shortcode attribute handler. The plugin accepts arbitrary HTML tag names and text values from post authors and reflects them into the page without applying an HTML sanitization allowlist. This aligns with [CWE-80], which covers improper neutralization of script-related HTML tags in a web page.
Attack Vector
An attacker with contributor or higher privileges authors a post or page containing the vc_custom_heading shortcode. The attacker crafts the font_container parameter with malicious tag or text attributes containing JavaScript. When the post is published or previewed by an administrator, editor, or site visitor, the injected script executes in the victim's browser under the site's origin. See the Wordfence Vulnerability Report for additional technical detail.
Detection Methods for CVE-2025-11161
Indicators of Compromise
- Post or page content containing vc_custom_heading shortcodes with unexpected HTML tags such as <script>, <svg>, or event-handler attributes like onerror and onload inside the font_container parameter
- Newly created or recently modified posts authored by contributor-level accounts referencing WPBakery shortcodes
- Unusual outbound requests from visitor browsers to attacker-controlled domains originating from pages that render WPBakery headings
Detection Strategies
- Query the WordPress wp_posts table for post_content values matching vc_custom_heading combined with suspicious patterns such as javascript:, onerror=, or <script
- Review WordPress audit logs for contributor accounts publishing or updating posts that include WPBakery shortcodes
- Deploy web application firewall rules that inspect shortcode attribute values for script-related tokens
Monitoring Recommendations
- Enable WordPress activity logging to capture post creation and revision events tied to low-privilege accounts
- Monitor administrator sessions for anomalous actions immediately after viewing content authored by contributors
- Alert on Content Security Policy (CSP) violations reported by visitor browsers, which can indicate injected inline scripts
How to Mitigate CVE-2025-11161
Immediate Actions Required
- Update WPBakery Page Builder to a version released after 8.6.1 that addresses this issue, referenced in the WPBakery Release Notes
- Audit all existing posts and pages containing the vc_custom_heading shortcode for suspicious font_container attribute values
- Review the contributor account roster and revoke access for accounts that no longer require publishing privileges
Patch Information
WPBakery has published updated releases addressing the insufficient sanitization in the vc_custom_heading shortcode. Site administrators should consult the WPBakery Release Notes and upgrade to the latest available version. Additional advisory details are available in the Wordfence Vulnerability Report.
Workarounds
- Restrict use of WPBakery shortcodes to trusted editor-level or administrator accounts until patching is complete
- Remove the unfiltered_html capability review from the contributor role and validate that WordPress default sanitization is enforced for lower-privileged authors
- Deploy a Content Security Policy that disallows inline scripts to reduce the impact of stored XSS payloads
# Example WordPress role adjustment to remove contributor publishing rights
wp role list
wp cap remove contributor edit_posts
wp cap remove contributor publish_posts
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

