← All articlesWeb security

Designing MFA Replacement So an Active Session Is Not Enough

A user is signed in and wants to replace a multifactor authentication factor—MFA. For the product, this is a separate, high-risk action: an active session may have been hijacked, so being signed in is not enough. The team needs to draw a clear boundary between access to settings and permission to change account protection. Here is what confirmation to require, how to handle recovery, and what to check before releasing changes.

The trust boundary: signing in does not authorize security changes

An active session lets a user work with their account, but should not, by itself, authorize MFA factor replacement. OWASP specifically highlights the possibility of session hijacking. When designing settings, distinguish between two decisions: showing the user the security section and allowing them to change a registered factor. The second requires reauthentication.

Start by documenting this rule in the product requirements. Make the acceptance criteria unambiguous: a valid session without additional confirmation does not authorize completion of MFA replacement. Test the outcome of the operation, not just whether a confirmation screen appears.

Reauthenticate with an already registered factor

Before replacing MFA, require confirmation using an already registered factor. In its general reauthentication guidance, OWASP also lists authenticators bound to the account, such as the current password or a passkey. For MFA replacement, retain the more specific requirement: confirmation using an existing registered factor, rather than merely having an active session.

The new factor the user is about to add should not count as proof of possession of the previous one. State explicitly in the requirements which existing authentication method is used for verification. Do not substitute security questions for a bound authenticator: OWASP guidance rules out that substitution during reauthentication.

A fictional example: replacing a factor in a work account

Imagine a wholly fictional service called Mayak and its test user, Anna. She opens settings in an active session and selects MFA replacement. Under the proposed flow, the service requires confirmation using an existing factor. Until Anna provides it, replacement cannot be completed. This makes the trust boundary explicit through concrete product behavior.

If Anna has lost access to her previous factor, that is a recovery scenario, not a reason to skip verification. For a particularly high-value account, the team may also introduce a delay or enhanced verification. These are proposed decisions for a fictional product, not a description of a real case or a guarantee of protection.

Request context and notification of the outcome

Treat factor replacement as a high-risk action and consider its context, such as a new device or an unusual location. Describe the additional verification applied in these circumstances. Context checks supplement the requirement to confirm using an existing factor; they do not make an active session sufficient grounds for replacement.

Whenever an MFA change is completed, send a notification through a separate channel, such as email or a push notification. Distinguish confirmation before the operation from notification afterward: they are separate stages. For particularly high-value accounts, also consider the delays or additional verification recommended by OWASP, and document the chosen process in the requirements.

Recovery must not become a weak bypass

Plan for the loss of a factor in advance. One option described by OWASP is to issue a set of single-use recovery codes during initial MFA setup. If the product adopts this option, include it in the overall recovery flow and explain the purpose of the codes to the user during setup.

The main criterion is that recovery is an alternative authentication method and must not be weaker than regular sign-in. Review it alongside factor replacement, rather than treating it as an independent exception. Otherwise, the requirement for renewed confirmation remains incomplete: the team will have defined a strict main path without specifying the conditions for a user who has lost the previous factor.

Safe verification using your own test data

Test the flow in a team-owned test environment using dedicated accounts. For the fictional Mayak service, prepare an account with a registered factor, an active session, and a separate notification channel controlled by the tester. The goal is to verify product requirements without involving other people's accounts or systems.

  • Confirm that replacement cannot be completed without confirmation using an existing factor.
  • Verify successful replacement after the required confirmation, and receipt of a separate notification.
  • Check the specified response to a new device or an unusual location.
  • Complete recovery using your own test codes; confirm that a single-use code cannot be reused.
  • Check session invalidation and token rotation after reauthentication in line with OWASP recommendations.

Implementation priorities and verification limits

The first priority is to prevent MFA replacement based solely on an active session and require an existing factor. Next, align account recovery and session management after reauthentication. Then verify notifications and context checks; for particularly high-value accounts, consider a delay or additional confirmation.

These recommendations provide a foundation for design, but do not, by themselves, establish that the implementation is correct. Successfully checking individual scenarios also does not guarantee the security of the entire account. If you need an external assessment, you can start with a free website or web-product audit and include MFA replacement and account recovery in its scope.

Sources and documentation

  1. Multifactor Authentication Cheat Sheet
  2. Authentication Cheat Sheet
CheckMyApp

Check your application’s security.

Enter your web application address and email. Get a free preliminary report and choose the depth of analysis.

Check for free