Bug #14874
closedMFA is bypassed when confirming an existing account during registration
0%
Description
When a user with MFA configured chooses to register using an existing login name, Wt offers the "User exists, is this you?" flow. After the user enters the correct password in the confirmation dialog, Wt logs them in as LoginState::Strong without requiring their second factor.
This differs from the regular password-login flow, which checks whether the user needs MFA and sets the login state to LoginState::RequiresMfa. As a result, the existing-account confirmation flow can bypass the MFA challenge.
Steps to reproduce¶
- Configure
AuthServicewith an MFA provider and enable MFA for an existing account. - Enable registration in
AuthWidget. - Open registration and enter the existing account's login name.
- Click "User exists, is this you?".
- Enter the account's password in the confirmation dialog.
Wt logs the user in without prompting for an MFA code. By comparison, logging in through the regular login form prompts for MFA.
Expected behavior¶
After confirming the password, Wt should also require the configured MFA factor before granting a strong login, consistent with the regular password-login flow.
It might be even better to remove this flow altogether and not let the user know that the account exists. Instead we could return a generic error message to prevent user enumeration. That is an OWASP recommendation:
The account registration feature should also be taken into consideration, and the same approach of a generic error message can be applied regarding the case in which the user exists.
The objective is to prevent the creation of a discrepancy factor, allowing an attacker to mount a user enumeration action against the application.
RM Updated by Romain Mardulyn 27 days ago
- Status changed from New to InProgress
- Assignee set to Romain Mardulyn
RM Updated by Romain Mardulyn 25 days ago
- Status changed from InProgress to Review
- Assignee deleted (
Romain Mardulyn)
ED Updated by emil de keyser 25 days ago
- Assignee set to emil de keyser
ED Updated by emil de keyser 25 days ago
- Status changed from Review to Resolved
- Assignee changed from emil de keyser to Romain Mardulyn
RM Updated by Romain Mardulyn 10 days ago
- Status changed from Resolved to Implemented @Emweb
RM Updated by Romain Mardulyn 10 days ago
- Status changed from Implemented @Emweb to Closed
RM Updated by Romain Mardulyn 10 days ago
- Private changed from Yes to No