Skip to content
Account takeover Write-up Beginner

2FA bypass after fix via manually injecting “isVerifyAuth” co

The application's 2FA check trusted a client-side cookie named isVerifyAuth, and the earlier fix only removed the cookie from local storage rather than removing the trust. An attacker with valid credentials could manually recreate the cookie and reach the profile page without entering any OTP.

Mahmoud Magdy Follow

Published on medium.com

⚠️ Before reading this writeup, you MUST read the original report first: https://medium.com/legionhunters/2fa-bypass-via-local-storage-isverifyauth-cookie-manipulation-7d1603f81f6d

Mahmoud Magdy, 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 application made an authorisation decision based on a client-controlled cookie instead of server-side session state, and the fix removed the cookie's default presence without removing that trust.

Impact

2FA could be bypassed entirely, so anyone holding a valid username and password could reach the account without the second factor, leading to account takeover.

What the attacker needed

Valid username and password; ability to edit cookies in the browser

The fix

The 2FA verification state should be kept only in the server-side session, and any client-supplied '2FA passed' flag should be ignored.

How it was found

  1. Log in with a valid email and password.
  2. Get redirected to the OTP verification page.
  3. Open DevTools and go to Application, then Local Storage.
  4. Manually create a cookie named isVerifyAuth with the value true.
  5. Change the URL to the customer profile page.
  6. The profile page loads without any OTP being entered.

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) asks for a one-time code after your password, so a stolen password alone is not enough. Here the site decided whether you had passed 2FA by reading a value stored in your own browser, which anyone can edit. The fix only stopped the site from writing that value, but the site still believed it if a user put it back.

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 Mahmoud Magdy

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.