IDOR While Connecting Social Account in Hackster.io
The account linking page used a user ID in the URL without verifying ownership, so an attacker could change the ID to link their Facebook account to a victim's email and log in as the victim.
Published on medium.com
{{media:0}}
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the account linking endpoint identified the target account solely by a user ID in the URL and did not verify that the authenticated user owned that account.
Impact
An attacker could log into the victim's account remotely by linking their own Facebook account to the victim's email.
What the attacker needed
A free account on Hackster.io; a Facebook account with the same email; victim's user ID
The fix
The issue was fixed by adding proper authorization checks to the account linking endpoint.
How it was found
- Create an account on Hackster.io with an email address.
- Log out of the account.
- Try to log in with Facebook OAuth using the same email address.
- The site offers to link the existing account with the Facebook account.
- Note the user ID in the URL of the linking page.
- Change the user ID to another account's ID and link the Facebook account to that account.
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 write-up has not been written yet. The Original tab links to the source.
When you connect a social account to a website, the site should check that you own the account you are linking. Here, the page that links accounts used a number in the web address to identify the account, and it did not check that the number belonged to the person making the request. By changing that number, an attacker could link their own Facebook login to someone else's account and then sign in as that person.
What is IDOR?
One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.