$5,800 for a Negative Number: Manipulating Checkout Totals Throug
The cart and checkout APIs accepted negative quantity values without validating they were positive integers, so a line-item total could become negative. By adding a cheap item at a large negative quantity alongside an expensive item, the cart total went negative, checkout skipped payment, and the platform issued a real order plus store credit.
No injection. No broken authentication.
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 calculated totals from client-supplied quantity values without checking they were positive integers, and the checkout flow trusted that total for payment decisions instead of recalculating safely.
Impact
Any authenticated user could obtain real merchandise at no cost and generate fraudulent store credit through ordinary API requests, repeatable and automatable, limited only by catalog pricing and detection.
What the attacker needed
An authenticated account; ability to intercept API requests; own payment method for testing
The fix
The team added quantity validation at the API layer within three days and a server-side total recalculation fix at the payment step about a week later.
How it was found
- Intercept the add-to-cart request and note it sends a product ID and quantity.
- Send a negative quantity for a product and observe the cart accepts it with a negative line total.
- Add an expensive item at normal quantity, then a cheap item at a large negative quantity to make the grand total negative.
- Proceed through checkout and observe payment collection is skipped.
- Confirm a real order is generated and store credit is issued for the negative difference.
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 choose how many of an item to buy. The server trusted whatever number it was sent, including negative numbers, so buying '-35' of a cheap item subtracted money from the cart. The shop then treated the negative total as 'nothing to pay' and still shipped the expensive item and gave store credit.
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.