You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Harden race condition when submitting 2FA during password reset #66824
There's incredibly niche (and pretty contrived) race condition between submitting 2FA (while using old password) and resetting password at the same time.
Here's a sequence with two browser windows:
W1: Login with current password. 2FA is requested.
W2: Reset password.
W1: Submit 2FA.
Even though 2FA was submitted after password reset, the W1 still completes the login process.
Fix could look like:
Embed the securityStamp in the TwoFactorUserId principal (similar to StoreRememberClient).
Validate the stamp in RetreiveTwoFactorInfoAsync before returning the user.
Wire up the cookie validator in both registration paths.
Correct the xmldoc on SecurityStampValidator.ValidateAysnc<TValidator>.
This appears to be a security hardening issue rather than a critical vulnerability, as the reporter acknowledges it's "incredibly niche (and pretty contrived)"
The author is a contributor and has provided a detailed fix proposal involving embedding securityStamp validation in the 2FA flow
This relates to the area-security label's domain (security hardening), but since it's specifically about Identity's 2FA and password reset flows, area-identity is the most appropriate classification
Activity
github-actions commentedon May 25, 2026
Triage Summary
Area:
area-identity(Issue involvesSignInManager, two-factor authentication flow,SecurityStampValidator,TwoFactorUserIdprincipal, and password reset — all core Identity functionality)Type:
bug(Describes a race condition security flaw where 2FA validation succeeds even after the password has been reset, which is unexpected behavior)Potential Duplicates
SecurityStampValidatorcomponent but different issue)SecurityStampValidatorrefresh logic but different problem)Notes
securityStampvalidation in the 2FA flowarea-securitylabel's domain (security hardening), but since it's specifically about Identity's 2FA and password reset flows,area-identityis the most appropriate classification