Bypassing HackerOne 2FA due to race condition.
A race condition in HackerOne's 2FA reset endpoint allowed an attacker to send multiple reset requests, each generating a separate cancellation link. If the victim cancelled only one link, the remaining links stayed active, so the attacker could still complete the 2FA reset and take over the account.
medium.com
Published on medium.com
If you are interested in older writeups , you can read them at https://medium.com/@akashhamal0x01
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 2FA reset endpoint lacked a race-condition guard, so multiple concurrent requests each created an independent reset token and cancellation link, and cancelling one did not invalidate the others.
Impact
An attacker who knows the victim's password could disable 2FA on the victim's HackerOne account, leading to account takeover, because the victim would need to cancel every reset link to stay safe.
What the attacker needed
Attacker knows victim's email and password; victim has 2FA enabled; attacker can send concurrent requests; victim does not cancel all reset links
The fix
The fix was deployed so that clicking any 2FA reset cancellation link invalidates all other links and notifies the user by email.
How it was found
- Go to the HackerOne sign-in page and enter the victim's email and password.
- Click the 'Reset two-factor authentication' link.
- Race the GraphQL TwoFactorReset request so multiple reset emails are sent.
- The victim receives several reset notification emails with separate cancellation links.
- If the victim cancels only one link, the other links remain active, allowing the attacker to complete the 2FA reset.
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.
Two-factor authentication (2FA) is a second check, like a code from your phone, that protects your account even if someone knows your password. The reset feature is meant to let you recover access if you lose your phone, but it sends a link to cancel the reset. Because the reset request could be sent many times at once, many cancel links were created, and cancelling one did not cancel the others, so the attacker could still turn off 2FA.
What is Race condition?
Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.