# Password Reset Vulnerabilities > Password reset flaws let an attacker complete the forgot-password flow for an account they don't control. The usual causes are a reset token delivered to the attacker, a token that can be guessed or leaked, an account identity taken from the request instead of the token, or a reset endpoint with no verification at all. ## How it works Reset is an unauthenticated feature whose whole job is to hand a credential to someone who can't prove who they are. It is really four components chained together, and each join can leak ([[raw/thexssrat.medium.com/the-forgot-password-flow-is-where-i-take-over-accounts-my-password-res-13935|XSSRat]]): 1. **Request endpoint**: takes an identifier and triggers delivery. - It can enumerate accounts or leak PII in its response ([[raw/medium.com/when-account-recovery-becomes-a-source-of-pii-disclosure-15598|PII disclosure]]). - It is an unauthenticated input sink, so SQL injection is possible ([[raw/bishopfox.com/critical-sql-injection-in-metabase-via-password-reset-cve-2026-72898-11276|Metabase]]). 2. **Token generator**: must produce high-entropy, single-use, expiring secrets. Non-cryptographic randomness makes them predictable ([[raw/medium.com/when-math-random-guards-the-door-a-66-000-meta-bug-built-on-a-predicta-15373|Meta Math.random()]]). 3. **Delivery channel**: the reset URL is often built from the request's `Host` or `X-Forwarded-Host`. - An attacker requests a reset for the victim with that header pointing at their own domain. The genuine email then carries a valid token to the attacker's host, and one click by the victim leaks it. This is **reset poisoning** ([[raw/infosecwriteups.com/1-click-ato-via-host-header-injection-exploiting-password-reset-poison-11855|1-click ATO]], [[raw/medium.com/account-takeover-via-password-reset-poisoning-x-forwarded-host-14548|X-Forwarded-Host]]). - Forwarded headers are only trustworthy from a trusted proxy ([[raw/medium.com/account-takeover-via-password-reset-poisoning-x-forwarded-host-14548|X-Forwarded-Host]]). 4. **Consumption endpoint**: must derive the account from the token. - If it trusts a client-supplied `user_id` or email, any token resets any account ([[raw/infosecwriteups.com/i-changed-one-user-id-and-the-api-said-sure-from-password-reset-to-mas-11673|User_Id]]). - Short numeric codes need attempt limits that hold up under concurrency, distributed sources and request batching ([[raw/infosecwriteups.com/he-sent-200-000-reset-codes-to-instagram-in-10-minutes-instagram-paid-11822|Instagram]], [[raw/p4ndora.ai/overgrowth-graphql-aliased-mutation-brute-force-of-a-password-reset-hi-14207|GraphQL aliases]]). Tokens also leak sideways. Query and filter frameworks can expose `reset_password_token` through attribute predicates, which allows character-by-character extraction ([[raw/positive.security/ransacking-your-password-reset-tokens-8566|Ransack]]). GraphQL queries can return reset records directly ([[raw/medium.com/mass-account-takeover-of-29-000-accounts-by-abusing-graphql-13886|GraphQL mass ATO]]). After a reset, existing sessions and refresh tokens must die. Otherwise the reset doesn't evict an attacker who is already in ([[raw/github.com/jwt-auth-wordpress-plugin-does-not-invalidate-refresh-tokens-on-passwo-14613|JWT Auth WP]]). ## What to check - [ ] Request a reset with a modified `Host`, `X-Forwarded-Host` or similar forwarding header, and inspect the link in the email. Is it built from a configured canonical URL? - [ ] Is the token present on the reset page alongside third-party resources (`Referer` leakage)? - [ ] Token properties: length and entropy source, expiry, single use, invalidation when a new token is issued and after the password changes, bound to one account. - [ ] Consumption: is the target account taken only from the token, or also from a body or query parameter (`user_id`, `email`)? Try mixing your token with the victim's identifier. - [ ] Codes (SMS or email OTP): attempts per account and per code, concurrency, alternate endpoints (mobile, legacy, GraphQL, SOAP), batching, IP rotation. - [ ] Do any object, filter or GraphQL endpoints expose reset-token fields or reset records? - [ ] Legacy and mobile APIs: can a reset be done with only an email, or with client-side "trust material"? - [ ] Is the reset endpoint safe as an input sink (unexpected fields, injection)? - [ ] After a reset: are other sessions and refresh tokens revoked, is MFA still required, is the user notified? - [ ] Does the response disclose PII or confirm whether an account exists? ## Notable cases - **Mavenlink ($1,500, Jack Cable)**: reset link built from the `Host` header, sending the token to an attacker domain ([[raw/medium.com/how-trusting-a-request-header-turned-a-password-reset-into-account-tak-15077|writeup]]). - **Instagram ($30,000, 2019)**: two logic gaps in reset-code rate limiting, exploited through concurrency and distributed infrastructure. Any account could be reset in under 10 minutes for about $150 of cloud compute ([[raw/infosecwriteups.com/he-sent-200-000-reset-codes-to-instagram-in-10-minutes-instagram-paid-11822|writeup]]). - **Meta ($66,000)**: a `Math.random()`-derived secret, combined with a `postMessage` handler, defeated the protection ([[raw/medium.com/when-math-random-guards-the-door-a-66-000-meta-bug-built-on-a-predicta-15373|writeup]]). - **Ransack (Rails)**: the default configuration allowed brute-forcing reset tokens through association search predicates. Sequelize and Hasura had similar issues ([[raw/positive.security/ransacking-your-password-reset-tokens-8566|Positive Security]]). - **GraphQL `tokenForgotPasswords`**: production introspection exposed a query returning other users' reset records, giving takeover of 29,000 accounts ([[raw/medium.com/mass-account-takeover-of-29-000-accounts-by-abusing-graphql-13886|writeup]]). - **Legacy mobile SOAP API (CVSS 9.3)**: reset any account's password with just an email, with no token or inbox access ([[raw/medium.com/pre-auth-account-takeover-via-broken-password-reset-in-a-legacy-mobile-14689|writeup]]). - **ZTE SmartLife (CVE-2026-86553, CVSS 8.8)**: trust material recoverable from the app let the backend accept resets without a verification code. 100K+ Android installs ([[raw/minanagehsalalma.github.io/zte-smarthome-account-takeover-password-reset-without-verification-cod-12068|writeup]]). - **Metabase (CVE-2026-72898, CVSS 10.0)**: unauthenticated SQLi via undeclared fields on `POST /api/session/reset_password`, exploited in the wild ([[raw/bishopfox.com/critical-sql-injection-in-metabase-via-password-reset-cve-2026-72898-11276|Bishop Fox]]). A similar SQLi through a `ukey` parameter in a reset email dumped a whole database ([[raw/infosecwriteups.com/sql-injection-in-password-reset-full-database-one-email-8840|writeup]]). - **Consumed reset token replayable (P2)**: a `POST /api/v1/auth/reset-password` token kept working after a successful reset, allowing repeated password changes and persistent reset capability (CWE-640, CWE-613). The report stresses proving the *second* change actually happened, not just a 200 ([[raw/medium.com/p2-password-reset-token-not-invalidated-after-successful-password-chan-15885|writeup]]). - **Reset-response enumeration**: the Intel/CBSE AI platform's forgot-password endpoint answered differently for existing and unknown emails, the first link in an ATO chain ([[raw/infosecwriteups.com/intel-inside-how-a-cracked-jwt-key-led-to-full-account-takeover-15877|writeup]]). - **JWT Auth for WordPress ≤3.0.2 (CVE-2026-106466)**: refresh tokens survived password reset, so an attacker kept access up to Administrator ([[raw/github.com/jwt-auth-wordpress-plugin-does-not-invalidate-refresh-tokens-on-passwo-14613|advisory]]). ## Defenses - Build reset links from server configuration, never from `Host` or `X-Forwarded-*`. Only trust forwarding headers set by your own proxy ([[raw/medium.com/account-takeover-via-password-reset-poisoning-x-forwarded-host-14548|writeup]]). - Generate tokens with a CSPRNG, store them hashed, and make them single-use and short-lived, scoped to one account and invalidated on use or reissue. Mark the token consumed atomically in the same transaction as the password update ([[raw/medium.com/p2-password-reset-token-not-invalidated-after-successful-password-chan-15885|writeup]]). - Resolve the account from the token server-side only, and ignore client-supplied identifiers at consumption. - Rate-limit atomically per account and per token, so the limit survives concurrency, batching and IP rotation. Prefer long links over short codes. - Never expose token fields through generic query, filter or GraphQL interfaces. Allowlist filterable attributes ([[raw/positive.security/ransacking-your-password-reset-tokens-8566|Positive Security]]). - Use the same response whether or not the account exists ([[raw/cheatsheetseries.owasp.org/owasp-authentication-cheat-sheet-3897|OWASP]]). - On reset: revoke all sessions and refresh tokens, keep MFA in place, notify the user, and trigger re-authentication for risk events ([[raw/cheatsheetseries.owasp.org/owasp-authentication-cheat-sheet-3897|OWASP]]). - Retire legacy reset endpoints, or hold them to the same controls. ## Related - [[Authentication Security]] · [[Account Takeover]] · [[MFA Bypass]] · [[Session Management]] - [[Host Header SSRF]] · [[Broken Access Control]] · [[GraphQL Batching Attacks]] · [[SQL Injection]] · [[API Rate Limiting]] · [[JSON Web Tokens]] · [[Mobile Application Security]] · [[Bug Bounty Hunting]] · [[Secrets Management]] ## Sources - [[raw/thexssrat.medium.com/the-forgot-password-flow-is-where-i-take-over-accounts-my-password-res-13935|The Forgot-Password Flow Is Where I Take Over Accounts: My Password-Reset Attack Chain]] - [[raw/infosecwriteups.com/1-click-ato-via-host-header-injection-exploiting-password-reset-poison-11855|1-Click ATO Via Host Header Injection: Exploiting Password Reset Poisoning.]] - [[raw/medium.com/account-takeover-via-password-reset-poisoning-x-forwarded-host-14548|Account Takeover via Password Reset Poisoning (X-Forwarded-Host)]] - [[raw/medium.com/how-trusting-a-request-header-turned-a-password-reset-into-account-tak-15077|How Trusting a Request Header Turned a Password Reset Into Account Takeover]] - [[raw/infosecwriteups.com/i-changed-one-user-id-and-the-api-said-sure-from-password-reset-to-mas-11673|I Changed One “User_Id” and the API Said “Sure” — From Password Reset to Mass Account Takeover]] - [[raw/positive.security/ransacking-your-password-reset-tokens-8566|Ransacking your password reset tokens]] - [[raw/medium.com/when-math-random-guards-the-door-a-66-000-meta-bug-built-on-a-predicta-15373|When Math.random() Guards the Door: A $66,000 Meta Bug Built on a Predictable Secret]] - [[raw/infosecwriteups.com/he-sent-200-000-reset-codes-to-instagram-in-10-minutes-instagram-paid-11822|He Sent 200,000 Reset Codes to Instagram in 10 Minutes. Instagram Paid Him $30,000.]] - [[raw/p4ndora.ai/overgrowth-graphql-aliased-mutation-brute-force-of-a-password-reset-hi-14207|Overgrowth: GraphQL aliased-mutation brute force of a password reset (HI CyberCon 2026)]] - [[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/medium.com/pre-auth-account-takeover-via-broken-password-reset-in-a-legacy-mobile-14689|Pre-Auth Account Takeover via Broken Password Reset in a Legacy Mobile API]] - [[raw/minanagehsalalma.github.io/zte-smarthome-account-takeover-password-reset-without-verification-cod-12068|ZTE SmartHome Account Takeover: Password Reset Without Verification Code (CVE-2026-86553)]] - [[raw/bishopfox.com/critical-sql-injection-in-metabase-via-password-reset-cve-2026-72898-11276|Critical SQL Injection in Metabase via Password Reset: CVE-2026-72898]] - [[raw/infosecwriteups.com/sql-injection-in-password-reset-full-database-one-email-8840|SQL Injection in Password Reset: Full Database, One Email]] - [[raw/github.com/jwt-auth-wordpress-plugin-does-not-invalidate-refresh-tokens-on-passwo-14613|JWT Auth WordPress plugin does not invalidate refresh tokens on password reset (CVE-2026-106466)]] - [[raw/medium.com/when-account-recovery-becomes-a-source-of-pii-disclosure-15598|When Account Recovery Becomes a Source of PII Disclosure]] - [[raw/cheatsheetseries.owasp.org/owasp-authentication-cheat-sheet-3897|OWASP Authentication Cheat Sheet]] - [[raw/medium.com/p2-password-reset-token-not-invalidated-after-successful-password-chan-15885|P2 Password Reset Token Not Invalidated After Successful Password Change]] - [[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]]