Write up : Business Logic Flaw in Payment Discount Calculation Allows Excessive Discount…
The discount logic on a payment flow did not properly validate coupon stacking or restrict category-specific discounts to eligible items. An attacker could combine multiple codes, including by tampering with the client-side discount field, to pay far less than the intended price.
Published on medium.com
Platform: private program Severity: Medium Reward: €450 Bug Type: Business Logic Flaw
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 client-supplied discount data and lacked server-side checks on coupon stacking and category eligibility.
Impact
An attacker could buy goods at considerably lower prices, causing revenue loss, and automating it for bulk purchases could cause greater financial damage.
What the attacker needed
A customer account; ability to reach checkout; browser developer tools
The fix
The server should validate discounts server-side, allow only one code per transaction, restrict category discounts to eligible items, cap the maximum discount, and log suspicious attempts.
How it was found
- Log in and add items worth about €200 to the cart.
- Apply a valid 20% promotional code, bringing the total to €160.
- Add a category-specific 15% code meant for books only, which is applied to the whole order.
- Use browser developer tools to tamper with the discount field and inject multiple codes at once.
- Proceed to checkout and pay a much lower final 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.
An online shop lets you enter discount codes to lower a price. This shop trusted the browser too much and never properly checked which codes were combined or which items a code applied to, so a customer could pile on discounts and pay much less than they should.
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.