better-auth is vulnerable to Improper Authentication
64
CVE Score
Medium
Improper Authentication
The email-change verification link records the old and new email addresses, but not the user who requested the change. When the link is opened without a session, Better Auth looks up whichever account currently owns the old address, creates a session for it, and changes its email. If a different person registers the released old address while the link is still valid, the original requester can use the link to take over that account, receiving a session for it and moving its email to an address they control. The fix binds email verification and change links to the requesting user's ID, rejects them for any other account, no longer signs the user in when a change link is opened, and only marks the new address as verified if the current one was verified.
Upgrade the better-auth library to the patch version. Until you can upgrade, turn off user-initiated email changes.
You are affected if you use a version within the vulnerable range, set user.changeEmail.enabled: true, configure emailVerification.sendVerificationEmail, and allow new users to register an address after its previous owner changes it.
1.4.0 - 1.7.15
Fixed in 1.7.16better-auth is vulnerable to Improper Authentication in versions 1.4.0 - 1.7.15.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.