I’m glad to share that I’ve won my first bug bounty program I’ve ever joined on pcbstore.com.bd 🎉
The shopping cart accepted a negative quantity for a product, causing the order total to become negative. An attacker could place an order with a negative total, potentially receiving credit or goods without proper payment.
Published on medium.com
I’m glad to share that I’ve won my first bug bounty program I’ve ever joined on pcbstore.com.bd 🎉
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 did not validate that the quantity parameter was a positive integer before calculating the order total.
Impact
An attacker could place an order with a negative total, potentially causing financial loss or unintended credit to the buyer.
What the attacker needed
A user account; ability to intercept HTTP requests
How it was found
- Add a product to the cart.
- Intercept the add-to-cart or checkout request.
- Change the quantity parameter to a negative value.
- Forward the request to the server.
- Proceed to checkout and place the order.
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 website should check that the quantity you enter is a sensible number, like 1 or more. Here, the site did not check, so someone could type a negative number. That made the total price negative, meaning the shop would owe the buyer money instead of the other way around.
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.