Skip to content
Business logic Write-up Beginner

I Bought a ₹1,599 Government Book for ₹1. The Server Approved It.

The checkout request sent to the payment gateway included the order amount as a client-supplied parameter, and the server passed it through without checking it against the real product price. An attacker could change the amount to any value and the gateway would create a payment session for that amount, allowing books to be bought for far less than their listed price.

infosecwriteups.com

Published on infosecwriteups.com

I was clicking around a government website — an official portal where students could buy books published by government bodies. Study material, reference texts, the kind of dense, official content you’d find in competitive exam prep stacks.

LordofHeaven, on infosecwriteups.com

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 took the order amount from the client-side checkout request and forwarded it to the payment gateway without re-checking it against the stored product price.

Impact

Any user with an intercepting proxy could set an arbitrary price for any book in the catalogue, letting publicly funded study material be obtained for a token amount; the author did not complete a payment.

What the attacker needed

A proxy tool such as Burp Suite; ability to reach the checkout flow; no account restriction mentioned

The fix

The issue was fixed after responsible disclosure, with the portal no longer accepting arbitrary amounts from the client side.

How it was found

  1. Add a book to the cart and go through checkout with test billing details.
  2. Intercept the POST request to the payment handler in a proxy.
  3. Change the amount parameter from the real price to a much smaller value.
  4. Forward the request and observe the payment page showing the reduced amount.
  5. Refresh to confirm the payment session was created at the reduced amount.

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, your browser sends a request to the shop's server saying what you want and how much it costs. Here the shop's server simply believed the price the browser sent, instead of looking up the real price itself. So anyone who could edit that request before it was sent could set the price to whatever they liked, and the payment page would show that fake price.

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.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.