Repository navigation
fix(deps): upgrade Better Auth to 1.7.16 for the 2026-11-03 security release - #761
Merged
Merged
Conversation
…release Moves better-auth and every @better-auth/* package, plus the pinned auth schema CLI, from 1.7.14 to 1.7.16. Exempts the exact patched versions from the 24-hour release-age gate, as node-forge@1.4.2 was. The regenerated auth schema is unchanged.
Medformatik
enabled auto-merge (squash)
November 3, 2026 23:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed and why
Better Auth's 2026-11-03 security release fixes twelve advisories in 1.7.16. This PR moves
better-authand every@better-auth/*package inapps/api,apps/webandpackages/corefrom 1.7.14 to 1.7.16, as upstream asks for all packages together. It also moves the pinnedauthCLI inauth:generateto 1.7.16.The release went out a few hours ago, so the 24-hour
minimumReleaseAgegate blocks it.pnpm-workspace.yamlexempts the exact patched versions, the same waynode-forge@1.4.2was exempted.better-authpins its adapters, telemetry andbetter-call@1.4.5exactly, so those versions are listed too. The age gate still applies to every other version.Advisories that apply to the current
apps/api/src/auth.tsconfiguration:@better-auth/expo: the server registersexpo(), so its authorization proxy endpoint is reachable. Upstream says an unauthenticated attacker who knows an email address could sign in as that user. The fix also tightens wildcardtrustedOriginsmatching. In production the list is theCORS_ORIGINweb origins plusopenmapx://, which has no wildcard by default. The development-onlyexp://192.168.*.*:*/**entry now matches only IPv4 hosts, which is what it is for.emailVerification.sendVerificationEmailis configured. Verification and change links now work only for the account they were issued to. Opening a change link no longer signs the user in.emailOTPhaschangeEmail.enabled. The attempt-limit race is fixed and codes are now bound to their exact address. Email-change codes sent before the upgrade must be requested again.emailVerified: falseand are trusted linking providers. The stricter claim handling does not change their behaviour.passkey()already setsoriginfromPASSKEY_ORIGIN, so no new configuration is needed.update-usernow needsuser:set-phone.admin()uses the default roles, which include it.These do not apply because the plugins are not enabled: phone number (GHSA-q747-mqgr-4gh7), organization (GHSA-c85h-5mrr-mgx4), Stripe (GHSA-x8j7-xh58-rv6x), Electron (GHSA-9p5w-h4pr-fcrc) and the MySQL Kysely adapter (GHSA-48c2-w96j-mv3m; OpenMapX uses the Drizzle Postgres adapter).
Running
auth:generatewith 1.7.16 produces no schema change after formatting, so no migration is needed.Verification
pnpm verify:full: lint, workspace types, policy and OpenAPI pass. The test stage passed 24,746 tests and failed one: the test inauth-oauth-provider.test.tsthat pins the Better Auth version still expected 1.7.14. The version now lives in one constant set to 1.7.16, and the file passes (9 tests).pnpm test:database api-privacy: 27 files and 149 tests pass, includingauth-postgres.test.ts. The run used a disposable PostGIS 18-3.6 container at the CI digest, with the production Drizzle migrations applied first.auth:generatewithauth@1.7.16: the formatted schema matches the committedauth-schema.ts.pnpm check-release-informationpasses with this description.ingestionandexport-restoredatabase groups, which do not exercise Better Auth.Release and upgrade impact
Product impact: ordinary
No package release: neither public package's sources change and neither depends on Better Auth. Built from
origin/mainand from this branch, the@openmapx/extension-clibundle is byte-identical. The@openmapx/extension-contractsdeclarations differ only in union-member order, and a second build of this branch matchedorigin/mainexactly, so the ordering is build-to-build noise.The upgrade itself needs no migration or configuration change. For the Expo advisory, upstream recommends rotating the application secret if the endpoint was reachable, because signatures issued before the fix stay valid until the secret changes. On OpenMapX the same secret also encrypts stored provider OAuth tokens (
account.encryptOAuthTokens), so rotating it ends every session and makes people relink OpenStreetMap and Mapillary. This PR does not rotate the secret. Whether to rotate is an operator decision.