From Quantity Manipulation to Negative Shipping Costs: A Business Logic Flaw in an E-Commerce Checkout
The checkout accepted a manually modified product quantity far beyond what the interface allowed, and the server used it in pricing calculations without validation. This caused the shipping cost to become negative and the order was still processed, with a payment confirmation email received.
Published on cybersecuritywriteups.com
One of the most dangerous assumptions in software development is believing that users will only interact with an application through the user interface you’ve carefully designed.
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 performed pricing and shipping calculations using the client-supplied quantity without validating it against sensible bounds.
Impact
An attacker could influence the pricing calculation so that shipping reduced the order total, potentially lowering what they pay; the author stopped testing after confirming the issue.
What the attacker needed
Ability to intercept and modify requests; a checkout flow with a quantity field
The fix
The server should independently validate every security-sensitive value, such as requiring quantity to be greater than zero and within an acceptable range, and reject invalid requests.
How it was found
- Intercept the checkout requests with an intercepting proxy.
- Modify the product quantity in the request to a very large value.
- Send the modified request and observe the server accepts it without validation errors.
- Continue through the checkout and observe the shipping cost becomes negative.
- Complete the order and receive a payment confirmation email.
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 pick how many items to buy. The web page only allowed small numbers, but the person testing sent a huge number directly to the shop's server, which accepted it. The shop then calculated shipping wrongly and made it negative, so the order total went down instead of up.
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.