Uncovering Business Logic Vulnerabilities: A Real-World Case Stud
The web shop trusted a client-supplied product price in the cart request, so an attacker could change the price to a lower value and buy an expensive item with little store credit. The author demonstrated this on a PortSwigger lab by altering the price to 0.13 and placing the order.
Published on medium.com
When I was purchasing a product on a platform (I won’t disclose the name, so let’s just call it “example.com”), I suddenly had a thought: “Why don’t I test this in my own style?”
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 product price from the client request without validating it against the database price.
Impact
An attacker could buy products at a price they choose, causing financial loss to the shop; the text does not mention any defence that limited the attack.
What the attacker needed
A user account with store credit; ability to intercept HTTP requests
The fix
The server should always take product prices from its own database and never trust price values sent by the client.
How it was found
- Log in as a user with a limited store credit balance.
- Add the expensive jacket to the cart.
- Capture the cart request with an intercepting proxy.
- Modify the product price in the request.
- Place the order with the altered price.
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.
A business logic flaw is when a website follows its own rules incorrectly, letting someone do something the designers did not intend. Here, the shop let the buyer's browser tell it how much the item costs, instead of checking the real price on its own server. So the buyer could say the expensive jacket cost almost nothing and still complete the purchase.
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.