better-auth
1.7.25 · 14 Nov 2026MIT20.8M / weekRepositoryHomepagenpmAtom feed
Upgrading better-auth From 0.5.0 to 1.7.7
187 releases in betweennotes for 177
Counted from 177 of 187 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 18 advisories affecting 0.5.0
- 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 has an Open Redirect Vulnerability in Verify Email Endpointhigh · GHSA-8jhw-6pjj-8723
- 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 URL parameter HTML Injection (Reflected Cross-Site scripting)moderate · GHSA-9x4v-xfq5-m8x5
- 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 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.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.
- 1.5.0
SAML ACS error redirect hardening: Prevent open redirect in error flows.
Release by release
- Security
Fixed a critical Magic Link account-takeover vulnerability.
- Fixed
Fixed ID-token sign-in ignoring the social provider’s
disableSignUpsetting. - Fixed
Fixed OAuth Proxy accepting sign-in state as a provider profile. Upgrade all OAuth Proxy participants together; see the OAuth Proxy upgrade guidance.
- Fixed
Fixed CAPTCHA errors missing the JSON
Content-Typeheader. - Fixed
Fixed the active organization failing to refresh after sign-in when a session hook selects the initial organization.
- Fixed
Fixed rate-limit errors missing the JSON
Content-Typeheader.
- Security
- New
Added support for a
bannedUserMessagefunction that receives the banned user, allowing sign-in errors to include details such as the ban reason. - New
Added Vercel BotID as a captcha provider for protected authentication routes.
- Fixed
Passwords over
maxPasswordLengthare now rejected withPASSWORD_TOO_LONGbefore hashing or verification. - Fixed
Fixed React hydration mismatches when session or plugin auth queries resolve before streamed components hydrate.
- New
- New
Added
database.schemaNamesupport for direct PostgreSQL connections. - Fixed
Improved server-side logging for Cloudflare Turnstile verification failures.
- Fixed
Fixed PostgreSQL migrations incorrectly identifying tables and views across schemas.
- Fixed
Fixed MySQL index validation for existing string columns.
- Fixed
Removed the unused optional
better-sqlite3peer dependency to prevent installation conflicts.
- New
- New
Added
experimental.instrumentation.enabledto disable OpenTelemetry span creation per auth instance. - New
Added support for additional session fields in
testUtilsauth helpers. - New
Added Vitest 5 support to the testing utilities.
- New
- Deprecated
Fixed callback hooks being skipped after proxied OAuth sign-ins and preserved server state when callback cookies are unavailable. The legacy /oauth-proxy-callback endpoint is deprecated and will be removed in the next minor release.
- New
Added Cloudflare as a built-in social provider with client-secret and PKCE support.
- New
Enabled schema validation during initialization by default, including in production, and rejected authentication requests on detected mismatches.
- New
Added
isPasswordCompromisedfor checking passwords against Have I Been Pwned in custom server-side flows.
- Deprecated
- New
Added warnings for invalid signed session data in the cookie cache.
- Fixed
Fixed permanent user bans to clear expiration dates from previous temporary bans.
- Fixed
Fixed client types with more plugins being assignable to types declaring fewer plugins.
- Fixed
Fixed disabled MyISAM indexes from satisfying migration index checks.
- New
- New
Added native database transaction support to test instances for PostgreSQL and MySQL.
- Fixed
Updated bundled dependencies (
jose, nanostores, noble crypto packages, SimpleWebAuthn) to their latest compatible releases, with no changes required to existing projects.
- New
- Breaking
Moved database joins out of
experimentalinto the stableadvanced.database.joinsoption - Breaking
Scoped account identity by trusted issuer, keying accounts on
(issuer, accountId) - Breaking
Required captcha endpoint entries to match full auth paths, with wildcard support
- Breaking
Moved the MCP plugin into its own
@better-auth/mcppackage built on the OAuth provider
- Breaking
28 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.