I Almost Ordered A Product For Free Business Logic Vulnerability
The e-commerce site trusted a client-supplied product quantity and total price when adding items to the cart, so a tampered quantity of 200 was accepted and the subtotal became zero. An attacker could place an order for a much higher quantity while paying only shipping and taxes.
Published on infosecwriteups.com
How does it sound that you ordered something and almost got it for free? Wouldn't that make you happy?
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 accepted the client-supplied quantity and price without validating them against the product catalogue, and it calculated the subtotal from the manipulated quantity.
Impact
An attacker could order a much larger quantity of a product while paying only the shipping and tax amount, though the tester did not complete the payment.
What the attacker needed
A user account on the e-commerce site; ability to intercept and modify HTTP requests
The fix
The server should validate the requested quantity against allowed options and calculate the price from the product catalogue rather than trusting client-supplied values.
How it was found
- Select a product and intercept the add-to-cart request.
- Change the product quantity parameter to a value not offered, such as 200.
- Forward the request and check the cart or checkout page.
- Observe the subtotal is zero and only shipping and taxes remain.
- Enable the disabled pay button by editing its class attribute in the browser.
- Proceed to the payment method page without completing 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 shop online, your browser sends details like how many items you want and the price to the shop's server. Here, the server believed whatever number the browser sent instead of checking it against the real product price. By changing that number, the tester made the shop think the items cost nothing, so only shipping was charged.
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.