Project

General

Profile

Actions

Bug #14874

closed
RP RM

MFA is bypassed when confirming an existing account during registration

Bug #14874: MFA is bypassed when confirming an existing account during registration

Added by Raf Pauwels 29 days ago. Updated 10 days ago.

Status:
Closed
Priority:
High
Target version:
Start date:
10/09/2026
Due date:
% Done:

0%

Estimated time:

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

  1. Configure AuthService with an MFA provider and enable MFA for an existing account.
  2. Enable registration in AuthWidget.
  3. Open registration and enter the existing account's login name.
  4. Click "User exists, is this you?".
  5. 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 Actions #2

  • Status changed from New to InProgress
  • Assignee set to Romain Mardulyn

RM Updated by Romain Mardulyn 25 days ago Actions #3

  • Status changed from InProgress to Review
  • Assignee deleted (Romain Mardulyn)

ED Updated by emil de keyser 25 days ago Actions #4

  • Assignee set to emil de keyser

ED Updated by emil de keyser 25 days ago Actions #5

  • Status changed from Review to Resolved
  • Assignee changed from emil de keyser to Romain Mardulyn

RM Updated by Romain Mardulyn 10 days ago Actions #6

  • Status changed from Resolved to Implemented @Emweb

RM Updated by Romain Mardulyn 10 days ago Actions #7

  • Status changed from Implemented @Emweb to Closed

RM Updated by Romain Mardulyn 10 days ago Actions #8

  • Private changed from Yes to No
Actions

Also available in: PDF Atom