Skip to content

Bug class · Intermediate

Account takeover

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.

median public bounty
$1,000

Covers CWE 287, 288, 290, 294, 302, 304, 306, 307, 620, 640.

How it works

Full lesson

The pattern behind every report in this class.

Account takeover is any bug that lets one person end up in control of another person's account. In this batch of 2441 reports it is not one vulnerability class but a family of them, and the common thread is a broken trust decision somewhere in authentication: a reset link built from the wrong host, a one-time code checked in the browser rather than on the server, a session that survives a password change, or an OAuth identity fused to an existing account by email alone. Programs care because the result is the same regardless of the route: the attacker reads and changes the victim's data, and often everything the account can reach.

What it usually leads to is full control of the account and, through it, of anything the account is trusted to do. The evidence shows takeovers chained onward into other bugs, and several reports turn on the attacker simply logging in as the victim after a reset or code check was bypassed. It is most often found in the flows that exist to prove identity: password reset, sign-up and email verification, one-time code checks on login, the second-factor challenge, OAuth and social login linking, and email or phone change. Mobile apps, self-hosted web apps and cloud identity pools also appear repeatedly.

Start with the reset flow, because it was the most common place for takeover bugs here. The server generates a token, emails a link, and later accepts that token to set a new password. Every step is a place to break: how the link is built, whether the token is single use, whether it expires, whether it is bound to the account, and whether it leaks into the response body instead of only the mailbox.

The link-building step fails when the reset URL is assembled from the client-supplied Host or X-Forwarded-Host header rather than a fixed configured domain. If the server does not validate that header against an allowlist, the emailed link can point at a host the attacker chose, and the token travels there. The same class of mistake appears with duplicate headers and forwarding headers when the plain Host header is checked.

Things to try

All 2,202

Each line worked in a disclosed report. Test only what a program's scope allows.

Other 400

  • Change your role attribute in a cloud identity user pool and check whether privilege escalation is possible.
  • Combine a self-XSS in the email field with a static CSRF token and a passwordless login link to change a victim's email.
  • Reset your password to the same value as before and see whether password history is checked.
  • Answer a security question wrongly, then change the request to the password change endpoint with new password fields and see whether it succeeds.

OAuth and social login account linking 169

  • With an OAuth access token, change the account email to an address already belonging to another user and see whether it is accepted unverified.
  • Craft a verification page link that carries an email address in an encoded parameter and a nonce, then check whether clicking the resend button binds that address to the logged-in account without confirming it was already pending.
  • Use an access token to change your account email to a case-variant of a victim's email via the identity provider API, then log in with the victim's email and your password.
  • Change the account email to an address you control without any confirmation step, then log in through Google OAuth with that address.

OTP and 2FA response tampering 140

  • Intercept the verification request and change the grant_type parameter to authenticate with a password instead of the emailed code.
  • Intercept the response to the password confirmation step when changing email or phone and alter it to a success response, then see whether the change is applied.
  • Intercept the verification request, enter a wrong code, and change the boolean status field in the response from false to true.
  • Add a secondary email, intercept the request and change the verified flag from false to true, then remove the primary email.

Password reset token leakage 127

  • Intercept the API call that sends the activation link and check whether the link appears in the response body.
  • Search for leaked confirmation links with a search engine dork on the token parameter, then test whether they still work.
  • Change the email and capture both verification tokens from the HTTP response, then use the token for the new address to confirm the change.
  • Decode the verification token in the URL layer by layer and look for the plaintext verification code inside a signed but unencrypted structure.

2FA bypass and skip 124

  • Register with your own email, trust the device for a month, change the email to a victim's address, then log out and back in and check whether no OTP is asked.
  • Add a new email address to an account with 2FA enabled and check whether re-authentication is required, then use a one-time login link to reset the password.
  • Enable 2FA, start an email change, open the confirmation link and check whether login succeeds without a 2FA code.
  • Open the verification page without a password, enter a code, and try setting up 2FA to see whether you land in the account.

Bypasses and variations

All 270
  • Pre-register with the victim's email so their later OAuth sign-in links to your password.
  • Change the base64-encoded id parameter to reach other users' records.
  • Change the response status to success after submitting a wrong code.
  • Use the X-Forwarded-Host header when the Host header is validated.
  • Supply your own email address while keeping the victim's username to receive the reset link.
  • Use a default OTP value such as 0000 to bypass OTP verification.

Typical fixes

All 270
  • Build reset links from a fixed configured domain rather than the request Host header.
  • Do not compare attacker-controlled values in a 2FA check; verify the code against a server-side secret.
  • Do not log credentials or request bodies in plaintext, and keep log files out of public directories.
  • Rate limit and lock out repeated one-time code guesses and keep codes valid for only a few minutes.
  • Invalidate old passwords, login QR codes, pending sessions and remember-me tokens when the password changes.
  • Revoke or re-authenticate existing sessions when 2FA is enabled.

Tips for beginners

All 14
  • Start with the password reset flow, since it was the most common place for takeover bugs in this batch. Walk the whole flow slowly: request, email, link, form, submission. Note what the link contains, whether the token is single use, whether it expires, and whether the response body carries anything that should only have gone to the mailbox.
  • On the reset request, watch how the emailed link is built. Try changing the Host header, adding a forwarding header, and sending duplicate Host headers, then check where the link points. This is a well-known class, so confirm the link actually uses your value before reporting.
  • Check token lifecycle rather than just token format. Request several tokens and see whether older ones still work, use a link twice, wait for expiry, and change the account email then try an old token. These are cheap tests that map directly to real root causes.
  • For one-time codes, test whether the server or the client decides success. Intercept a wrong-code response and change its status or success flag, then see whether the flow continues. Also check for missing attempt limits on short numeric codes, and whether a fixed default code is accepted.
  • Test session behaviour around password change, 2FA activation and logout. Log in on two browsers, change the password in one, and check the other. Log out, replay the old cookie, and see whether it still works. Note the session identifier before and after login to see whether it is regenerated.
  • Look at OAuth and social login linking. Pre-register an account with a victim's email and a password you choose, then see whether their later social sign-in attaches to your account without confirmation. Also check whether email ownership is verified at signup before any linking happens.

Start here: a reading path

Open the path

Clear reports in order, easiest first.

Guides and techniques

View all

The best explainers, cheat sheets and technique posts on Account takeover, from around the web.

Newest reports

All 2,440

Most recently disclosed.

New Account takeover reports by email

Follow Account takeover and get each week's new disclosures in one short email.

Free. New reports for what you follow, weekly by default. One-click unsubscribe. Privacy