Skip to content
Business logic Write-up Intermediate

Breaking app’s logic workflow to decrease the payments’ amounts

The application calculated the payment amount from an order's lesson count at the time the payment token was created, but later checked the order's lesson count again after payment. An attacker could create a cheap order, obtain a payment token for it, then update the order to add more lessons before completing the payment, receiving more lessons than paid for.

bag0zathev2 Follow

Published on medium.com

I’ve found out a critical vulnerability in a private program recently, just waited for it to be triaged and awarded to publish this write-up to be fully completed and verified.

Fares Walid (SirBugs), 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 payment amount was fixed in a token at order creation, but the number of lessons was read from the mutable order after payment, so the two could diverge.

Impact

An attacker could pay for a single lesson but receive many more, effectively lowering the price per lesson; the report does not mention any defence that limited the exploit.

What the attacker needed

A user account; ability to intercept and modify requests

The fix

The text says the issue was fixed within two to three days, but does not describe the fix.

How it was found

  1. Create an order for one lesson using the CreateOrUpdateOrder query.
  2. Initialise the payment client to get a payment token for that order.
  3. Intercept the payment request and, before completing it, call CreateOrUpdateOrder again to change the lesson count to four.
  4. Complete the payment using the original token for one lesson.
  5. Refresh the page to see four lessons credited.

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 lessons, the app first creates an order and then asks a payment company to handle the money. The app made a payment token based on the original order, but after paying it looked at the order again to decide how many lessons you get. By changing the order after getting the token, you could pay for one lesson but receive several.

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 bag0zathev2

View all

1 more disclosed report, 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.