I figured out a way to hack any of Facebook’s 2 billion accounts, and they paid me a $15,000 bounty for it
The password reset endpoint on a beta Facebook domain lacked rate limiting, allowing an attacker to brute-force the six-digit recovery code sent to a user's phone or email. This could let an attacker set a new password and take over any account without user interaction.
Published on medium.freecodecamp.org
I am publishing this with the permission of Facebook under the responsible disclosure policy. They have fixed this vulnerability.
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
Impact
An attacker could take over any Facebook account by brute-forcing the recovery code and setting a new password, gaining access to messages, payment cards, and private photos.
What the attacker needed
Victim's phone number or email address; access to the beta domain endpoint
The fix
The vulnerability was fixed by Facebook, as confirmed by the author.
How it was found
- Go to the password recovery page and enter the victim's phone number and email address.
- Receive the six-digit code sent to the victim's phone or email.
- Submit the code to the recovery endpoint on the beta domain, repeating guesses until the correct code is found.
- Use the correct code to set a new password for the victim's 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 forget your password, a website often sends a short numeric code to your phone or email to prove it's you. If the site doesn't limit how many times someone can guess that code, an attacker can try every possible combination until they get it right. Here, the attacker could guess the code and then set a new password, taking over the account.
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.