Steps to reproduce
The e-commerce site allowed a negative product quantity in the cart, which reduced the total price. An attacker could add a negative quantity of one item and positive quantities of others to bring the cart total below the minimum, then pay a lower price.
Published on blog.usejournal.com
I received a hacking invite from a very popular e-commerce website. I have been ordering from that website for a very long time.
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
Likely the application did not validate the lower bound of the quantity parameter, allowing negative values that reduced the cart total.
Impact
The attacker could buy products at a lower price by manipulating the cart total, as the negative quantity reduced the overall cost.
What the attacker needed
A user account on the site; ability to intercept HTTP requests
The fix
The application should validate that the quantity is within a positive range (e.g., 1–10) on the server side and not rely on client-side controls.
How it was found
- Add a product to the cart and intercept the request.
- Change the quantity to a negative number.
- Add other products with positive quantities to balance the cart total.
- Ensure the total is above the minimum cart value.
- Proceed to checkout and pay the reduced amount.
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.
When you shop online, the website often lets you change how many items you want. This site did not check that the number was positive. By sending a negative number, the attacker made the cart total go down, so they paid less than they should.
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.