# Add upto 10K rupees to a wallet by paying an arbitrary amount

Zomato wallet recharge order amount was not cross-checked against payment amount, letting attacker pay arbitrary small amount and credit up to 10K INR to wallet.

- Payout: $2,000
- Severity: high
- Program: Eternal
- Found by: ashoka_rao
- Disclosed: 2022-02-23
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/1408782
- Library page: https://bugbountylibrary.com/r/h1%3A1408782
- Tags: area:mobile domain:api domain:mobile impact:funds-loss impact:integrity kind:bounty platform:hackerone sev:high tech:rest vuln:business-logic vuln:fee-bypass

**Target:** Zomato wallet recharge payment flow (zomato_money order + make_payment endpoints)
**Root cause:** The payment completion endpoint trusted a client-supplied amount and never validated it against the amount stored on the order_id created in the first step.
**Steps:**
1. Create recharge order: `POST /gw/payments/zomato_money/order` with `{"country_id":"1","service_type":"ZM_RECHARGE","cart":"null","amount":"1000.0"}` -> returns `order_id`.
2. Complete payment: `POST /v2/sdk/make_payment` with `amount=XX&order_id=XXX&order_type=ZM_RECHARGE` where XX is an arbitrary (small) amount instead of 1000.
3. Wallet is credited the full 1000 (order amount) despite paying XX; repeat up to 10K INR cap.
**How found:** Researcher noticed the two-step order/payment flow and tested whether the amount parameter in the payment step was validated against the order's stored amount.
**Exploitation:** Attacker creates a wallet recharge order for the desired amount, then submits a payment for an arbitrary lower amount against the same order_id; server credits the full order amount to the wallet without reconciling the paid amount.
**Insight:** In two-step order-then-pay flows, always replay the payment step with a mismatched amount/currency/order_id to test server-side reconciliation between the order record and the payment request.

## Proof of concept (copied exactly from the original report)

**Order request to add wallet money**

```
POST /gw/payments/zomato_money/order

{"country_id":"1","service_type":"ZM_RECHARGE","cart":"null","amount":"1000.0"}
```

**Payment with arbitrary amount against order**

```
POST /v2/sdk/make_payment

amount=XX&order_id=XXX&order_type=ZM_RECHARGE
```

