better-auth advisories (Sep–Nov 2026): magic-link takeover CVE-2026-114607, Expo and Electron plugin secret exposure — update to 1.7.16+
better-auth published a batch of advisories: Critical magic-link account takeover via OAuth state (CVE-2026-114607, fixed in 1.7.7), Critical `@better-auth/expo` authorization proxy that signs attacker values (fixed in 1.7.16), High `@better-auth/electron` returns the server secret and can skip 2FA (1.7.16), plus six Moderate fixes on 2026-11-03. npm `latest` is 1.7.18.
better-auth advisories
As of: 2026-11-07 · Sources: advisory list, GHSA-965c-763c-88jm, GHSA-4wq4-2ppv-q3hg, GHSA-9p5w-h4pr-fcrc. npm view better-auth: latest 1.7.18, beta 1.8.0-beta.6.
- Critical (CVSS 9.1) — GHSA-965c-763c-88jm / CVE-2026-114607 (2026-09-30): an OAuth sign-in state value is accepted as a magic-link token, so anyone who knows a user's email can sign in as them (or create a verified account). Affects 1.4.0-beta.18 to < 1.7.7, when Magic Link (plain or global-hashed token storage) and a social/Generic OAuth provider are both on and OAuth state is stored in the database (the default). Workarounds:
account.storeStateStrategy: "cookie", magic linkstoreToken: "hashed", or disable magic link/OAuth. - Critical (CVSS 9.1) — GHSA-4wq4-2ppv-q3hg,
@better-auth/expo/expo()plugin (2026-11-03): a public endpoint signs an attacker-suppliedstatewith your app secret (the same secret that signs verification links and session-cookie cache), plus an open redirect and a loosetrustedOriginswildcard. Unauthenticated account takeover. Fixed in 1.7.16 (and 1.8.0-beta.5). Removeexpo()if you do not use Expo social sign-in; rotate the app secret if the endpoint was reachable. - High (CVSS 8.1) — GHSA-9p5w-h4pr-fcrc,
@better-auth/electron(2026-11-03): sign-in can return the server auth context including the auth secret and social-provider client secrets; withelectron()beforetwoFactor(), a password sign-in can skip 2FA. Fixed in 1.7.16 / 1.8.0-beta.5; upgrade both packages and treat the secrets as disclosed if the plugin ran on an affected version (rotate). - Also published 2026-11-03 (Moderate, fix versions are on each advisory): admin role can change another user's phone number (GHSA-g95c-wqvr-8c3j); OAuth sign-in can treat an unverified provider email as verified (GHSA-9hm7-xhfp-cx58);
@better-auth/kysely-adapterMySQL serial ids can return another request's record (GHSA-48c2-w96j-mv3m); Email OTP attempt limit can be raced (GHSA-2f9c-7xj7-gh55); email-change links stay valid after the address changes hands (GHSA-hwq2-v29r-p69r). Earlier: High GHSA-mx9r-x6ww-qjw9 (@better-auth/sso, 2026-09-29).
What to do
npm install better-auth@latest (and every @better-auth/* package at the same version), then rotate BETTER_AUTH_SECRET and OAuth client secrets if you ran the Expo or Electron plugins. Revoke sessions after rotating.