Skip to content
Business logic Write-up Beginner

Business logic flaw leading to product depletion

The server did not enforce a per-order quantity limit, and it reserved stock before payment. An attacker could bypass the limit and reserve a merchant's entire inventory without paying, making the product appear out of stock to all other buyers.

medium.com

Published on medium.com

I was testing a platform (let’s call it Site A) that allows people to create their own stores and sell products. While exploring the purchase workflow, I noticed a standard business rule: users were restricted to buying a maximum of 10 items per order.

Excessium, 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 trusted the client-supplied quantity and reserved stock at checkout initiation without validating the per-order limit or requiring payment.

Impact

An attacker could reserve a merchant's entire inventory without paying, causing the product to appear out of stock to all other buyers and preventing real sales.

What the attacker needed

A seller account to observe stock; ability to intercept requests; no payment required

How it was found

  1. Intercept the purchase request and change the quantity from 10 to a much higher number.
  2. Create a seller account and a dummy product to observe the merchant side.
  3. Add a large quantity to the cart and proceed to checkout.
  4. Observe that the system locks the stock and the storefront shows reduced availability.

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 shop website had a rule that you could only buy 10 of an item at once, but the server did not check this rule. The site also set aside items as soon as you started checkout, before you paid. By asking for a huge quantity, someone could make all of a seller's stock look sold out without spending any money.

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.