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 (XSSRat):
- Request endpoint: takes an identifier and triggers delivery.
- It can enumerate accounts or leak PII in its response (PII disclosure).
- It is an unauthenticated input sink, so SQL injection is possible (Metabase).
- Token generator: must produce high-entropy, single-use, expiring secrets. Non-cryptographic randomness makes them predictable (Meta Math.random()).
- Delivery channel: the reset URL is often built from the request’s
HostorX-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 (1-click ATO, X-Forwarded-Host).
- Forwarded headers are only trustworthy from a trusted proxy (X-Forwarded-Host).
- Consumption endpoint: must derive the account from the token.
- If it trusts a client-supplied
user_idor email, any token resets any account (User_Id). - Short numeric codes need attempt limits that hold up under concurrency, distributed sources and request batching (Instagram, GraphQL aliases).
- If it trusts a client-supplied
Tokens also leak sideways. Query and filter frameworks can expose reset_password_token through attribute predicates, which allows character-by-character extraction (Ransack). GraphQL queries can return reset records directly (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 (JWT Auth WP).
What to check
- Request a reset with a modified
Host,X-Forwarded-Hostor 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 (
Refererleakage)? - 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
Hostheader, sending the token to an attacker domain (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 (writeup).
- Meta ($66,000): a
Math.random()-derived secret, combined with apostMessagehandler, defeated the protection (writeup). - Ransack (Rails): the default configuration allowed brute-forcing reset tokens through association search predicates. Sequelize and Hasura had similar issues (Positive Security).
- GraphQL
tokenForgotPasswords: production introspection exposed a query returning other users’ reset records, giving takeover of 29,000 accounts (writeup). - Legacy mobile SOAP API (CVSS 9.3): reset any account’s password with just an email, with no token or inbox access (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 (writeup).
- Metabase (CVE-2026-72898, CVSS 10.0): unauthenticated SQLi via undeclared fields on
POST /api/session/reset_password, exploited in the wild (Bishop Fox). A similar SQLi through aukeyparameter in a reset email dumped a whole database (writeup). - Consumed reset token replayable (P2): a
POST /api/v1/auth/reset-passwordtoken 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 (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 (writeup).
- JWT Auth for WordPress ≤3.0.2 (CVE-2026-106466): refresh tokens survived password reset, so an attacker kept access up to Administrator (advisory).
Defenses
- Build reset links from server configuration, never from
HostorX-Forwarded-*. Only trust forwarding headers set by your own proxy (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 (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 (Positive Security).
- Use the same response whether or not the account exists (OWASP).
- On reset: revoke all sessions and refresh tokens, keep MFA in place, notify the user, and trigger re-authentication for risk events (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
- The Forgot-Password Flow Is Where I Take Over Accounts: My Password-Reset Attack Chain · original
- 1-Click ATO Via Host Header Injection: Exploiting Password Reset Poisoning. · original
- Account Takeover via Password Reset Poisoning (X-Forwarded-Host) · original
- How Trusting a Request Header Turned a Password Reset Into Account Takeover · original
- I Changed One “User_Id” and the API Said “Sure” — From Password Reset to Mass Account Takeover · original
- Ransacking your password reset tokens · original
- When Math.random() Guards the Door: A $66,000 Meta Bug Built on a Predictable Secret · original
- He Sent 200,000 Reset Codes to Instagram in 10 Minutes. Instagram Paid Him $30,000. · original
- Overgrowth: GraphQL aliased-mutation brute force of a password reset (HI CyberCon 2026) · original
- Mass account takeover of 29,000 accounts by abusing GraphQL · original
- Pre-Auth Account Takeover via Broken Password Reset in a Legacy Mobile API · original
- ZTE SmartHome Account Takeover: Password Reset Without Verification Code (CVE-2026-86553) · original
- Critical SQL Injection in Metabase via Password Reset: CVE-2026-72898 · original
- SQL Injection in Password Reset: Full Database, One Email · original
- JWT Auth WordPress plugin does not invalidate refresh tokens on password reset (CVE-2026-106466) · original
- When Account Recovery Becomes a Source of PII Disclosure · original
- OWASP Authentication Cheat Sheet · original
- P2 Password Reset Token Not Invalidated After Successful Password Change · original
- Intel Inside: How a Cracked JWT Key led to Full Account Takeover · original