better-auth
1.7.25 · 14 Nov 2026MIT21M / weekRepositoryHomepagenpmAtom feed
1.7.27 is the newest release of 1.x.
In short
14 fixed
Security
4 advisories affect 1.6.16; 1.7.7 fixes them
- Criticalbetter-auth: OAuth state can be used as a Magic Link to sign in as another userGHSA-965c-763c-88jm · 27 Oct 2026Fixed in 1.7.7
- Highbetter-auth: OAuth Proxy lets an attacker sign in as another userGHSA-r4xp-prcw-77qf · 27 Oct 2026Fixed in 1.7.7
- Highbetter-auth: Device login approval does not show the requesting client or permissionsGHSA-q84f-53jg-9ppm · 27 Oct 2026Fixed in 1.7.0
- HighBetter Auth: Account takeover via pre-account hijacking on magic-link and email-OTP sign-inGHSA-qq9h-g4jm-xgf3 · 24 Jul 2026Fixed in 1.6.22
Release note
The section about better-auth of a note shared by several packages.
better-auth
Bug Fixes
Fixed SIWE verification to bind the signed message to server state before creating a session, preventing acceptance of signatures produced for a different message, earlier nonce, or unrelated domain.
Fixed PayPal ID token verification to validate the signature, issuer, audience, expiration, and nonce against PayPal's JWKS (RS256) or client secret (HS256), rejecting tokens that pass only structural checks.
Fixed Google
hd(hosted domain) enforcement to verify thehdclaim on the verified ID token and callback profile, preventing accounts outside the configured Workspace domain from signing in.Fixed
verifyAccessTokenremote introspection to reject tokens with a missing or mismatchingaudclaim; setremoteVerify.allowMissingAudience: trueto permit tokens where the introspection response legitimately omitsaud.Fixed the admin plugin to enforce permissions on role, ban, and email fields in
/admin/create-userand/admin/update-user, and preventdatafrom overriding protected fields.Fixed email sign-in and sign-up to validate
OriginandRefererheaders againsttrustedOriginseven when requests carry no cookies.Fixed
/update-sessionto reject plugin-managed fields (activeOrganizationId,activeTeamId,impersonatedBy) with a 400 error; use their dedicated endpoints to change these values.Fixed
/update-sessionand account token routes to immediately reject deleted sessions when cookie cache is enabled alongside database or secondary storage.Fixed
/refresh-tokento only trust the account cookie when itsuserId,providerId, andaccountIdmatch the resolved session user.Fixed generic OAuth sign-in to reject sign-ins when no account ID can be resolved from the provider response, preventing account collisions on providers that omit
sub.Fixed
createInvitationandacceptInvitationto validate that all requested team IDs belong to the invitation's organization, preventing cross-organization team membership.Fixed the JWKS cache to be scoped per verification source with a TTL, preventing key cross-contamination when verifying tokens against multiple issuers simultaneously.
Fixed the Reddit provider to stop storing
oauth_client_idas the user email, preventing all users of the same app from sharing a single email address; a synthetic per-user address is now used when no real email is provided viamapProfileToUser.Fixed Facebook token verification to validate tokens against the configured app via the
debug_tokenendpoint, requiringis_valid, a matchingapp_id, and a client secret for direct sign-in.
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.