# Account Takeover
> Account takeover (ATO) is gaining persistent control of another user's account. It isn't one bug. It is where authentication, recovery, session, authorization and client-side flaws end up, usually by changing the account's email or credentials, or by obtaining a live session.
## How it works
Every ATO reduces to one of three primitives:
1. **Authenticate as the victim**: forge or replay the proof (SSO assertion, OTP, passkey assertion, password), or exploit a login-logic bug.
2. **Obtain the victim's session or token**: steal it (XSS, `postMessage`, cache, redirect, leaked by an API), plant it (fixation), or have the server sign one.
3. **Re-point the account's recovery anchor**: change email or phone, link an identity, or reset the password, then log in normally.
"Full" ATO usually means primitive 3, because it survives session expiry and locks the victim out. Strong reports chain a low-severity primitive (an ID leak, an open redirect, an HTML injection) into one of these ([[raw/medium.com/eight-doors-one-key-chaining-misconfigurations-into-full-account-takeo-12490|Eight Doors]]).
Paths, with the page that covers each mechanism:
| Path | Mechanism | See |
|---|---|---|
| Recovery | Reset poisoning, token leakage or guessing, identity taken from the request | [[Password Reset Vulnerabilities]] |
| Federation | Code or token theft, missing `state`, email-claim trust, XSW | [[OAuth 2.0 Vulnerabilities]], [[OpenID Connect Security]], [[SAML Attacks]] |
| Factors | Flow skip, OTP brute force, downgrade | [[MFA Bypass]], [[Passkeys and WebAuthn]] |
| Session | Fixation, hijacking, forgeable stateless cookies | [[Session Management]] |
| Authorization on account fields | Email or phone change without ownership checks or CSRF protection | [[Broken Access Control]], [[Cross-Site Request Forgery]] |
| Identity normalization | Auth layer and database disagree on Unicode or case, so two "different" identifiers map to one account ([[raw/medium.com/how-an-unhandled-unicode-normalization-mismatch-led-to-a-5-000-account-14945|Unicode ATO]]) | |
| Signing oracles | The app signs attacker-controlled data with the same key it trusts for auth tokens ([[raw/strix.ai/account-takeover-in-better-auth-expo-via-a-signing-oracle-14435|Better Auth]]) | [[JSON Web Tokens]] |
| Client side | XSS, `postMessage` without origin checks, WebView header injection, cache deception/poisoning of authenticated or OAuth-redirect responses | [[Cross-Site Scripting]] |
| Phishing and tokens | AiTM, device-code and consent phishing, infostealers | [[Adversary-in-the-Middle Phishing]], [[Device Code Phishing]], [[OAuth Consent Phishing]] |
| Credential attacks | Credential stuffing and password spraying ([[raw/cheatsheetseries.owasp.org/owasp-credential-stuffing-prevention-cheat-sheet-4079|OWASP]]) | |
## What to check
- [ ] Map every account-anchor mutation (email, phone, password, MFA, linked identities, recovery codes). Each needs authorization on the object, re-authentication, CSRF protection, and verification of the *new* anchor plus notification to the *old* one.
- [ ] Every session-issuing path (login, SSO, magic link, reset, mobile and legacy APIs, device flows): does each enforce the same factors?
- [ ] Identifier handling: case, Unicode normalization (NFKC), whitespace and email-parser differences between signup, login, reset and the database.
- [ ] Is any user-controlled value signed or encrypted with a key that also protects auth tokens or state?
- [ ] Do APIs return tokens, reset records or session material for a supplied user ID or UUID? Do error messages leak those IDs?
- [ ] Social-login accounts: can a session set a first password (or other anchor) without re-authentication? That turns any same-origin script execution into persistent ATO ([[raw/xenops.ae/the-last-writer-wins-chess-com-account-takeover-via-postmessage-xss-15815|Chess.com]]).
- [ ] Client side: `postMessage` listeners and senders (origin checks, token-bearing messages), WebView allowlists (claimable domains), deep links, open redirects on OAuth-allowed origins.
- [ ] Caching: are authenticated responses or OAuth redirect responses (302 with a code) cacheable by CDN path or extension rules?
- [ ] Rate limiting and credential-stuffing controls on login and recovery.
- [ ] Multi-step login flows: race conditions between steps that bind identity.
## Notable cases
- **Uber ($6,500, 2019)**: a UUID leaked in an error message, then an API returned that user's mobile token, giving rider, driver and Eats ATO ([[raw/masimshahzad.medium.com/uber-account-takeover-the-api-that-handed-out-tokens-15531|case study]]).
- **Tinder (2018)**: a skipped OTP binding plus an unchecked token audience meant a phone number was enough to take an account ([[raw/masimshahzad.medium.com/the-phone-number-that-unlocked-any-tinder-account-14398|case study]]).
- **TikTok (DEF CON 34)**: cache misconfiguration on OAuth completion flows (cached 302s, path traversal) gave zero- and one-click ATO ([[raw/cpebuddy.com/def-con-34-how-cache-poisoning-led-to-critical-account-takeover-in-tik-13785|talk]]). Also see cache-key-mismatch web cache deception ([[raw/medium.com/how-a-cache-keys-mismatch-led-to-a-web-cache-deception-account-takeove-14688|writeup]]).
- **@better-auth/expo (GHSA-4wq4-2ppv-q3hg)**: `/expo-authorization-proxy` signed arbitrary state, which was used to forge an email change and get a session. Zero-click ([[raw/strix.ai/account-takeover-in-better-auth-expo-via-a-signing-oracle-14435|Strix]]).
- **phpBB <3.3.17 (CVE-2026-48611)**: `login_link` with `auth_provider=apache` skipped password checks, so one request logged in as any user ([[raw/aikido.dev/authentication-bypass-in-the-default-configuration-phpbb-10083|Aikido]]).
- **Unicode normalization ($5,000)**: auth layer and database normalized differently, allowing impersonation ([[raw/medium.com/how-an-unhandled-unicode-normalization-mismatch-led-to-a-5-000-account-14945|writeup]]).
- **GraphQL mass ATO (29,000 accounts)**: introspection exposed `tokenForgotPasswords` ([[raw/medium.com/mass-account-takeover-of-29-000-accounts-by-abusing-graphql-13886|writeup]]).
- **Grafana (CVE-2025-6023/6197)**: open redirect plus client-side path traversal gave XSS and then ATO. An incomplete earlier patch left it open ([[raw/opswat.com/grafana-cve-2025-6023-full-account-takeover-4097|OPSWAT]]).
- **Email change**: CSRF on the email-change endpoint ($1,300) ([[raw/medium.com/account-takeover-via-csrf-on-the-email-change-endpoint-1-300-12649|writeup]]). A broken access control let one user modify another account's email (P2) ([[raw/medium.com/p2-broken-access-control-allowing-unauthorized-account-email-modificat-15076|writeup]]).
- **One-click client-side**: a third-party SDK `postMessage` bug ([[raw/medium.com/postmessage-leads-to-one-click-account-takeover-15482|writeup]]). WebView auth-header injection to a claimable allowlisted domain ([[raw/abdelnasserr.medium.com/one-click-account-takeover-via-webview-auth-header-injection-to-claima-13066|writeup]]). An open redirect chained to ATO at Zee (P1, CVSS 9.0) ([[raw/medium.com/chaining-an-open-redirect-into-account-takeover-p1-cvss-9-0-13937|writeup]]). A stale CNAME plus a wildcard OAuth redirect ($6,000) ([[raw/medium.com/how-i-chained-a-stale-cname-record-with-oauth-2-0-wildcards-for-a-6-00-14401|writeup]]).
- **Chess.com (postMessage DOM XSS)**: a `SHOW_MESSAGE_MODAL` listener without an `event.origin` check `Object.assign`ed an attacker `user` object into state, and the username reached `innerHTML`. DOMPurify ran, but `xssFilter` restored extracted chess-diagram comments *after* sanitizing ("the last writer wins"). Accounts created via Google or Apple can set a password without the old one, so script in the origin became full ATO. Fixed with an origin check; triaged as a duplicate by root cause ([[raw/xenops.ae/the-last-writer-wins-chess-com-account-takeover-via-postmessage-xss-15815|XENOPS]]).
- **Intel/CBSE AI Student Community**: login timing (~30–50 ms vs ~120–140 ms) and reset-response differences enumerated emails; the HS256 session secret cracked offline to `intel`; the numeric user ID lived in `/dashboard/{ID}`, not the token, so forged tokens plus sequential IDs and no rate limiting gave ATO ([[raw/infosecwriteups.com/intel-inside-how-a-cracked-jwt-key-led-to-full-account-takeover-15877|writeup]]). See [[JWT Secret Cracking]].
- **SSO pre-account hijacking**: Vikunja <2.8.0 (CVE-2026-134284) linked a victim's first OIDC login into an attacker-planted local account with the victim's unverified email ([[raw/github.com/vikunja-account-takeover-vulnerability-15982|advisory]]). Better Auth <1.7.16 (CVE-2026-134312) trusted unverified provider emails (including `email_verified: "false"`) when linking ([[raw/github.com/better-auth-oauth-signature-issue-high-15981|advisory]]). See [[OpenID Connect Security]].
- **Race in OTP login**: racing the identity bound to a flow ID ([[raw/medium.com/race-condition-authentication-bypass-full-account-takeover-4362|writeup]]).
- **Forum to OpenAI internal code**: a forum's login token worked as a login token for an internal system ([[raw/medium.com/how-a-login-token-for-a-forum-became-a-login-token-for-openai-s-intern-14396|writeup]]).
## Defenses
- Treat account-anchor changes as authentication events. Require re-authentication, verify the new address or phone, notify the old one, and allow reversal ([[raw/cheatsheetseries.owasp.org/owasp-authentication-cheat-sheet-3897|OWASP]]).
- Use one canonical identity per account: an immutable internal ID, normalized identifiers applied consistently at every layer, and federation keyed on `iss`+`sub`.
- Enforce object-level authorization and CSRF protection on every account-mutating endpoint.
- Never return tokens or reset material from lookup APIs, and keep error messages free of internal IDs.
- Separate signing keys by purpose (sessions, state, email links). Never sign attacker-supplied content with an auth key.
- Validate `postMessage` origins, keep WebView allowlists tight and domain-owned, and mark authenticated and OAuth responses `no-store`.
- Use MFA, throttling and breached-credential checks against stuffing and spraying ([[raw/cheatsheetseries.owasp.org/owasp-credential-stuffing-prevention-cheat-sheet-4079|OWASP]]).
- Revoke sessions on credential and anchor changes, and monitor for new-device and new-anchor anomalies.
## Related
- [[Authentication Security]] · [[Password Reset Vulnerabilities]] · [[MFA Bypass]] · [[Session Management]] · [[OAuth 2.0 Vulnerabilities]] · [[OpenID Connect Security]] · [[SAML Attacks]] · [[Passkeys and WebAuthn]]
- [[Vulnerability Chaining]] · [[Broken Access Control]] · [[Cross-Site Request Forgery]] · [[Cross-Site Scripting]] · [[GraphQL Security]] · [[API Security]] · [[Mobile Application Security]] · [[Bug Bounty Hunting]] · [[AI and LLM Security]] · [[Security Talks]] · [[JSON Web Tokens]] · [[Authorization Security]]
See also: [[Open Redirect]]
## Sources
- [[raw/masimshahzad.medium.com/uber-account-takeover-the-api-that-handed-out-tokens-15531|Uber Account Takeover: The API That Handed Out Tokens]]
- [[raw/masimshahzad.medium.com/the-phone-number-that-unlocked-any-tinder-account-14398|The Phone Number That Unlocked Any Tinder Account]]
- [[raw/medium.com/mass-account-takeover-of-29-000-accounts-by-abusing-graphql-13886|Mass account takeover of 29,000 accounts by abusing GraphQL]]
- [[raw/cpebuddy.com/def-con-34-how-cache-poisoning-led-to-critical-account-takeover-in-tik-13785|DEF CON 34: How cache poisoning led to critical account takeover in TikTok's web]]
- [[raw/medium.com/how-a-login-token-for-a-forum-became-a-login-token-for-openai-s-intern-14396|How a Login Token for a Forum Became a Login Token for OpenAI’s Internal Code]]
- [[raw/opswat.com/grafana-cve-2025-6023-full-account-takeover-4097|Grafana CVE-2025-6023: Full Account Takeover]]
- [[raw/medium.com/account-takeover-via-csrf-on-the-email-change-endpoint-1-300-12649|Account Takeover via CSRF on the Email-Change Endpoint ($1,300)]]
- [[raw/medium.com/p2-broken-access-control-allowing-unauthorized-account-email-modificat-15076|P2 Broken Access Control Allowing Unauthorized Account Email Modification and Account Takeover]]
- [[raw/medium.com/postmessage-leads-to-one-click-account-takeover-15482|PostMessage Leads to One-Click Account Takeover]]
- [[raw/abdelnasserr.medium.com/one-click-account-takeover-via-webview-auth-header-injection-to-claima-13066|One-Click Account Takeover via WebView Auth Header Injection to Claimable Whitelisted Domain]]
- [[raw/medium.com/chaining-an-open-redirect-into-account-takeover-p1-cvss-9-0-13937|Chaining an Open Redirect Into Account Takeover (P1 · CVSS 9.0)]]
- [[raw/medium.com/race-condition-authentication-bypass-full-account-takeover-4362|Race Condition Authentication Bypass: Full Account Takeover]]
- [[raw/strix.ai/account-takeover-in-better-auth-expo-via-a-signing-oracle-14435|Account takeover in @better-auth/expo via a signing oracle]]
- [[raw/aikido.dev/authentication-bypass-in-the-default-configuration-phpbb-10083|Authentication Bypass in the default configuration phpBB]]
- [[raw/medium.com/how-an-unhandled-unicode-normalization-mismatch-led-to-a-5-000-account-14945|How an Unhandled Unicode Normalization Mismatch Led to a $5,000 Account Takeover]]
- [[raw/medium.com/how-a-cache-keys-mismatch-led-to-a-web-cache-deception-account-takeove-14688|How a Cache Keys Mismatch Led to a Web Cache Deception Account Takeover]]
- [[raw/medium.com/eight-doors-one-key-chaining-misconfigurations-into-full-account-takeo-12490|Eight Doors, One Key: Chaining Misconfigurations into Full Account Takeover]]
- [[raw/medium.com/how-i-chained-a-stale-cname-record-with-oauth-2-0-wildcards-for-a-6-00-14401|How I Chained a Stale CNAME Record with OAuth 2.0 Wildcards for a $6,000 Account Takeover (ATO)]]
- [[raw/cheatsheetseries.owasp.org/owasp-credential-stuffing-prevention-cheat-sheet-4079|OWASP Credential Stuffing Prevention Cheat Sheet]]
- [[raw/cheatsheetseries.owasp.org/owasp-authentication-cheat-sheet-3897|OWASP Authentication Cheat Sheet]]
- [[raw/xenops.ae/the-last-writer-wins-chess-com-account-takeover-via-postmessage-xss-15815|The Last Writer Wins: Chess.com account takeover via postMessage XSS]]
- [[raw/infosecwriteups.com/intel-inside-how-a-cracked-jwt-key-led-to-full-account-takeover-15877|Intel Inside: How a Cracked JWT Key led to Full Account Takeover]]
- [[raw/github.com/vikunja-account-takeover-vulnerability-15982|Vikunja account takeover vulnerability]]
- [[raw/github.com/better-auth-oauth-signature-issue-high-15981|Better Auth OAuth signature issue (high)]]