Better-auth
better-auth before 1.6.22 Account Takeover via Magic-Link Email-OTP
better-auth versions >= 1.1.3 and < 1.6.22 (and pre-release versions >= 1.7.0-beta.0 and < 1.7.0-beta.10) are vulnerable to account takeover via pre-account hijacking on magic-link and email-OTP sign-in when open email/password registration is enabled. An attacker registers an account with the victim's email address and an attacker-chosen password; the account remains unverified. When the legitimate owner later signs in via the magic-link or email-OTP passwordless flow, the account is marked verified without removing the pre-existing password or revoking existing sessions, so the attacker's password remains valid, granting persistent access to the victim's account. Fixed in 1.6.22 and 1.7.0-beta.10.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 1.1.3, < 1.6.22
Fixed in 1.6.22
- >= 1.7.0-beta.0, < 1.7.0-beta.10
Fixed in 1.7.0-beta.10
Mitigation
Upgrade better-auth to 1.6.22 or later.
Upgrade better-auth to 1.7.0-beta.10 or later.
References
- Vendor advisory github.com/better-auth/better-auth/security/ad…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.