Pay 0$, Get ∞ books!
A book-selling site accepted a hidden shipping-fee parameter in the order request, and tampering with it let the author reduce the total price to zero. The author could then order any number of books for no payment.
Published on medium.com
In this article, I’m going to spill the beans on my latest pentesting adventure with my friend Hx00h4nf1 on a private book-selling website, x.com. I stumbled upon a Business logic bug that lets me buy any number of books for the grand total of $0.
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 server trusted a client-supplied shipping-fee parameter when calculating the order total instead of computing it server-side.
What the attacker needed
A user account on the shop; ability to place an order
How it was found
- Inspect the parameters sent when placing an order.
- Try changing the item quantity, price and amount fields; the price does not change.
- Search for hidden parameters on the order request page.
- Find a hidden shipping-fee parameter among eleven hidden fields.
- Tamper with the shipping-fee value to reduce the total to 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.
When you buy something online, the page sends the order details to the server, including the price and any extra charges. This site also accepted an extra hidden field for shipping costs, and the server trusted whatever value the buyer sent. By changing that value, the buyer could make the total cost 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.