Taking over Facebook accounts using Free Basics partner portal
The Free Basics partner portal allowed an admin to change a user ID parameter when adding a new admin, causing a notification email to be sent to an attacker-controlled address that leaked the victim's primary email and potentially login codes. An attacker could use the leaked information to take over the victim's Facebook account without user interaction.
Published on josipfranjkovic.com
There are a couple public examples of Facebook's bug bounty program increasing rewards based on their internal investigation of the report. This is a story of one such report, where a medium-high impact privacy bug turned out to be an account takeover with no user interaction needed.
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 server trusted a user-supplied user ID parameter without verifying it belonged to the authenticated admin, and the notification email included sensitive data (email and login codes) in a link.
Impact
An attacker could leak any user's primary email and potentially login codes, leading to account takeover with no user interaction, though some restrictions applied.
What the attacker needed
Access to Free Basics partner portal as admin; Ability to intercept HTTP requests; Victim's user ID
The fix
The account takeover was fixed by Facebook, and the email leak was fixed later.
How it was found
- Using your admin account, go to the partner portal settings page.
- Input anything as the name, and in the email field input an email you control.
- Click 'Add' and intercept the POST request to the save endpoint.
- Change the user_id parameter to the victim's ID and forward the request.
- An email arrives at your controlled address containing the victim's primary email and potentially login codes.
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.
The partner portal let an admin add new admins. By changing a hidden user ID in the request, the attacker could make the system send a notification email to their own address that contained the victim's email and possibly a login code. This meant someone could take over another person's Facebook account without the victim doing anything.
What is Account takeover?
Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.