/

CVE-2026-134322

Severity:

HIGH RISK

(8.1)

Improper Authentication (CWE-287) in better-auth Phone Plugin

CVE-2026-134322

Deferred

Vulnerability type

Category:

Improper Authentication

CWE:

CWE-287

Impact:

Account misbinding and potential exposure of information entered during a victim's sign-in session

Severity:

HIGH RISK

(8.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A flaw in better-auth's phone number plugin can allow authentication flows to associate a phone number with an account before that number is verified. If a victim later uses a valid phone OTP for that number, the session may be created for an attacker-controlled account, potentially exposing information the victim enters.

Affected context

The issue affects the phone number plugin in the specified better-auth release ranges. It becomes risky when sign-up or another account flow saves a phone number without verifying ownership, and phone OTP sign-in later uses that number to select an account.

Exploit preconditions

  • Attack surface: Phone number registration and OTP sign-in flows
  • Required access: An attacker must be able to create or control an account and associate the victim's phone number with it through an affected flow
  • Trigger point: The victim completes phone OTP sign-in using the number associated with the attacker-controlled account
  • Why exploitation is possible: Account selection relies on a phone number that may have been stored without verifying that the account holder controls it

Why this happens

The authentication flow does not consistently establish phone-number ownership before using the number as an account identifier. This is an improper authentication pattern mapped to CWE-287, because an unverified identity attribute can influence which account receives an authenticated session.

Potential impact

  • A victim's OTP sign-in session could be associated with an attacker-controlled account
  • Information the victim enters during that session may be visible to the attacker controlling the account
  • Users could be misled about which account they have authenticated into
  • Trust in phone-based account verification could be reduced

General mitigation guidance

Defensive patterns include verifying control of a phone number before treating it as an account identifier, and ensuring that verification is enforced consistently across sign-up and other account flows. Authentication should bind the OTP challenge to the intended account and verified phone number, with explicit checks before creating a session. Applications can also minimize sensitive information shown or collected before account identity is confirmed, and apply least privilege to sessions and account operations.

How teams detect issues like this

  • Review phone-number sign-up and account-update paths for persistence before ownership verification
  • Check that OTP verification is bound to the same account and phone number throughout the authentication flow
  • Use static analysis or code review checks to flag account lookup and session creation based on unverified identity attributes
  • Apply policy checks requiring verification before phone numbers can be used for authentication or account recovery

Sources

SourceLink
github.comgithub.com/better-auth/better-auth/security/advisories/GHSA-q747-mqgr-4gh7
vulncheck.comvulncheck.com/advisories/better-auth-0.4.12-beta.7-before-1.7.16-unverified-phone-number-account-takeover

Frequently asked

questions

It concerns phone-number flows in affected better-auth releases where an unverified number can be saved and later used to select an account during OTP sign-in.

The attacker may be able to associate the victim's number with an attacker-controlled account, but the described scenario also depends on the victim completing a valid OTP sign-in for that number.

Verify phone-number ownership before relying on the number for account selection, and bind OTP verification and session creation to the intended account.

Treat contact details as untrusted until verified, enforce verification consistently across all account flows, and test that authentication cannot select an account based only on an unverified identifier.

Find out what's already
exploitable in your codebase.