Better Auth 1.7.16 Security Release: Upgrade, Then Rotate If You Use Expo or Electron
Better Auth 1.7.16 and 1.8.0-beta.5 fix 12 issues, including a critical Expo flaw. Upgrade, then rotate secrets if Expo or Electron applied.
Upgrade better-auth and every @better-auth/* package to 1.7.16, or to 1.8.0-beta.5 on the beta line (Better Auth security release). That release fixes 12 advisories. If your server registers the Expo plugin, rotate your application secret after you upgrade. If the Electron server plugin was running on a vulnerable version, rotate the auth secret and every configured social provider client secret.
What was fixed?
Better Auth and Vercel list the same set. The critical one is in @better-auth/expo: an authorization proxy could sign values it did not issue (GHSA-4wq4-2ppv-q3hg). An unauthenticated attacker who knows a user's email could sign in as that user and change the account email. With the session cookie cache enabled, knowing a user ID was enough to act as that user.
High-severity fixes cover phone numbers that could be claimed before verification, and an Electron desktop sign-in path that could return the server secret and skip two-factor. Medium and low fixes cover email-change links, OAuth email verification, MySQL serial IDs in Kysely and Drizzle adapters, revoked sessions that could stay valid, email OTP limits, admin phone changes, organization owner invites, Stripe billing targeting and passkey origin checks.
You are only affected by a given advisory if you use that plugin or code path. Each advisory spells out the conditions.
Am I affected by the critical Expo issue?
You are affected if your server registers the expo() plugin from @better-auth/expo 1.4.0-beta.6 or later. No other setting is required for that finding. A separate wildcard problem in the same advisory also needs a wildcard entry in trustedOrigins.
What to do now
- Upgrade every Better Auth package together. Separately versioned packages such as
@better-auth/expo,@better-auth/electron,@better-auth/passkey,@better-auth/stripeand@better-auth/kysely-adaptership with the same version numbers. - On 1.7.x: install
better-auth@1.7.16. On the 1.8.0 beta line: installbetter-auth@1.8.0-beta.5. - Read the advisories for the plugins you actually use. Some fixes add a config step, such as listing trusted origins.
- If you register
expo(): rotate the application secret after upgrading. Signatures issued before the fix stay valid until the secret changes. - If Expo SSO sign-in fails after the upgrade: add the identity provider's origin to
trustedOrigins. - If a vulnerable Electron server plugin was running: assume the authentication secret and all configured social provider client secrets were exposed, and rotate all of them. The upgrade does not undo an earlier disclosure.
- Follow the per-advisory cleanup notes Vercel lists (for example, remove unverified phone numbers on 1.7.16, audit padded organization roles, check Stripe customer IDs tied to multiple users).
About Vercel's WAF
If your app is on Vercel, Vercel deployed WAF rules for the request patterns it can identify, including the critical Expo issue, with no config change required (Vercel bulletin). Vercel still says not to rely on the WAF for full protection. Logic-level issues cannot be blocked at the edge, and a WAF cannot invalidate signatures forged before the rules landed. Upgrade anyway, and rotate the application secret if you use Expo. DevLinksPad's Vercel page is the usual jump point for Vercel tokens and env vars.
Temporary workaround (Expo only)
If you cannot upgrade yet and you do not use Expo social sign-in, remove the expo() server plugin. Otherwise, Better Auth and Vercel describe blocking requests to /expo-authorization-proxy whose authorizationURL carries a state value that is not exactly 32 characters from A-Z, a-z, 0-9, - and _. That workaround blocks the signing problem only.
What is still unknown
Neither Better Auth nor Vercel published exploitation counts for these advisories. Whether your app was reachable on the Expo endpoint is something only your deploy and logs can answer.
FAQ
Do I only need to upgrade better-auth?
No. Upgrade every @better-auth/* package you depend on to the same fixed version.
I am on Vercel. Is the WAF enough?
No. Vercel says the WAF reduces exposure and does not replace patching. Expo apps still need an upgrade and a secret rotation.
I do not use Expo or Electron. Still upgrade?
Yes. The release fixes issues across core, email OTP, admin, organization, Stripe, passkey and database adapters. Skip only the rotation steps that apply to plugins you never ran.
Which versions are fixed?
1.7.16 on the 1.7 line, and 1.8.0-beta.5 on the 1.8.0 beta line.
Press ⌘K. Every dashboard, one keystroke away.