better-auth
1.7.25 · 14 Nov 2026MIT21M / weekRepositoryHomepagenpmAtom feed
1.7.27 is the newest release of 1.x.
Summary· from the note as AI read it
Security fixUpgrade: this release fixes a security issue.
Before you upgrade
- Stop sending phoneNumber in sign-up/sign-in requests; verify numbers instead
New minimums
- Add set-phone to custom access control statements for admin update-user
Security
- Upgrade so revoked sessions can no longer be used via cache or secondary storage
- Upgrade to enforce OTP attempt limits and bind email change codes
- Upgrade to prevent email lookups matching other accounts on accent-insensitive collations
- Upgrade so verification links only work for the issuing account
- Upgrade to stop string email_verified values being treated as verified
- Upgrade to fix role check bypass and invitation visibility
- Check wildcard trusted origins still match intended URLs after upgrade
- Upgrade to stop anonymous linking before second factor completes
In short
2 breaking8 security
- Breaking
Fixed phone numbers being stored before they are verified. Sign-up and sign-in reject a
phoneNumberin the request, social profiles no longer set an unverified number, and verification codes use their own namespace - Breaking
Fixed
/admin/update-userchanging phone numbers without permission. It now requiresuser:set-phone, so addset-phoneto custom access control statements - Security
Fixed revoked sessions staying usable with secondary storage or the cookie cache. Bulk revocation now ends sessions missing from the cached list, and passkey registration, device authorization, two-factor, social account linking, and phone number changes check the session store
- Security
Fixed email OTP accepting more guesses than
allowedAttemptsunder concurrent requests, and bound email change codes to the requesting account - Security
Fixed user lookup by email matching a different address on accent-insensitive database collations
- Security
Fixed email verification and change email links working for an account other than the one they were issued to
- Security
Fixed OAuth sign-in treating a string
email_verifiedvalue such as"false"as verified, and bound generic OAuth profiles to the ID token subject - Security
Fixed organization roles with extra whitespace passing role checks, and limited pending invitations to members who can manage them
Release note
The section about better-auth of a note shared by several packages.
better-auth
Bug Fixes
Fixed revoked sessions staying usable with secondary storage or the cookie cache. Bulk revocation now ends sessions missing from the cached list, and passkey registration, device authorization, two-factor, social account linking, and phone number changes check the session store
Fixed phone numbers being stored before they are verified. Sign-up and sign-in reject a
phoneNumberin the request, social profiles no longer set an unverified number, and verification codes use their own namespaceFixed
/admin/update-userchanging phone numbers without permission. It now requiresuser:set-phone, so addset-phoneto custom access control statementsFixed email OTP accepting more guesses than
allowedAttemptsunder concurrent requests, and bound email change codes to the requesting accountFixed user lookup by email matching a different address on accent-insensitive database collations
Fixed email verification and change email links working for an account other than the one they were issued to
Fixed OAuth sign-in treating a string
email_verifiedvalue such as"false"as verified, and bound generic OAuth profiles to the ID token subjectFixed organization roles with extra whitespace passing role checks, and limited pending invitations to members who can manage them
Fixed wildcard trusted origins matching URLs outside the intended scheme, host, or path
Fixed anonymous users being linked on a sign-in still waiting for a second factor
For detailed changes, see CHANGELOG
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.