In-depth lesson · Account takeover
Typical fixes
Every point the Account takeover reports back under this heading, best-backed first, each with the reports it is seen in.
-
Enforce authentication and authorization checks on all API endpoints.
-
Invalidate all existing sessions when a password is changed.
-
Never include the reset token or session identifier in the HTTP response; send it only to the account owner's mailbox.
Seen in 2 reports
-
Bind the OTP to the email address that requested it and reject changes to the address between steps.
-
Accept a single email address on the reset endpoint and reject arrays.
-
Generate tokens from a cryptographically secure random source and invalidate old tokens on use.
-
Verify the integrity of code loaded by the synchronisation process and restrict local administrator access to the server.
Seen in 2 reports
-
Use the immutable subject claim as the unique identifier, not the mutable email claim.
-
Decide OTP success on the server and enforce authorisation on the password change endpoint.
-
Bind the authorisation code to the user and session that initiated the login.
-
Verify the current password on the server before any email or phone change, independent of client responses.
-
Require the current account password before disabling two-factor authentication.
Seen in 1 report
-
Generate reset tokens with a cryptographically secure random value.
Seen in 1 report
-
Expire email change confirmation links and invalidate them after a password reset.
Seen in 1 report
-
Require re-authentication before adding a new email address to an account.
Seen in 1 report
-
Verify on the server that a social login token was issued for your app.
Seen in 1 report
-
Validate on the server that a submitted email is unique and belongs to the user.
Seen in 1 report
-
Require a valid reset token even when the user is already authenticated.
Seen in 1 report
-
Never include the one-time password in the network response.
-
Do not allow 2FA setup before the email address is verified.
Seen in 1 report
-
Require proof of account ownership before a password reset endpoint changes a password.
Seen in 1 report
-
Critical
-
-
Do not treat client-side encryption as protection; verify the username matches the email and reset code on the server.
Seen in 1 report
-
Verify that the email submitted in the consent form matches one of the user's registered addresses.
Seen in 1 report
-
Invalidate the session server-side on logout, not just the browser cookie.
Seen in 1 report
-
Check that the verified signature covers the exact Response element the assertions are read from.
Seen in 1 report
-
Track used SAML assertion ids and reject replays.
Seen in 1 report
-
Add account-level throttling or CAPTCHA in addition to per-IP rate limiting.
-
Revoke or re-validate linked OAuth identities when the account email changes.
Seen in 1 report
-
Verify the magic link domain as an Android App Link so other apps cannot intercept it.
Seen in 1 report
-
Verify that a client-supplied user id matches the authenticated session before linking 2FA.
-
Enforce the pending 2FA setup requirement on the OAuth2 authorisation endpoint.
Seen in 1 report
-
Require re-authentication before an irreversible account deletion.
Seen in 1 report
-
Invalidate a reset token after it has been used.
Seen in 1 report
-
Send an email notification and write an audit log entry when 2FA is disabled.
Seen in 1 report
-
Only issue SSO tokens for email addresses the account has actually verified.
Seen in 1 report
-
Apply the authentication check to every path, not just some.
Seen in 1 report
-
Revoke the persistent remember-me token when a session is revoked.
Seen in 1 report
-
Tie the verification token to the account that requested it.
Seen in 1 report
-
Verify the token's own signature and validity when reissuing it, not just the refresh token.
Seen in 1 report
-
Do not apply submitted profile details to an existing account unless the submitter proves ownership of the email.
Seen in 1 report
-
Require authentication on the inventory endpoint.
Seen in 1 report
-
Do not leave long-lived reset cookies and handle link reuse with a clear error.
Seen in 1 report
-
Never return the reset token in the response; send it only by email.
Seen in 1 report
-
Accept a single email address and generate a separate token per recipient.
Seen in 1 report
-
Apply the same attempt limit to the final reset step as to earlier steps.
Seen in 1 report
-
High
-
-
Rate-limit and lock out repeated 2FA code attempts.
Seen in 1 report
-
Do not rely on client-side encryption of low-entropy tokens; rate-limit the authentication endpoint.
Seen in 1 report
-
Bind the resend request to the account being logged into and ignore a changed phone parameter.
-
Enforce attempt throttling on the OTP verification endpoint.
Seen in 1 report
-
Rate-limit OTP sends per phone number and session.
Seen in 1 report