إرسال #886961: macrozheng mall 1.0.3 Improper Validation of Specified Quantity in Inputالمعلومات

عنوانmacrozheng mall 1.0.3 Improper Validation of Specified Quantity in Input
الوصفA missing input validation vulnerability exists in the cart quantity update endpoint of mall version 1.0.3. The GET /cart/update/quantity endpoint allows authenticated users to set a negative integer value for the quantity parameter. The backend service (OmsCartItemServiceImpl.updateQuantity()) directly writes this value into the oms_cart_item table without any check for positivity. This negative quantity then propagates to order generation (oms_order_item.product_quantity) and payment processing, causing the system to compute negative totals and perform reverse stock adjustments. Specifically, during order creation, the lock_stock is decreased (since lock_stock += quantity with negative quantity), and upon simulated payment, the UPDATE pms_sku_stock SET stock = stock - quantity effectively increases the physical stock (because subtracting a negative adds to the value). This leads to inventory inflation, negative order amounts, and bypass of stock availability checks (the condition realStock < quantity always fails for negative numbers). An attacker can exploit this to artificially inflate stock, create orders with negative total amounts, and potentially trigger fraudulent refunds if integrated with a payment gateway. Proof of concept: after login, add a product to cart, update its quantity to -5, generate an order, and observe that the order total becomes negative and the stock increases after payment. This vulnerability is classified as CWE-20 (Improper Input Validation) and does not require race conditions or privilege escalation – a single authenticated request suffices. The maintainers have not responded to previous security reports; we are disclosing publicly.
المصدر⚠️ https://github.com/macrozheng/mall/issues/984
المستخدم
 Anonymous User
ارسال12/07/2026 09:02 AM (1 شهر منذ)
الاعتدال25/08/2026 08:29 AM (1 month later)
الحالةتمت الموافقة
إدخال VulDB394944 [macrozheng mall حتى 1.0.3 /cart/update/quantity OmsCartItemServiceImpl.updateQuantity]
النقاط20

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!