better-auth
1.7.25 · 14 Nov 2026MIT21M / weekRepositoryHomepagenpmAtom feed
1.7.27 is the newest release of 1.x.
In short
1 new22 fixed
Security
5 advisories affect 1.6.12; 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
- 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
Release note
The section about better-auth of a note shared by several packages.
better-auth
Bug Fixes
Fixed field index ordering in
getMigrationmigrations.Fixed synthetic user construction to exclude extra fields.
Fixed session cookie refresh headers not being forwarded when resolving sessions.
Fixed
changeEmailto return an error whenemailVerification.sendVerificationEmailis missing, and URL-encodedcallbackURLin verify-email links.Fixed
callbackURLURL-encoding in verify-email links for OAuth account linking and username sign-in.Fixed
role.authorizeto reject empty action lists and correctly evaluateORconditions on unknown resources.Fixed missing exports of
AdminClientOptionsandOrganizationClientOptions.Fixed email OTP sign-in failing with captcha errors under default captcha settings.
Fixed
parseJSONto properly decode escape sequences in quoted strings.Fixed cookie parsing to tolerate missing spaces after
;separators, preventing users behind certain proxies from being treated as logged-out.Fixed
getTrustedOriginsto respect the dynamicbaseURLprotocol option.Fixed request mutation by cloning the request before passing it to the
sendVerificationEmailcallback.Added
accessTokenExpiresInconfig option togenericOAuthfor providers that omitexpires_inin their token response.Fixed oauth-proxy to forward specific error codes instead of collapsing all errors into
user_creation_failed.Fixed oauth-proxy flows failing with
state_mismatchwhen production and preview environments use different secrets.Fixed OAuth callback errors to forward specific error codes (
state_not_found,state_invalid,state_mismatch) instead of the genericplease_restart_the_processcode.Fixed OAuth state validation failures to redirect to the per-flow
errorCallbackURLinstead of the default error page.Fixed OpenAPI schema generation to emit unique
operationIds for endpoints that expose multiple HTTP methods.Fixed organization invitations silently routing users to the wrong team when team IDs contained a comma.
Fixed
deleteOrganizationandremoveMemberto roll back on failure instead of leaving orphaned rows.Fixed stateless session cache refresh to preserve the real session expiry instead of resetting it.
Fixed a session cookie leak that allowed
session_tokenandsession_datacookies to be captured and replayed to bypass 2FA when cookie caching is enabled.Fixed missing username validation on the admin
createUserendpoint.
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.