🧠My First Write-Up: Wallet Top-Up Refund Vulnerability (Found on a Real Target)
The wallet top-up flow allowed two simultaneous payment attempts to be manipulated so that a callback from the second payment reused the reference from the first, causing the system to credit the wallet and also refund the original payment. An attacker could duplicate money in their wallet while the payment service provider refunded the bank account.
Published on medium.com
🧠My First Write-Up: Wallet Top-Up Refund Vulnerability (Found on a Real Target)
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 backend did not lock or validate the pairing of the payment reference and invoice number across concurrent transactions, allowing a replayed callback to trigger both a credit and a refund.
Impact
An attacker could duplicate wallet balance while also receiving a bank refund, effectively creating money from the same payment.
What the attacker needed
A user account with wallet top-up; ability to intercept and modify callbacks; two simultaneous payment attempts
The fix
The system should ensure each order has only one active invoice number, make callbacks one-time-use and bound to transaction state, and strictly verify the payment reference against the invoice number before crediting or refunding.
How it was found
- Start a wallet top-up and complete payment at the gateway, receiving a callback with a transaction reference.
- Open a second tab and start another top-up for the same amount, creating a new invoice number.
- Intercept the callback for the second payment and change the waiting flag and replace the new reference with the old one from the first payment.
- Send the modified callback; the backend flags the transaction as failed and starts a refund.
- After a few minutes, the payment service provider refunds the bank account while the wallet still shows the credited amount.
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 pay to top up a wallet, the app talks to a payment company and gets back reference numbers to confirm the payment. This report shows that by starting two payments at once and editing the confirmation message, someone could make the app think both payments succeeded and also get a refund, so the same money appeared twice.
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.