Where
-Infinity
0
Severity
7.6
AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N

better-auth 1.3.0 before 1.7.16 and 1.8.0-beta.0 before 1.8.0-beta.5 contains an incorrect authorization vulnerability in the admin plugin's /admin/update-user endpoint that lets roles holding user:update change another user's phoneNumber and phoneNumberVerified fields. Attackers can set their own verified phone number on a higher-privileged account and sign in via phone OTP to take it over.

First published (updated )
Severity
7.6
AV:N/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

better-auth 1.3.0 before 1.7.16 and 1.8.0-beta.0 before 1.8.0-beta.5 contains an incorrect authorization vulnerability in the admin plugin's /admin/update-user endpoint that lets roles holding user:update change another user's phoneNumber and phoneNumberVerified fields. Attackers can set their own verified phone number on a higher-privileged account and sign in via phone OTP to take it over.

First published (updated )
Severity
7.4
AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:N

Better Auth 0.4.9 before 1.7.16 and 1.8.0-beta.0 before 1.8.0-beta.5 contains an OAuth sign-in authentication flaw that treats unverified provider emails as verified, including string "false" emailverified claims, unchecked generic OAuth profile/ID-token subject mismatches, and ignored Zoom provider options. Attackers holding a victim's address unverified at an affected provider can sign in, link to the victim's local account, and obtain its session.

First published (updated )
Severity
7.4
AV:N/AC:H/AT:P/PR:H/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

Better Auth 0.4.9 before 1.7.16 and 1.8.0-beta.0 before 1.8.0-beta.5 contains an OAuth sign-in authentication flaw that treats unverified provider emails as verified, including string "false" emailverified claims, unchecked generic OAuth profile/ID-token subject mismatches, and ignored Zoom provider options. Attackers holding a victim's address unverified at an affected provider can sign in, link to the victim's local account, and obtain its session.

First published (updated )
Severity
7.6
Race Condition
AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N

Better Auth (better-auth, @better-auth/kysely-adapter, and @better-auth/drizzle-adapter) before 1.7.16 and 1.8.0-beta.0 before 1.8.0-beta.5 contains a race condition with MySQL or MariaDB serial IDs because the inserted row's ID is read via a separate LASTINSERTID() query that may run on a different pooled connection. Under concurrent load, a user signing in can receive another user's session and act as that user.

First published (updated )
Severity
7.6
Race Condition
AV:N/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

Better Auth (better-auth, @better-auth/kysely-adapter, and @better-auth/drizzle-adapter) before 1.7.16 and 1.8.0-beta.0 before 1.8.0-beta.5 contains a race condition with MySQL or MariaDB serial IDs because the inserted row's ID is read via a separate LASTINSERTID() query that may run on a different pooled connection. Under concurrent load, a user signing in can receive another user's session and act as that user.

First published (updated )
Severity
6.3
Race Condition
AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N

better-auth 1.3.7 before 1.7.16 and 1.8.0-beta.0 before 1.8.0-beta.5 contains a race condition in the emailOTP plugin attempt counter, collision-prone email change code keys, and accent-insensitive email lookups. Unauthenticated attackers can send concurrent guesses exceeding allowedAttempts to brute-force OTPs and sign in or reset passwords, signed-in users can verify addresses they do not own, and attackers receiving mail at accent-variant addresses can reset victims' passwords.

First published (updated )
Severity
6.3
Race Condition
AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N

better-auth 1.3.7 before 1.7.16 and 1.8.0-beta.0 before 1.8.0-beta.5 contains a race condition in the emailOTP plugin attempt counter, collision-prone email change code keys, and accent-insensitive email lookups. Unauthenticated attackers can send concurrent guesses exceeding allowedAttempts to brute-force OTPs and sign in or reset passwords, signed-in users can verify addresses they do not own, and attackers receiving mail at accent-variant addresses can reset victims' passwords.

First published (updated )
Severity
7.4
AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:N

better-auth 1.4.0 before 1.7.16 and 1.8.0-beta.0 before 1.8.0-beta.5 contains an improper authentication vulnerability because email-change links record the old and new addresses but not the requesting user. Attackers can open a still-valid link issued for their own account after a victim registers the attacker's released old address, gaining a session and changing the victim's email to one they control.

First published (updated )
Severity
7.4
AV:N/AC:H/AT:P/PR:L/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

better-auth 1.4.0 before 1.7.16 and 1.8.0-beta.0 before 1.8.0-beta.5 contains an improper authentication vulnerability because email-change links record the old and new addresses but not the requesting user. Attackers can open a still-valid link issued for their own account after a victim registers the attacker's released old address, gaining a session and changing the victim's email to one they control.

First published (updated )
Severity
6.9
AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N

