Skip to content
Business logic Write-up Beginner

Payment Bypass Allowed Me to Purchase Anything for Free

A shop subdomain accepted a negative quantity in the cart, which reduced the total price. By adding a second product whose price cancelled the negative amount, the attacker could place an order for free.

medium.com

Published on medium.com

“Today, I’ll share an interesting finding that allowed me to shop for anything for free.”

Hamzadzworm, on medium.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 accepted a negative quantity value from the client and used it directly in the price calculation without validating that it was a positive whole number.

Impact

An attacker could obtain products without paying, as the report shows a successful order placed with a tampered price.

What the attacker needed

Access to the shop subdomain; a cart and checkout flow

How it was found

  1. Find a shop subdomain belonging to the target company.
  2. Try tampering with the price, the currency and the success/failure response values; none of these worked.
  3. In the cart, change the quantity parameter to a negative number.
  4. Add another product so that the negative amount and the positive price cancel out to zero.
  5. Place the order and confirm it succeeds at no cost.

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 adds up the prices of the items in your cart to work out what you owe. Here the shop trusted the number the browser sent for how many items you want, and it did not check that the number was positive. Sending a negative number made the total go down, and pairing it with a normal item brought the total to zero, so the order cost nothing.

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.