Skip to content

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.

Back to the lesson 201 to 250 of 270
  1. Use distinct signing secrets per application and consistent user ID mappings, and mark the remember_token cookie HttpOnly.

    Seen in 1 report
  2. Key the rate limiter on the real connection IP, not on a client-supplied X-Forwarded-For header.

    Seen in 1 report
  3. Add an attempt limit or lockout to the one-time code check, and do not expose admin identities in public repositories.

    Seen in 1 report
  4. Add proper authorisation checks and rate limiting on the confirmation code to prevent user enumeration and brute-force.

    Seen in 1 report
  5. Do not trust a client-supplied parameter to decide whether to generate and send a new password; verify that the request came from the account owner.

    Seen in 1 report
  6. Verify that the user completing the setup is the same user who initiated the installation, and do not rely on a sequential installation_id.

    Seen in 1 report
  7. Use a high-entropy reset code that expires, and key the rate limit on more than the client IP.

    Seen in 1 report
  8. Bind the email change confirmation token to the specific email address and user.

    Seen in 1 report
  9. Restrict which parameter names are accepted and do not concatenate user-supplied query parameters into the server's own query.

    Seen in 1 report
  10. Verify the identity token and use the email from Facebook's response instead of a client-supplied email parameter.

    Seen in 1 report
  11. Use distinct JWT signing secrets per environment so tokens are isolated.

    Seen in 1 report
  12. Verify the identity from Google's token instead of trusting a client-controlled email parameter in the OAuth callback.

    Seen in 1 report
  13. Maintain a revocation list or token blacklist so JWTs are not accepted after logout.

    Seen in 1 report
  14. Enforce rate limiting on verification attempts and do not rely on a client-side success flag.

    Seen in 1 report
  15. Check that the caller is the user identified in the URL path before issuing a token.

    Seen in 1 report
  16. Add rate limiting to the backup code verification endpoint.

    Seen in 1 report
  17. Bind the email change token to the specific email address it was issued for.

    Seen in 1 report
  18. Do not trust client-supplied email parameters in OAuth flows; derive the email from the verified token.

    Seen in 1 report
  19. Fix CORS misconfigurations on the CAPTCHA endpoint and use more complex challenges.

    Seen in 1 report
  20. Require a cryptographic signature proving ownership of the wallet address.

    Seen in 1 report
  21. Do not reference unclaimed accounts or domains in documentation.

    Seen in 1 report
  22. Remove expired email domains from contributor accounts.

    Seen in 1 report
  23. Do not execute CI jobs for other merge requests when a source branch is deleted.

    Seen in 1 report
  24. Restrict SMS relay programs to prevent reading other users' OTPs.

    Seen in 1 report
  25. Protect session tokens from theft and allow users to revoke sessions.

    Seen in 1 report
  26. Avoid revealing account existence on the password reset page and prevent lockout abuse.

    Seen in 1 report
  27. Enforce authorization checks on purchase order endpoints.

    Seen in 1 report
  28. Invalidate all recovery codes when two-factor authentication is disabled or re-enabled.

    Seen in 1 report
  29. Enforce the password constraint regardless of the SSO flag and add authorisation checks to user lookup queries.

    Seen in 1 report
  30. Use a long random invitation token and rate limit acceptance attempts.

    Seen in 1 report
  31. Generate the login challenge server-side and bind it to the email address that requested it.

    Seen in 1 report
  32. Generate invitation tokens from a cryptographically secure random source rather than an Object ID.

    Seen in 1 report
  33. Do not set the reply-to header to the inviter's address on invitation emails.

    Seen in 1 report
  34. Validate the callback URL against an allowlist of the application's own domains.

    Seen in 1 report
  35. Do not trust a client-side cookie for admin access, and restrict uploaded file types and execution.

    Seen in 1 report
  36. Issue a new session identifier after authentication and add shared parent domains to the Public Suffix List.

    Seen in 1 report
  37. Require a recent MFA claim for all security info changes and restrict which client identifiers may update sign-in methods.

    Seen in 1 report
  38. Normalise email addresses to a single case before creating accounts and issuing tokens.

    Seen in 1 report
  39. Normalise and strictly validate email addresses at registration.

    Seen in 1 report
  40. Bind the state parameter to the user's session and require explicit confirmation.

    Seen in 1 report
  41. Require the second factor after a password reset before granting access.

    Seen in 1 report
  42. Do not embed encryption keys in the app and do not derive the authentication secret from predictable values.

    Seen in 1 report
  43. Reject combined response types and require a valid state on the callback.

    Seen in 1 report
  44. Require email verification before allowing login and do not trust unverified accounts in the OAuth flow.

    Seen in 1 report
  45. Authenticate devices with secrets that cannot be obtained from the local network, and revoke old keys on re-registration.

    Seen in 1 report
  46. Require a user action that email gateways cannot perform before verifying an address.

    Seen in 1 report
  47. Do not expose the verification token in the page URL.

    Seen in 1 report
  48. Use exact hash comparison, restrict invitations without a room, and validate configured binary paths.

    Seen in 1 report
  49. Normalise and validate internationalised domain characters in email addresses.

    Seen in 1 report
  50. Rate limit on server-side values and normalise email case before counting requests.

    Seen in 1 report