better-auth 1.5.5 before 1.7.16 and 1.8.0-beta.0 before 1.8.0-beta.5 contains a privilege escalation vulnerability in the organization plugin, where the creator role check compares the raw invitation role string while later checks trim it. Admins or other non-creator roles that can invite can submit a padded role such as " owner" that becomes owner on acceptance, allowing deletion of the organization and removal of original owners.

First published (updated )
Severity
6.9
AV:N/AC:L/AT:N/PR:H/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N

better-auth 1.5.5 before 1.7.16 and 1.8.0-beta.0 before 1.8.0-beta.5 contains a privilege escalation vulnerability in the organization plugin, where the creator role check compares the raw invitation role string while later checks trim it. Admins or other non-creator roles that can invite can submit a padded role such as " owner" that becomes owner on acceptance, allowing deletion of the organization and removal of original owners.

First published (updated )
Severity
2.3
AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N

@better-auth/passkey 1.4.0-beta.16 before 1.7.16 and 1.8.0-beta.0 before 1.8.0-beta.5, and the passkey plugin in better-auth 1.2.0-beta.18 before 1.4.0, do not confirm WebAuthn user verification when userVerification is "required" and take the expected origin from the request instead of configuration. Users can register or use passkeys without the required PIN or biometric check, and passkey responses created on another origin under the same relying party ID may be accepted.

First published (updated )
Severity
2.3
AV:N/AC:H/AT:P/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N

@better-auth/passkey 1.4.0-beta.16 before 1.7.16 and 1.8.0-beta.0 before 1.8.0-beta.5, and the passkey plugin in better-auth 1.2.0-beta.18 before 1.4.0, do not confirm WebAuthn user verification when userVerification is "required" and take the expected origin from the request instead of configuration. Users can register or use passkeys without the required PIN or biometric check, and passkey responses created on another origin under the same relying party ID may be accepted.

First published (updated )
Severity
2.3
Race Condition
AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N

better-auth from 0.8.1-beta.5 before 1.7.16 and 1.8.0-beta.0 before 1.8.0-beta.5, and @better-auth/passkey from 1.6.25 before 1.7.16 and 1.8.0-beta.0 before 1.8.0-beta.5, let revoked sessions stay valid because secondary storage session lists are updated non-atomically and some routes trust cookie-cached sessions. An attacker holding a valid session can evade bulk revocation or bans, or use a revoked cached session to register a passkey or create a lasting session.

First published (updated )
Severity
2.3
Race Condition
AV:N/AC:H/AT:P/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N

better-auth from 0.8.1-beta.5 before 1.7.16 and 1.8.0-beta.0 before 1.8.0-beta.5, and @better-auth/passkey from 1.6.25 before 1.7.16 and 1.8.0-beta.0 before 1.8.0-beta.5, let revoked sessions stay valid because secondary storage session lists are updated non-atomically and some routes trust cookie-cached sessions. An attacker holding a valid session can evade bulk revocation or bans, or use a revoked cached session to register a passkey or create a lasting session.

First published (updated )
Severity
8.6
AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N

better-auth 0.4.12-beta.7 before 1.7.16 and 1.8.0-beta.0 before 1.8.0-beta.5 contains an improper authentication vulnerability in the phone number plugin that lets sign-up and other flows save unverified phone numbers, which phone OTP sign-in then uses to select the account. Attackers can attach a victim's number to an attacker-controlled account so the victim's valid OTP sign-in yields a session for that account, exposing data the victim then enters.

First published (updated )
Severity
8.6
AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

better-auth 0.4.12-beta.7 before 1.7.16 and 1.8.0-beta.0 before 1.8.0-beta.5 contains an improper authentication vulnerability in the phone number plugin that lets sign-up and other flows save unverified phone numbers, which phone OTP sign-in then uses to select the account. Attackers can attach a victim's number to an attacker-controlled account so the victim's valid OTP sign-in yields a session for that account, exposing data the victim then enters.

First published (updated )
Severity
9.1
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

Am I affected?

You may be affected if you use better-auth from 1.4.0-beta.18 through versions before 1.7.7 with the Magic Link plugin and social or Generic OAuth sign-in.

You are affected if all of these are true:

- Magic Link is enabled with default storeToken: "plain", or with storeToken: "hashed" and global verification.storeIdentifier: "hashed" (including a hashed default). - At least one built-in social provider or Generic OAuth provider is enabled. - OAuth state uses account.storeStateStrategy: "database", the default when a database or secondary storage is configured.

Cookie-backed state blocks this path, subject to the OAuth Proxy condition below. With custom hashers, confirm the flows cannot resolve to the same stored identifier.

Summary

Better Auth accepts an OAuth sign-in state value as a Magic Link token. An attacker can start an OAuth sign-in with any email address and use the returned state value to finish a Magic Link sign-in for that address. They never prove that they can read that email.

Impact

An unauthenticated attacker who knows a user's email address can get a normal session for that user, with all of that account's permissions. They need no access to the mailbox, and they do not need to sign in with the OAuth provider or complete an OAuth callback.

