Skip to content
Business logic Disclosed report Intermediate

[www.zomato.com] Availing Zomato Gold membership for free by tampering plan id(s)

The iOS app's payment request accepted a client-supplied plan identifier and amount, and one plan had a zero cost, so a tampered request approved a Gold membership without any payment. The same trick combined with the referral programme let an attacker stack free months using extra accounts.

pasw Follow

Originally disclosed on HackerOne

Medium 6.5 View original
  • Fixed in under an hour
  • Paid in 1 hour
  • Disclosed after 38 hours

Summary: Get free zomato gold membership using zomato iOS app.

Description: [add more details about this vulnerability]

  1. Login to the zomato iOS application.
  2. Select zomato gold from the home screen.
  3. Depending on your location, you will see different gold pack options.
  4. Select any gold pack.
  5. Select payment method.
  6. Intercept the api using burp.

POST ████useragent=model_iPad__os_9.3.5__v_13.1.9__t_iPad&app_version=13.1.9&push_permission=0&session_id=7&app_run_id=1&lang=en&presentlon=77.70730672359205&uuid=YOUR_UUID

access_token=YOUR_ACCESS_TOKEN&amount=1050&city_id=4&client_id=zomato_ios_v2&email=YOUR_EMAIL&name=YOUR_NAME&██████plan_id=40

  1. You can see that the api takes plan_id and amount as paramter.
  2. I decided to try various other plain_Ids using burp intruder.
  3. Using the intruder, I figured out that the plan_Id 147 has a membership cost of 0.

(Image: intruder_plan_ids.png) 10) Replace the plan id and amount the step 6. ( Image: api_request.png)

POST █████████useragent=model_iPad__os_9.3.5__v_13.1.9__t_iPad&app_version=13.1.9&push_permission=0&session_id=7&app_run_id=1&lang=en&presentlon=77.70730672359205&uuid=YOUR_UUID

access_token=YOUR_ACCESS_TOKEN&amount=0&city_id=4&client_id=zomato_ios_v2&email=YOUR_EMAIL&name=YOUR_NAME&██████████plan_id=147

  1. You will get the following response. (Image: api_response.png)

{"response":{"status":"success","message":"Transaction Approved Without Sending to Gateway"

  1. You are now a zomato gold member.
  2. There is also a referral program in zomato. In this program, if your freind buys zomato gold using your referral code, you get another 1 month of free membership.
  3. The attacker can create as many accounts as possible and share his referral code with these accounts, purchase free zomato gold from the new codes using the referral code and also get 1 month extended membership for each referral. (Image: extended_gold_by_1_month_sharing_voucher_code.png)

RCA:

  1. Some apis take in the plan_id and give the plan details in the response.
  2. This makes it easier for the attacker to enumerate plan ids.
  3. Also, multiple plans are valid at the same time.

Possible Fixes:

  1. Plan_ids should not be easily guessable.
  2. Only required plans should be kept active and all other plans should be disabled.
  3. If possible, for any payment made, have some extra checks when the payment_amount is zero.

Impact

An attacker can get zomato subscription free of cost for a month. Then using the referral code, he can extended the subscription by another month for each successful free referral using fake accounts.

The original report as published on HackerOne, by pasw. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

Likely the server trusted the client-supplied plan identifier and amount and approved a zero-value transaction without validating the price against the plan.

Impact

An attacker could obtain a paid subscription for free and, through the referral programme, extend it by a month per fake referral account.

What the attacker needed

A Zomato account; the iOS app; a proxy to intercept requests

The fix

The server should validate the plan and price itself, keep only intended plans active, and add extra checks when the payment amount is zero.

How it was found

  1. Log in to the iOS app and open the Gold section.
  2. Pick a Gold pack and a payment method.
  3. Intercept the purchase request with a proxy.
  4. Enumerate plan identifiers to find one with zero cost.
  5. Resend the request with that plan identifier and a zero amount.
  6. Receive a success response and gain Gold membership.

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 buy a subscription, the app sends a request to the server saying which plan you picked and how much to charge. Here the server trusted those numbers from the phone instead of checking the real price itself, so someone could swap in a plan that costs nothing and still get the paid membership.

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.

More from Eternal

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.