Better Auth 1.7.16 security release by Better Auth (Vercel)
One upgrade and a redeploy close a list of account takeovers. Do it today.
The pain: Your users and sessions live in your own Postgres through Better Auth, which means its bugs are yours to patch. On 3 November twelve of them were published at once, one critical.
The fix: Upgrade every better-auth and @better-auth/* package to 1.7.18, redeploy, and rotate the app secret if you ever registered the Expo plugin. Neon's managed Better Auth was patched on Neon's side.
Better Auth is my first pick for serious apps on Postgres because your users live in your own database and cost nothing per user. The price of that is this week: on 3 November the project published twelve advisories at once and shipped the fixes in 1.7.16 (1.8.0-beta.5 on the beta line). One is critical, two are high, eight are medium and one is low. Better Auth's own team says it now runs frontier models over its code for security review, which explains the volume: 39 advisories this year.
Who is exposed, in plain words. Most of the twelve only hit you if you turned on the plugin concerned:
- Critical, CVSS 9.1,
@better-auth/expo: a public endpoint would sign any value a caller gave it with the app's secret, the same secret behind email-verification links and the cookie cache. If you ever registeredexpo(), assume someone could have forged a signed value. - High, the phone-number plugin: a number could be claimed before it was verified.
- High, the Electron plugin: desktop sign-in could return the auth secret and the social client secrets, and skip two-factor.
- The ones that hit a plain Postgres app with email and OAuth: an OAuth provider sending
email_verifiedas a string (Cognito's userinfo is the named example) was treated as verified; email-change links stayed valid after the address changed hands; and "sign out everywhere" could miss a session cached in Redis or KV.
What to do, in order. Bump better-auth and every @better-auth/* package to the same version, 1.7.18 (1.7.17 and 1.7.18 fixed more session and Expo state bugs), and redeploy. Then:
- if
expo()was registered, rotate the app secret, knowing that it logs everyone out; - if the Electron plugin ever ran, rotate everything, social client secrets included;
- delete phone numbers saved without verification, because the patch doesn't;
- if you use the Stripe plugin, look for Stripe customer ids linked to more than one user;
- add
set-phoneto any custom admin access-control statements, or phone edits break.
Never run anything below 1.7.16.
Against Cognito. This is the trade, stated plainly: with Cognito, AWS patches the service and you ship nothing. With Better Auth, you own the library and its Tuesday afternoons. I still take that trade for a serious app, because Cognito's limits (no organisations, a second user store) cost more over a project's life than an upgrade a month. If you want Better Auth without the patching, Neon's managed Better Auth already runs 1.7.16 and needed nothing from its users. That's the strongest argument for it I've seen.
My verdict: no change to my pick. Upgrade to 1.7.18 today, rotate the secret if you used Expo, and put Better Auth's advisories feed in front of whoever owns your dependencies.