Published : December 1, 2026

CVE-2026-137105: Simple Colorbox <= 1.6.2 Unauthenticated Stored Cross-Site Scripting via Anchor 'title' Attribute in Comments PoC, Patch Analysis & Rule

Severity Medium (CVSS 6.1)
CWE 79
Vulnerable Version 1.6.2
Patched Version 1.6.3
Disclosed November 30, 2026

Free WordPress WAF

Protect your site at the edge

Atomic Edge blocks exploit traffic, bots, and bad requests before they reach WordPress. Create a free account, then point DNS when you are ready.

Get Protected Free

Analysis Overview

Atomic Edge analysis of CVE-2026-137105: Simple Colorbox versions up to and including 1.6.2 suffer from an unauthenticated stored cross-site scripting vulnerability. The flaw resides in the plugin’s handling of comment content that is rendered inside Colorbox anchors. An attacker can inject arbitrary JavaScript that executes when an administrator views a page containing a malicious comment. The CVSS score is 6.1 (Medium).

Root Cause: The plugin does not properly escape the title attribute of anchor tags when generating Colorbox selectors. In simple-colorbox/index.php, the colorbox_selector string is built and then passed through apply_filters( ‘simple_colorbox_selector’, $colorbox_selector ) before being concatenated directly into an inline JavaScript string assigned to colorbox_settings[‘l10n_print_after’]. The concatenation uses single quotes around the filtered selector: $(“‘ . apply_filters(…) . ‘”).colorbox(…). Because WordPress comment kses permits the tag with a title attribute and preserves entity-encoded content, an attacker can store a payload such as . At render time, the browser decodes the attribute into the raw DOM .title property. The plugin then interpolates that decoded title value into the inline script without JavaScript encoding, breaking out of the string context and executing the payload.

Exploitation: An unauthenticated attacker submits a comment containing a crafted anchor tag with a title attribute. The comment is stored in the WordPress database. When an administrator later views the comment (for example, in the admin dashboard or on a page where comments are displayed), the plugin’s inline JavaScript is generated. The title value is decoded by the browser and inserted into the script, allowing the attacker’s JavaScript to run in the administrator’s session. The attack requires the administrator to visit a page that includes the comment, but no other action from the victim is needed.

Patch Analysis: Version 1.6.3 changes the way the colorbox selector is embedded into JavaScript. The patch moves the apply_filters call earlier and then encodes the filtered selector using wp_json_encode() with the JSON_HEX_TAG, JSON_HEX_AMP, JSON_HEX_APOS, and JSON_HEX_QUOT flags before concatenation. This ensures that any single quotes, double quotes, ampersands, or angle brackets in the filtered value are converted to their Unicode escape sequences, preventing breakouts from the JavaScript string context. The selector is now passed as a properly encoded JavaScript string literal, so malicious content cannot escape the string and execute. The patch also adds comments noting that wp_localize_script JSON-encodes the settings, making the filtered values safe for output.

Impact: Successful exploitation allows an attacker to execute arbitrary JavaScript in the context of an administrator’s browser. This can lead to session hijacking, creation of new administrative accounts, installation of malicious plugins, or full site takeover. The vulnerability is stored and persists until the malicious comment is removed. Because the attack requires administrator interaction (viewing the comment), it is not fully unauthenticated, but it remains a serious threat due to the high privilege of the victim.

Differential between vulnerable and patched code

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

Code Diff
--- a/simple-colorbox/index.php
+++ b/simple-colorbox/index.php
@@ -5,7 +5,7 @@
 Plugin URI: https://geek.hellyer.kiwi/products/simple-colorbox/
 Description: Adds a Colorbox to your site with no configuration required.
 Author: Ryan Hellyer
-Version: 1.6.2
+Version: 1.6.3
 Author URI: https://geek.hellyer.kiwi/
 Text Domain: simple-colorbox

@@ -37,7 +37,7 @@
  */
 define( 'SIMPLECOLORBOX_DIR', dirname( __FILE__ ) . '/' ); // Plugin folder DIR
 define( 'SIMPLECOLORBOX_URL', plugins_url( '', __FILE__ ) ); // Plugin folder URL
-define( 'SIMPLECOLORBOX_VERSION', '1.6.2' );
+define( 'SIMPLECOLORBOX_VERSION', '1.6.3' );

 /**
  * Simple Colorbox class
@@ -132,16 +132,22 @@
 		);

 		// Colorbox settings
-		$colorbox_selector = "a[href$='jpg'],a[href$='jpeg'],a[href$='png'],a[href$='bmp'],a[href$='gif'],a[href$='JPG'],a[href$='JPEG'],a[href$='PNG'],a[href$='BMP'],a[href$='GIF']";
+		$colorbox_selector = "a[href$='jpg'],a[href$='jpeg'],a[href$='png'],a[href$='bmp'],a[href$='gif'],a[href$='JPG'],a[href$='JPEG'],a[href$='PNG'],a[href$='BMP'],a[href$='GIF']";
+
+		// Allow the selector to be filtered, then encode it as a JavaScript string
+		// literal so that filtered output cannot break out of the inline script.
+		$colorbox_selector = apply_filters( 'simple_colorbox_selector', $colorbox_selector );

 		// Load Colorbox
 		$colorbox_settings['l10n_print_after'] = '
 		jQuery(function($){
 			// Examples of how to assign the ColorBox event to elements
-			$("' . apply_filters( 'simple_colorbox_selector', $colorbox_selector ) . '").colorbox(colorboxSettings);
+			$(' . wp_json_encode( $colorbox_selector, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT ) . ').colorbox(colorboxSettings);
 		});';

 		// Add Colorbox settings
+		// wp_localize_script() JSON-encodes the settings, so the filtered values are
+		// already safe for output inside the inline script.
 		wp_localize_script( 'colorbox', 'colorboxSettings', apply_filters( 'simple_colorbox_settings', $colorbox_settings ) );

 	}

Frequently Asked Questions

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.