How I Discovered a Price Manipulation Bug While Buying a Simple Product
The checkout request included a client-supplied product price field, and the server accepted it without recalculating the real price. An attacker could change that value and pay less than the listed price, with the altered amount passed to the payment gateway.
While checking out, I noticed the price displayed during the final step came directly from the browser. No server re-check.
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
The server trusted a price value supplied by the client instead of fetching the authoritative price from its own database before payment.
Impact
An attacker could pay a lower price than intended, and the manipulated amount was accepted by the payment gateway.
What the attacker needed
Access to the checkout flow; ability to intercept and modify requests
The fix
The server should always fetch the price from its database and recalculate totals before initiating payment, rather than trusting client-supplied values.
How it was found
- Visit the product details page and note the displayed price.
- Add the item to the cart and proceed to checkout.
- Monitor the checkout request to see what data the browser sends and receives.
- Notice a client-controlled product price field in the request.
- Compare the site price with the price sent in the request to see if the server validates it.
- Observe that the client-sent amount is forwarded to the payment gateway and the transaction succeeds.
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 browser sends details to the shop's server. Here, the browser also sent the price, and the server believed it instead of looking up the real price itself. That means someone could edit the price before paying and be charged less.
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.