Skip to content
Account takeover Write-up Intermediate

Day 22: Account Takeover Worth $1000

A 2FA verification request captured while 2FA was enabled continued to issue a valid JWT after the user disabled 2FA. An attacker with that token could set a password on an OAuth-only account and log in directly, bypassing OAuth.

medium.com

Published on medium.com

Today’s write-up by Faique showcases a critical authentication flaw that led to an account takeover due to misconfigured 2FA and OAuth.

dani3l, on medium.com

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 an account, view and edit confidential details, modify products and organisation names, manage members, add a password to bypass OAuth, and delete the account, but only if the victim had enabled and then disabled 2FA.

What the attacker needed

Victim enabled then disabled 2FA; attacker captured a 2FA request

How it was found

  1. Create an account and test the login flows.
  2. Enable 2FA and log in via OAuth.
  3. Intercept the request that sends the 2FA code to the server.
  4. Disable 2FA on the account.
  5. Replay the captured 2FA request and receive a valid JWT token.
  6. Use the token to set a password on the OAuth 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.

Two-factor authentication (2FA) is a second proof of identity, such as a code sent to your phone. OAuth lets you sign in through another provider like Google. Here, a request that checked a 2FA code kept working after 2FA was switched off, so someone holding that request could get a login token and add a password to 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.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.