If Magic Link sign-up is enabled and no user has the email address, the attacker can instead create an account that Better Auth wrongly marks as email verified, and is signed in to it. The false verified-email flag can also bypass Better Auth's default unproven-account protections when the mailbox owner later signs in, leaving the attacker's session in that account. Applications that trust verified email addresses or email domains may give this account more access, depending on the application.

Patches

The fix is merged for the planned better-auth 1.7.7 release. That package is not available yet.

Upgrade better-auth and installed Better Auth adapters, plugins, and integrations released alongside it together. Upgrade servers sharing verification storage in the same cutover. Request new Magic Links and restart pending OAuth or SAML sign-ins; links and state created before the upgrade cannot complete. Update custom verification.storeIdentifier.overrides rules to match the magic-link: and auth-state: prefixes. There is no user or account data migration, and public token values and API signatures are unchanged.

Workarounds

Until you upgrade to the fixed release, use one of these mitigations:

- Set account.storeStateStrategy to "cookie". If you also use OAuth Proxy, first configure one dedicated OAuth Proxy secret across all participating environments that differs from each environment's global Better Auth secret. Cookie-backed state can expose a separate OAuth Proxy account-takeover path when the proxy shares the global secret and implicit account linking is enabled. - Set the Magic Link plugin option storeToken to "hashed" and leave global verification.storeIdentifier unset or set it to "plain". Global identifier hashing does not prevent this issue when Magic Link tokens are also hashed. - Turn off Magic Link sign-in, or turn off social and Generic OAuth sign-in.

Setting disableSignUp: true on the Magic Link plugin is not enough. It only stops the creation of new verified accounts. It does not stop the takeover of existing accounts.

1 / 2
Source: GitHub
First published (updated )
Severity
9.1
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N

Better Auth from 1.5.0-beta.12 before 1.7.7 contains an authentication bypass vulnerability in the OAuth Proxy plugin that allows unauthenticated attackers to sign in as other users by forging encrypted profiles. When the proxy shares the global secret and cookie-stored state is used, attackers can obtain encrypted state for a fake profile with a victim's verified email to take over the account via implicit linking.

First published (updated )
Severity
9.3
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

Better Auth from 1.4.0-beta.18 before 1.7.7 contains an authentication bypass vulnerability that allows unauthenticated attackers to sign in as other users by reusing OAuth state values as Magic Link tokens. Attackers can start an OAuth sign-in with a victim's email and submit the returned state to Magic Link verification, gaining sessions or creating falsely email-verified accounts.

First published (updated )
Severity
6.3
Race Condition
AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N

Better Auth @better-auth/drizzle-adapter and better-auth from 1.6.17 before 1.7.7, and @better-auth/kysely-adapter from 1.6.17 before 1.7.0, contain a race condition in database-backed rate limiting on PostgreSQL where the limit check is not atomic with the counter update. Remote attackers can send bursts of concurrent requests that pass the check together, exceeding configured limits on password sign-in, two-factor verification, one-time code, password reset, and other rate-limited endpoints.

First published (updated )
Severity
8.5
AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N

better-auth from 1.3.8-beta.3 before 1.7.0-rc.3 contains a UI misrepresentation vulnerability in the deviceAuthorization plugin because GET /device omits the requesting clientid and scope. Attackers can start a device request via /device/code, trick signed-in users into approving the code, then redeem it at /device/token for a live session token.

First published (updated )
Severity
9.3
AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

better-auth (npm) before 1.4.2 allows an external request to configure baseURL when it is not otherwise defined (e.g., BETTERAUTHURL is unset). An attacker able to make the very first request to the server after startup can poison the router's base path, causing all routes to return 404 for all users (denial of service). The issue is not reachable when baseURL is explicitly configured or on typical managed hosting platforms.

First published (updated )
Severity
7.1
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

better-auth versions before 1.4.9 contain a two-factor authentication bypass vulnerability when session.cookieCache is enabled. Attackers with valid primary credentials can access authenticated routes without completing second-factor verification by exploiting premature session caching.

First published (updated )
Severity
6
AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N

better-auth versions before 1.6.2 fail to validate the OAuth state parameter against the stored nonce when using cookie-backed state storage without PKCE. Attackers can forge the state parameter and supply an attacker-controlled authorization code to create authenticated sessions bound to the attacker's external identity or persistently link attacker accounts to victim profiles.

First published (updated )
Severity
7.1
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Better Auth is an authentication and authorization library for TypeScript. Prior to 1.6.5, the clientPrivileges option documents a create action, but the OAuth client creation endpoints did not invoke the hook before persisting new clients. Deployments that configured clientPrivileges to restrict client registration were not actually restricted — any authenticated user could reach the create endpoints and register an OAuth client with attacker-chosen redirect URIs and metadata. This vulnerability is fixed in 1.6.5.

First published (updated )

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203