Skip to content
Business logic Write-up Beginner

Stealing money from one account to another account

The money transfer endpoint accepted a negative amount, so sending a negative value credited the sender's account while deducting the same amount from the recipient's account. An attacker could therefore move funds from another user's account into their own.

Ajay Gautam Follow

Published on medium.com

{{media:0}}

Ajay Gautam, 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 transfer endpoint did not validate that the amount was a positive number, so a negative value reversed the credit and debit.

Impact

An attacker could steal balance from another user's account and add it to their own.

What the attacker needed

An account on the platform; knowledge of a target account identifier

How it was found

  1. Find the endpoint that transfers money between accounts.
  2. Send a transfer request with a negative amount and a target account.
  3. Observe that the sender's balance increases and the target account's balance decreases.

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 money transfer feature normally takes an amount and moves that amount from one account to another. Here the server did not check that the amount was positive, so a negative number reversed the direction: the sender gained money and the recipient lost it. This is a business logic flaw, meaning the code works as written but the rules of the feature are 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 Ajay Gautam

View all

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