Add upto 10K rupees to a wallet by paying an arbitrary amount
The payment flow for adding money to a Zomato wallet did not cross-check the amount paid against the amount specified when creating the order. An attacker could create an order for a large amount, pay an arbitrary smaller amount, and still receive the full order amount credited to their wallet, up to 10,000 INR.
Originally disclosed on HackerOne
- Triaged in under an hour
- Fixed in 40 days
- Paid in 5 hours
- Disclosed after 3 months
Summary by the program
| TimeStamp | Action |
|---|---|
| Wed, 24 Nov 2021, 11:24 IST | Received the report |
| Wed, 24 Nov 2021, 11:25 IST | Validation and analysis of issue initiated |
| Wed, 24 Nov 2021, 11:28 IST | Vulnerability reported to the respective Internal Team |
| Wed, 24 Nov 2021, 11:36 IST | The authenticity of the issue is verified by the Security Team |
| Wed, 24 Nov 2021, 11:41 IST | Report Triaged |
| Wed, 24 Nov 2021, 14:47 IST | Fix Deployed on Production |
| Wed, 24 Nov 2021, 14:48 IST | Severity adjusted to High (7.5 CVSS) by Security Team |
| Wed, 24 Nov 2021, 15:47 IST | Fix verified by the Security Team |
| Wed, 24 Nov 2021, 16:00 IST | Fix acknowledged by the respective Internal Team |
| Wed, 24 Nov 2021, 16:09 IST | Minimum Bounty awarded to the researcher |
| Wed, 24 Nov 2021, 16:28 IST | The researcher confirmed the fix |
| Wed, 24 Nov 2021, 23:15 IST | Full bounty + bonus awarded to the researcher |
Summary:
Thanks to @ashoka_rao for reporting the issue. The researcher demonstrated a way to add any amount (upto 10k) to Zomato wallet without paying the amount in full and by paying an arbitrary amount.
Other Payment methods and consumers including online ordering were not vulnerable to this.
POC:
The addition to the Zomato wallet happens in a two-step process.
- Generate the Order Request for Addition:
POST /gw/payments/zomato_money/order
{"country_id":"1","service_type":"ZM_RECHARGE","cart":"null","amount":"1000.0"}
Response:
{"order_id": "XXXX"}
- Complete the Payment against the order request:
POST /v2/sdk/make_payment
amount=XX&order_id=XXX&order_type=ZM_RECHARGE
The amount requested to generate the order_id - XXXX was 1000 but while paying one could have passed an arbitrary amount instead of 1000 against the order_id, which was not cross-checked.
So one could have generated an order for the amount of 1000 while paying an arbitrary amount against the order and still get the entire amount defined in order added to your wallet (limited to 10K INR).
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The payment completion endpoint did not verify that the amount paid matched the amount specified when the order was created.
Impact
An attacker could add up to 10,000 INR to their wallet while paying an arbitrary smaller amount; other payment methods and online ordering were not affected.
The fix
The issue was fixed and the fix was verified by the security team.
How it was found
- Send a request to create a wallet recharge order for a chosen amount.
- Receive an order ID in the response.
- Send a payment request for that order ID with an arbitrary (smaller) amount.
- The full order amount is credited to the wallet despite the lower payment.
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 report has not been written yet. The Original tab links to the source.
When you add money to a wallet, the app first creates an order for a certain amount and then asks you to pay. The server should check that the amount you actually pay matches the order amount. Here it did not, so someone could pay a tiny amount but still get the full order amount added to their wallet.
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.