better-auth
1.7.25 · 14 Nov 2026MIT21M / weekRepositoryHomepagenpmAtom feed
1.7.27 is the newest release of 1.x.
In short
1 breaking8 new22 fixed2 internal
- Breaking
admin: Prevent impersonating admins by default
Security
13 advisories affect 1.4.6; 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
- CriticalBetter Auth: OAuth refresh-token replay via missing client authentication on oidc-provider and mcp pluginsGHSA-pw9m-5jxm-xr6h · 7 Jul 2026Fixed in 1.6.11
- CriticalBetter Auth Has Two-Factor Authentication Bypass via Premature Session Caching (session.cookieCache)GHSA-xg6x-h9c9-2m83 · 3 Apr 2026Fixed in 1.4.9
- 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
8 more
- High@better-auth/oauth-provider's OAuth authorization-code grant allows concurrent redemption when two token requests race the find-then-delete primitiveGHSA-7w99-5wm4-3g79 · 7 Jul 2026Fixed in 1.6.11
- HighBetter Auth has insecure cryptographic defaults in oidcProvider: alg=none advertised and plain PKCE accepted by defaultGHSA-9h47-pqcx-hjr4 · 7 Jul 2026Fixed in 1.6.11
- HighBetter Auth has stored XSS in the auth-server origin via javascript: redirect_uri in oidc-provider and mcpGHSA-86j7-9j95-vpqj · 7 Jul 2026Fixed in 1.6.13
- HighBetter Auth has an account takeover issue via OAuth auto-link to unverified pre-registered emailGHSA-g38m-r43w-p2q7 · 7 Jul 2026Fixed in 1.6.11
- HighBetter Auth vulnerable to unauthorized invitation acceptance via unverified email match in organization pluginGHSA-fmh4-wcc4-5jm3 · 7 Jul 2026Fixed in 1.6.11
- HighBetter Auth: Rate limiter keys IPv6 addresses individually and is bypassable via prefix rotationGHSA-p6v2-xcpg-h6xw · 15 May 2026Fixed in 1.4.17
- ModerateBetter Auth: OAuth callback accepts mismatched `state` when cookie-backed state storage is used without PKCEGHSA-wxw3-q3m9-c3jr · 15 May 2026Fixed in 1.6.2
- LowBetter Auth: Stale sessions persist after user deletion across admin, anonymous, and SCIM flowsGHSA-2vg6-77g8-24mp · 7 Jul 2026Fixed in 1.6.11
Release note
Features
Add
ctx.isTrustedDomainhelperDrizzle pg supports JSON
Add Refresh Token Support to Kick OAuth Provider
- Breaking
admin: Prevent impersonating admins by default
expo: Last-login-method client plugin
multi-session: Allow to infer additional fields
organization: Allow invited users to see organization name
sso: Use domain verified flag to trust providers automatically
Bug Fixes
Avoid throwing on client side
Export organization plugin types
Prematurely deleting active sessions in secondary storage
Pathname should be normalized when basePath is set to root
Make sure non-chunked session data cookie is cleared
Array field handling across adapters and schema generation
StoreStateStrategy default to database if provided
Should always remove 2FA verification token after successful verification
adapter: Add logger creation in adapter factory
adapter: Allow run internal adapter outside context
admin: Clear admin session cookie on
stopImpersonatingcli:
secretgenerates emptycli: Deduplicate drizzle schema relationships
core: Allow returning null in getUserInfo in provider options
db: Correctly unwrap validator result in schema parsing
kysely: Wrong affected row count in updateMany & deleteMany
magic-link: Handle query params in errorCallbackUrl
oidc: Compatibility with exact-optional-property
openapi: Mark /get-session response as nullable
prisma: Use findFirst instead of findMany for findOne
saml: Enforce trusted provider check
sso: Safely parse provider configs on registration
username: Await username validator
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.