How I Got a ₹0 Checkout on a Real Shopping Site
The add-to-cart endpoint accepted a negative quantity without validation, causing the cart total to drop to zero. An attacker could potentially obtain products for free or manipulate inventory if checkout and stock logic trust the stored cart values.
I was testing a standard add-to-cart flow on an e-commerce site. Nothing special — add item, intercept request, fuzz parameters, move on.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The server did not validate that the quantity parameter was a positive integer before adding the item to the cart.
Impact
If checkout trusts the stored cart total, an attacker could obtain products for free; negative quantities could also inflate stock or create negative totals, though the text only demonstrates the zero total.
What the attacker needed
An e-commerce site with add-to-cart; ability to intercept HTTP requests
The fix
The server should reject any quantity that is not a positive integer, validating on the server side rather than relying on client-side checks.
How it was found
- Add a product to the cart normally.
- Intercept the add-to-cart request.
- Change the quantity value from one to minus one.
- Forward the request.
- Check the cart; the total shows zero.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
An online shop lets you add items to a basket. The server should check that the number of items you ask for is a sensible positive number. Here it did not, so asking for minus one item made the basket total zero, which could let someone pay nothing.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.