better-auth
1.7.25 · 14 Nov 2026MIT21M / weekRepositoryHomepagenpmAtom feed
Upgrading better-auth From 1.4.5 to 1.7.25
86 releases in betweennotes for 85
Counted from 85 of 86 release notes. Advisories are counted from the advisory database, in full.
Start here
Before you upgrade
Tick each one off as you go- Breaking1.7.0
- Breaking1.7.0
- Breaking1.7.0
- Breaking1.7.0
- Breaking1.7.0
- Breaking1.7.0
- Breaking1.7.0
- Breaking1.7.0
- Breaking1.7.0
- Breaking1.7.0
Security
Fixes 13 advisories affecting 1.4.5
- Better Auth: Stale sessions persist after user deletion across admin, anonymous, and SCIM flowslow · GHSA-2vg6-77g8-24mp
- @better-auth/oauth-provider's OAuth authorization-code grant allows concurrent redemption when two token requests race the find-then-delete primitivehigh · GHSA-7w99-5wm4-3g79
- Better Auth has stored XSS in the auth-server origin via javascript: redirect_uri in oidc-provider and mcphigh · GHSA-86j7-9j95-vpqj
- better-auth: OAuth state can be used as a Magic Link to sign in as another usercritical · GHSA-965c-763c-88jm
- Better Auth has insecure cryptographic defaults in oidcProvider: alg=none advertised and plain PKCE accepted by defaulthigh · GHSA-9h47-pqcx-hjr4
- Better Auth vulnerable to unauthorized invitation acceptance via unverified email match in organization pluginhigh · GHSA-fmh4-wcc4-5jm3
- Better Auth has an account takeover issue via OAuth auto-link to unverified pre-registered emailhigh · GHSA-g38m-r43w-p2q7
- Better Auth: Rate limiter keys IPv6 addresses individually and is bypassable via prefix rotationhigh · GHSA-p6v2-xcpg-h6xw
- Better Auth: OAuth refresh-token replay via missing client authentication on oidc-provider and mcp pluginscritical · GHSA-pw9m-5jxm-xr6h
- better-auth: Device login approval does not show the requesting client or permissionshigh · GHSA-q84f-53jg-9ppm
- Better Auth: Account takeover via pre-account hijacking on magic-link and email-OTP sign-inhigh · GHSA-qq9h-g4jm-xgf3
- Better Auth: OAuth callback accepts mismatched `state` when cookie-backed state storage is used without PKCEmoderate · GHSA-wxw3-q3m9-c3jr
- Better Auth Has Two-Factor Authentication Bypass via Premature Session Caching (session.cookieCache)critical · GHSA-xg6x-h9c9-2m83
- 1.7.15
Fixed organization and API key metadata, and OAuth proxy sign-ins with a
constructorfield inadditionalData, failing with a prototype pollution error - 1.7.7
Fixed a critical Magic Link account-takeover vulnerability.
- 1.6.11
Fixed an invitation takeover vulnerability by enabling
requireEmailVerificationOnInvitationby default and extending the verification gate togetInvitationandlistUserInvitations - 1.6.2
Fixed OAuth state verification against cookie-stored nonce to prevent CSRF
- 1.5.0
customSyntheticUseroption: Support plugin fields in enumeration-protected responses (#8097). - 1.5.0
Prevent OTP reuse via race condition: Atomically invalidate OTPs on use.
- 1.5.0
Prevent user enumeration: In email-otp when sign-up is disabled, and on sign-up with required email verification.
- 1.5.0
Stricter default rate limits: For password reset and phone number verification endpoints.
- 1.5.0
Separate CSRF and origin checks: More granular request validation.
- 1.5.0
Prevent trial abuse: Check all user subscriptions before granting a free trial.
Release by release
- Fixed
Fixed endpoint errors dropping
Access-Control-Expose-Headersnames set earlier by a hook or the endpoint, so cross-origin browser clients keep access to exposed headers
- Fixed
- Fixed
Improved verification lookups to delete expired rows at most once a minute per server instance instead of on every lookup
- Fixed
- Fixed
Fixed
getTestInstancesharing one MongoDB database across test files, so parallel tests no longer delete each other's data
- Fixed
- Fixed
Fixed verification value consumption hanging on Cloudflare Workers when an earlier request for the same identifier ended mid-query
- Fixed
Fixed module-scope auth instances on Cloudflare Workers logging a schema validation error on every cold start by validating on first use
- Fixed
Fixed
deferSessionRefreshrefresh requests failing with a 415 error in Next.js and Nuxt - Fixed
Fixed
ReferenceError: window is not definedwhen a client session subscription is cleaned up after a test environment tears down its globals
- Fixed
- Fixed
Fixed plugin packages importing from the
better-authroot, so bundlers no longer emit unused Kysely chunks when used withbetter-auth/minimal - Fixed
core: Use ObjectId-shaped derived ids for Prisma ObjectId columns
- Fixed
Fixed the device approval page showing a valid code as invalid when the same signed-in user looked it up twice at once, such as under React Strict Mode
- Fixed
Fixed sign-ins with a
genericOAuthprovider usingdiscoveryUrland OAuth provider requests usingresourceshanging on Cloudflare Workers
- Fixed
1.7.20nothing new or fixed in the note
- Fixed
Fixed
/admin/create-userleaving a user without a credential account when creating that account failed, such as a database hook throwing, which made retrying with the same email fail withUSER_ALREADY_EXISTS_USE_ANOTHER_EMAIL - Fixed
Fixed
/admin/create-userleaving a user without a credential account when the password was rejected, such as by the Have I Been Pwned plugin, which made retrying with the same email fail withUSER_ALREADY_EXISTS_USE_ANOTHER_EMAIL - Fixed
Fixed client actions ignoring the HTTP method passed in second-argument fetch options, and attaching a request body when the method was a lowercase
getorHEAD - Fixed
Fixed plugin schema overrides (
modelNameand field names) leaking into other instances of the same plugin in one process
- Fixed
- Fixed
Fixed "revoke all sessions" with
secondaryStorageandstoreSessionInDatabaseto also revoke sessions created while the revocation is running, except sessions created by asession.delete.afterhook, which stay active - Fixed
Fixed
getTestInstancefrombetter-auth/testto close its own Postgres connection pool and SQLite database when the test file finishes, while with Vitest's defaultsequence.hooks: "stack"yourafterAllhooks still run first and can keep using the instance - Fixed
Fixed
getTestInstancewithtestWith: "mysql"hanging, and added a separate database per instance so several instances can run in one test file
- Fixed
13 internal lines (docs, tests, tooling) left out.
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.