The authentication code when activating 2FA can be used again to log in
The authentication code sent by SMS to activate two-factor authentication could also be reused as a login verification code. An attacker who knew that activation code could log in as the victim without their knowledge.
- Triaged in 3 days
- Fixed in 11 days
- Disclosed after 17 months
Hi team, Summary:
I noticed that when activating 2FA by sms, you can also use that 2FA activation code, to use as an authentication code when logging in. Steps:
1, Go to: https://accounts.shopify.com/accounts/36430415/security and log in 2, Activate 2FA by sms for the account and save the code sent in your phone 3, Log out and perform login again 4, After entering the password and being asked to enter the verification code, you only need to replay the code used to activate the previous 2FA. 5, Logged in successfully.
Impact
Assuming the hacker knows the authentication code when activating the victim's 2FA, he can reuse the victim's code to replay and log in successfully without the victim knowing.
Recommend:
Each authentication code should only be used once.
Best regards, john
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the system did not invalidate the activation code after it was used to enable 2FA, allowing it to be accepted again as a login code.
Impact
If an attacker knows the activation code, they could reuse it to log in as the victim without the victim's knowledge.
What the attacker needed
Attacker knows the activation code; victim has SMS-based 2FA enabled
The fix
The reporter recommends each authentication code be single-use.
How it was found
- Log in and go to the account security page.
- Activate SMS-based 2FA and note the code sent to the phone.
- Log out and start logging in again.
- Enter the password, then when asked for a verification code, enter the same code used for activation.
- The login succeeds.
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 report has not been written yet. The Original tab links to the source.
Two-factor authentication (2FA) adds a second step to logging in, often a code sent by text message. Normally each code should work only once. Here, the code used to set up 2FA could be used again later to log in, so anyone who saw that code could get into 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.