Skip to content
Business logic Write-up Beginner

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.

Nishanthan Follow

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?”

Nishanthan, 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 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

  1. Log in as a user with a limited store credit balance.
  2. Add the expensive jacket to the cart.
  3. Capture the cart request with an intercepting proxy.
  4. Modify the product price in the request.
  5. 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.

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.