better-auth
1.7.25 · 14 Nov 2026MIT21M / weekRepositoryHomepagenpmAtom feed
1.7.27 is the newest release of 1.x.
In short
2 new26 fixed
Security
5 advisories affect 1.6.18; 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
- Low@better-auth/drizzle-adapter: Concurrent requests can exceed rate limits on PostgreSQLGHSA-44jh-23m7-hpcf · 27 Oct 2026Fixed in 1.7.7
Release note
The section about better-auth of a note shared by several packages.
better-auth
Bug Fixes
Fixed
getCookieCacheto returnnullfor expired sessions instead of treating stale signed cookies as live sessions.Fixed the delete-account confirmation link to prevent duplicate account deletions from concurrent callback requests.
Fixed one-time tokens from being redeemable multiple times under concurrent requests.
Fixed password reset tokens from changing a password more than once under concurrent requests.
Fixed Reddit sign-in to assign a non-routable placeholder address (
<id>@reddit.invalid) to users with no email, preventing accidental matches with real mailboxes.Fixed Sign-In with Ethereum nonces from being accepted multiple times under concurrent sign-in requests.
Added
internalAdapter.reserveVerificationValueto atomically record single-use markers, ensuring only one concurrent caller succeeds for replay-protected operations.Added the
incrementOneadapter method andSecondaryStorage.incrementfor atomic counter updates, enabling strict rate-limit and usage-counter enforcement under concurrent load.Fixed expired two-factor challenges from completing login and prevented duplicate session creation from concurrent verifications.
Fixed captcha verification to time out after 10 seconds, preventing slow or unreachable captcha providers from hanging requests indefinitely.
Fixed
/delete-user/callbackto reject account deletion when the session has been revoked server-side (cookie-only session deployments are unaffected).Fixed rate limiting to prevent concurrent requests from slipping past configured limits, with a new optional
consumemethod for custom storage backends to opt into strict enforcement.Fixed team deletion to preserve pending invitations by removing only the deleted team's reference rather than invalidating the invitations entirely.
Fixed expected authentication validation failures to log as warnings instead of errors.
Fixed MCP bearer token validation to reject expired access tokens and require the
offline_accessscope for refresh token usage.Fixed plugin API inference in composite monorepo setups where the core package resolved through multiple paths
Fixed OpenAPI generation to accurately serialize Zod request schemas, including optional, nullable, intersected, and record-shaped types
Fixed a memory leak where the JWKS cache could grow on every access token verification.
Fixed Google One Tap to require a configured client ID (set via the
oneTapplugin orsocialProviders.google) and reject tokens issued for other applications.Fixed device-authorization token polling to prevent the same approved device code from being redeemed multiple times under concurrent polls.
Fixed account cookie preservation when switching users in the same browser session.
Fixed email OTP sign-in to prevent concurrent requests from signing in multiple times or exceeding the attempt limit.
Fixed phone-number OTP sign-in to prevent concurrent requests from signing in multiple times or exceeding the attempt limit.
Fixed two-factor OTP sign-in to prevent concurrent requests from signing in multiple times or exceeding the attempt limit.
Fixed the Have I Been Pwned plugin to check breached passwords on additional endpoints, including email-OTP and phone-number reset-password routes and admin password-setting routes.
Fixed the multi-session
set-activeandrevokeendpoints to only act on sessions the caller holds a signed cookie for, preventing unauthorized session manipulation.Fixed the OIDC
/oauth2/endsessionendpoint to reject cross-site logout requests that carry only a session cookie without a validid_token_hint.Fixed WeChat sign-in to work without an email address by assigning a stable placeholder email, with
mapProfileToUseravailable to supply a real one.
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.