Medium, CVSS 5.9PackagistPublished
shopper/framework: Race condition on Discount.usage_limit allows silent over-redemption
CVE-2026-47741 · GHSA-9rh9-hf3w-9fgg
- Affected
- Packagist shopper/cart < 2.8.0
- Fixed in
- 2.8.0· Vendor fix available
- Issue
- Impact CreateOrderFromCartAction::execute previously created the Order row before checking and incrementing the discount's totaluse counter. Under concurrent checkout pressure (Black Friday, flash sale, viral coupon), the global usagelimit was silently exceeded: orders were committed with the discount fully applied to priceamount while the counter blocked at usagelimit. The merchant had no signal that an over-redemption had occurred. A second related bug: usagelimitperuser was effectively a no-op because the counter it relied on (DiscountDetail.totaluse) was never incremented anywhere in the codebase. The per-user check therefore always saw 0 uses and validation passed regardless of how many times the same customer had previously redeemed the coupon. For eligibility = Everyone the per-user limit could not fire at all because the underlying DiscountDetail row only exists for eligibility = Customers. Direct financial loss: each over-redemption is a discount the merchant did not intend…
Recommended action: Upgrade to 2.8.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.