better-auth
1.7.25 · 14 Nov 2026MIT21M / weekRepositoryHomepagenpmAtom feed
Upgrading better-auth From 1.1.16 to 1.7.27
147 releases in betweennotes for 137
Counted from 137 of 147 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 17 advisories affecting 1.1.16
- Better Auth: Stale sessions persist after user deletion across admin, anonymous, and SCIM flowslow · GHSA-2vg6-77g8-24mp
- Better Auth Open Redirect Vulnerability in originCheck Middleware Affects Multiple Routeslow · GHSA-36rg-gfq2-3h56
- Better Auth affected by external request basePath modification DoShigh · GHSA-569q-mpph-wgww
- @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: Unauthenticated API key creation through api-key pluginhigh · GHSA-99h5-pjcv-gr6v
- 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
- Beter Auth has an Open Redirect via Scheme-Less Callback Parametermoderate · GHSA-hjpm-7mrm-26w8
- 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: Account takeover via pre-account hijacking on magic-link and email-OTP sign-inhigh · GHSA-qq9h-g4jm-xgf3
- Better Auth allows bypassing the trustedOrigins Protection which leads to ATOhigh · GHSA-vp58-j275-797x
- Better Auth: OAuth callback accepts mismatched `state` when cookie-backed state storage is used without PKCEmoderate · GHSA-wxw3-q3m9-c3jr
- Better Auth's rou3 Dependency has Double-Slash Path Normalization which can Bypass disabledPaths Config and Rate Limitshigh · GHSA-x732-6j76-qmhm
- 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 the phone number plugin returning a 500 instead of a 400 from
/update-userwhen the request has no body - Fixed
Fixed the username plugin returning a 500 on
/sign-up/emailand/update-userwhen the request has no body; it now returns the same 400 as without the plugin - Fixed
Fixed
/sign-in/anonymousto validate the request origin, returning a 403 for browser requests from origins outsidetrustedOrigins - Fixed
Fixed unpinned tokens such as ID tokens and session JWTs to prefer a key for the primary
jwks.keyPairConfig.algalgorithm - Fixed
Fixed
getTestInstancefrombetter-auth/testto run every instance cleanup even when one fails, so databases and connections are not left open - Fixed
Fixed
POSTrequests without a body, such as/sign-outor/revoke-sessions, failing with a 415 on Deno, Next.js, Nuxt and other servers that pass an empty body stream
- Fixed
- New
Added a
getAccountFieldsoption to social providers for storing custom values on the provider account at sign-in - Fixed
Fixed expired verification values being returned to repeated lookups by deleting them when found
- Fixed
Fixed two-factor sign-in to reject an expired challenge before sending an OTP or counting a failed attempt
- New
- 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
25 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.