Skip to content
Business logic Write-up Beginner

Web/Mobil Uygulamalarda Business Logic Zafiyetler ve Örnek Bir U

A shopping application accepted a negative quantity for a cart item, which reduced the total price. By adding the target jacket normally and a cheaper item with a negative quantity, an attacker could bring the total below the jacket's price and still check out.

Mert Erkoç Follow

Published on medium.com

Web ve mobil uygulamalar günümüz dünyasında hayatımızın neredeyse her alanında kullanılmaktadır. Alışveriş yapmak, bankacılık işlemlerini gerçekleştirmek, oyun oynamak veya sosyal medya kullanmak için sürekli çeşitli uygulamalarla etkileşimde bulunuluyor.

Mert Erkoç, 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 value without validating that it is a positive integer, and only rejected carts whose total went fully negative.

Impact

An attacker could buy a product for less than its listed price, limited only by the rule that the cart total must not go below zero.

What the attacker needed

A shopper account with store credit; ability to intercept requests

How it was found

  1. Open the target product's details page and add the jacket to the cart.
  2. Intercept the add-to-cart request in Burp Suite and note the quantity parameter sent to the cart endpoint.
  3. Change the quantity to a negative value and observe that the total price drops.
  4. Note that a fully negative total is rejected with an error about the cart total.
  5. Add the jacket normally with quantity one, then add a cheaper product with a negative quantity so the total stays positive but lower.
  6. Complete the order at the reduced total.

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 choose how many of an item go in your basket. The shop never checked that this number must be positive, so entering a negative number for a cheap item actually subtracted money from the total. That let the buyer pay less than the real price for an expensive item.

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.