Skip to main content
Vulnerability Database/CVE-2026-108691

CVE-2026-108691: mall4j Authentication Bypass Vulnerability

CVE-2026-108691 is an authentication bypass flaw in mall4j that lets authenticated users delete other shoppers' cart items. This post explains its impact, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-108691 Overview

CVE-2026-108691 is an improper authorization vulnerability in the mall4j e-commerce platform through version 4.0. The flaw resides in the cleanExpiryProdList SQL statement used by the shopping cart service. An operator precedence error in the BasketMapper.xml query causes the DELETE to apply across all users rather than the authenticated session. Any authenticated storefront customer can send a single DELETE request to /p/shopCart/cleanExpiryProdList and purge every shopper's cart entries for off-shelf products. Because mall4j does not restore cart items when products are restocked, the deletion is permanent for affected customers [CWE-783].

Critical Impact

One authenticated request wipes off-shelf cart entries for every user on the platform, with no mechanism to restore them when products return to inventory.

Affected Products

  • mall4j (gz-yami/mall4j) through version 4.0
  • yami-shop-api module — ShopCartController endpoint /p/shopCart/cleanExpiryProdList
  • yami-shop-service module — BasketMapper.xmlcleanExpiryProdList statement

Discovery Timeline

  • 2026-10-11 - CVE-2026-108691 published to NVD
  • 2026-10-16 - Last updated in NVD database

Technical Details for CVE-2026-108691

Vulnerability Analysis

The mall4j storefront exposes the authenticated endpoint /p/shopCart/cleanExpiryProdList, implemented in ShopCartController.java. The handler calls the cleanExpiryProdList MyBatis statement defined in BasketMapper.xml. That statement is intended to delete cart rows belonging to the current user where the associated product is off-shelf. The resulting SQL evaluates the condition in a way that satisfies the predicate for every row matching the off-shelf filter, independent of user_id. A single authenticated call therefore deletes the matching cart rows for all users on the platform. The deletion is not reversible through normal product lifecycle flows, so restocking a product does not reintroduce the lost cart entries. Refer to the VulnCheck Advisory on Mall4j and the BasketMapper XML source for the full statement.

Root Cause

The root cause is an operator precedence error in the WHERE clause of the cleanExpiryProdList SQL statement. The AND and OR conditions are not grouped with parentheses, so the tenant/user scoping predicate is not bound to the off-shelf predicate. SQL evaluates AND before OR, which allows the off-shelf condition to match rows regardless of the intended user filter. This matches the [CWE-783] Operator Precedence Logic Error pattern. See the ShopCart Controller source for the controller invocation.

Attack Vector

An attacker needs only a valid storefront account. After authenticating to the mall4j API, the attacker sends one DELETE request to /p/shopCart/cleanExpiryProdList. The server executes the flawed statement and deletes off-shelf cart entries for every user. No elevated privileges, no user interaction, and no payload crafting are required beyond a standard authenticated session. A public proof-of-concept is available at the GitHub PoC Script.

Detect Identity Attacks the Moment Authentication Fails

Singularity™ Identity surfaces credential misuse, lateral movement, and privilege escalation in real time, so you can contain the breach before it spreads.

Stop Identity Attacks

Detection Methods for CVE-2026-108691

Indicators of Compromise

  • Unexpected DELETE /p/shopCart/cleanExpiryProdList requests from low-reputation or newly registered storefront accounts.
  • Sudden spikes in tz_basket row deletions affecting multiple user_id values in the same transaction.
  • Customer support tickets reporting disappeared cart items that were previously saved for off-shelf products.
  • Application logs showing a single API session triggering cart cleanup for user IDs other than its own.

Detection Strategies

  • Add database audit logging on the tz_basket table and alert when a single statement affects rows across multiple user_id values.
  • Instrument the cleanExpiryProdList handler to log the authenticated principal and the count of rows deleted per invocation.
  • Review web access logs for repeated hits to /p/shopCart/cleanExpiryProdList from the same session or IP.

Monitoring Recommendations

  • Baseline normal call volume for /p/shopCart/cleanExpiryProdList and alert on outliers.
  • Correlate storefront API traffic with cart-size anomalies in business metrics dashboards.
  • Forward application and database logs to a central SIEM for cross-source correlation and historical review.

How to Mitigate CVE-2026-108691

Immediate Actions Required

  • Restrict or temporarily disable the /p/shopCart/cleanExpiryProdList endpoint at the API gateway or WAF until a fix is deployed.
  • Patch the cleanExpiryProdList statement in BasketMapper.xml to parenthesize the AND/OR conditions so the user scope is enforced.
  • Audit the tz_basket table for recent mass deletions and restore from backups where possible.
  • Rotate any storefront accounts that triggered abnormal cart cleanup activity.

Patch Information

No vendor patch is referenced in the NVD entry at the time of publication. Operators running mall4j through 4.0 should track the upstream repository and the VulnCheck Advisory on Mall4j for an official fix. Until an upstream release is available, apply a local source patch that groups the predicate as WHERE user_id = #{userId} AND (prod_id IN (...)) and rebuild the yami-shop-service module.

Workarounds

  • Gate the endpoint behind rate limiting and per-session quotas to blunt mass-deletion attempts.
  • Enforce request validation that rejects calls lacking the authenticated user's identifier in the server-side scope.
  • Enable soft-delete semantics on tz_basket so purged rows can be recovered rather than permanently lost.
  • Take frequent logical backups of cart tables while an upstream fix is pending.
bash
# Configuration example: block the vulnerable endpoint at an NGINX reverse proxy
location = /p/shopCart/cleanExpiryProdList {
    if ($request_method = DELETE) {
        return 403;
    }
    proxy_pass http://mall4j_backend;
}

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.