Skip to content
Account takeover Write-up Intermediate

Remember Me. Forget MFA

The application set a persistent 'remember me' cookie before the second factor (OTP) was verified, and a session-restore path logged the user in without checking MFA. An attacker who knew the victim's password could check 'Remember Me', close the browser at the OTP screen, reopen it, and reach the dashboard without entering a code.

oksuzkayra16 Follow

Published on medium.com

The target application had two-factor authentication. Everything looked fine.

Kayra Öksüz, 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

Root cause

The login flow marked the session as authenticated and issued the remember-me cookie before OTP verification, and the session-restore middleware trusted that cookie without checking whether MFA had been completed.

Impact

Anyone who obtained a user's password could bypass the second factor entirely and reach the account, so the protection 2FA was meant to provide was lost.

What the attacker needed

Victim's password known; attacker can reach the login page

The fix

The remember-me cookie and the authenticated session flag should only be set after OTP verification succeeds, and the session-restore path should check that MFA was completed.

How it was found

  1. Log in with the victim's credentials and tick 'Remember Me'.
  2. When the OTP screen appears, close the browser without entering a code.
  3. Reopen the browser and navigate back to the target.
  4. The dashboard loads without any OTP prompt.

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 asks for a one-time code after your password, so a stolen password alone is not enough. Here the site also offered a 'Remember Me' cookie that let you skip logging in again, but it created that cookie too early, before the code was checked. Anyone with the password could tick the box, quit at the code screen, come back, and be let straight in.

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.

More by oksuzkayra16

View all

1 more disclosed report, best first.

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.