Account takeover w/o interaction for a user that doesn't have 2fa enabled via 2fa linking and improper auth at /api/2fa/verify
The 2FA linking and verification endpoints accepted a user-supplied account ID without checking that it belonged to the authenticated user. An attacker who knew a victim's account ID could link their own 2FA to the victim's account and then log in as the victim using only that ID and a valid 2FA code.
- Triaged in 6 days
- Fixed in 54 days
- Paid in 6 days
- Disclosed after 5 months
##Description: Hello, team! I found 2 vulnerabilities in your 2FA implementation:
- There is a possibility to link 2FA to any other account if it wasn't set up before and user ID is known on the request /api/2fa. In order to do this, after performing a request for 2FA linking, substitute the ID to the victim's ID, organization could be any.

- We can log in to the account without knowing login and password, using 2FA only, ID should be known. As you can see, in this request, we. don't use tokens/cookie that could be related to the user's ID, we are using only ID a561a2de-b8fe-49f8-8943-fb42229b7b08 and valid code.
Thus, using these 2 bugs we can fully takeover an account that doesn't have 2FA enabled (it was skipped after the first login).
##Steps to reproduce:
- As a
user1, register at https://console.helium.com, skip 2FA, copy the ID. - Register an account
user2, register at https://console.helium.com, perform a 2FA request but with ID fromuser1. 2FA is enabled now on the accountuser1! - Perform a request /api/2fa/verify with valid code and ID of
user1.
Result: You've successfully achieved an account takeover. In the future, you'll be able to log in again with this technique in the future, but a victim will have trouble logging in because of 2FA.
Impact
If a victim's account ID is known, we can fully takeover an account without user interaction. User ID could be disclosed at https://console.helium.com/users (if our user role has access to this directory) or by using other techniques.
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 2FA linking and verification endpoints trusted a client-supplied user ID without verifying it matched the authenticated session.
Impact
An attacker who knows a victim's account ID could fully take over the account without user interaction, though the victim would then have trouble logging in because 2FA is enabled.
What the attacker needed
Victim's account ID is known; victim has not enabled 2FA; attacker has a valid account
How it was found
- Register as user1, skip 2FA, and copy the account ID.
- Register as user2 and send a 2FA linking request using user1's ID.
- Send a verification request with a valid code and user1's ID to complete the takeover.
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) is a second step at login, usually a code from an app. Here the server trusted an account ID sent by the client instead of checking who was logged in. That let an attacker attach their own 2FA to someone else's account and then sign in as that person.
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.