Skip to content
Business logic Write-up Intermediate

“Day 11: The Invisible Threat — Hunting for Logic Flaws in Modern Web Applications”

A logic flaw in an e-commerce cart allowed bulk pricing to persist after the quantity was reduced, so an attacker could buy a single item at the bulk-discounted unit price. This could let them pay far less than intended and potentially harm the flash sale system.

Aman Sharma Follow

Published on infosecwriteups.com

free link

Aman Sharma, 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 system applied bulk pricing before validating quantity and did not re-validate prices after quantity changes.

Impact

An attacker could buy items at a much lower price than intended, potentially causing financial loss and disrupting flash sales.

What the attacker needed

A user account on the e-commerce platform; ability to add items to cart and apply coupons

The fix

The system should re-validate prices after any quantity change and apply bulk pricing only after quantity validation.

How it was found

  1. Add 10 units of a product to the cart with a coupon.
  2. Check the checkout total to confirm the bulk discount is applied.
  3. Change the quantity back to 1 while keeping the same coupon.
  4. Check the checkout total again and observe that the bulk unit price remains.

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 logic flaw is a mistake in how a website's business rules work, not in its code security. Here, the site applied a bulk discount when 10 items were added, but when the quantity was changed back to 1, it kept the lower bulk price instead of recalculating. An attacker could then buy one item at the bulk rate, paying much less than the normal 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.

More by Aman Sharma

View all

34 more disclosed reports, best first.

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.