Skip to content
Business logic Write-up Beginner

Exploiting Logic Flaw to Bypass Payment Using Fractional Quantiti

The checkout flow trusted a client-supplied fractional quantity, so an attacker could pay half price for an item. This caused direct financial loss to the store.

Abdelkader Mouaz Follow

Published on hamzadzworm.medium.com

“Today, I’ll share an interesting finding that allowed me to shop for anything for free.”

Hamzadzworm, on hamzadzworm.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 a fractional quantity from the client without validating that it was a positive whole number, and calculated the price by multiplying the unit price by that fraction.

Impact

An attacker could buy high-value items for a reduced price, causing direct financial loss and undermining the payment system.

What the attacker needed

An account on the store; ability to intercept HTTP requests

How it was found

  1. Go to the cart page.
  2. Continue and proceed to payment.
  3. Intercept the request and change the quantity to a fractional value.

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.

When you buy something online, the website sends the quantity you want to its server. Here the server did not check that the quantity was a whole number, so someone could ask for half an item and be charged half the price. This is a logic flaw: the code works as written but the business rule is wrong.

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 Abdelkader Mouaz

View all

6 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.