Intel

AIKIDO-2026-80549

better-auth is vulnerable to Improper Authentication

GHSA-q747-mqgr-4gh7Published Nov 4, 2026
November 4, 2026

81

CVE Score

High

Improper Authentication

Are you affected? Scan for Free

TL;DR

The Better Auth phone number plugin lets sign-up and other flows save a phone number on an account before anyone proves they own it, and phone OTP sign-in then selects the account holding that number without requiring phoneNumberVerified. An attacker can store a victim's phone number on an account they control; when the victim later signs in with a valid OTP sent to their own phone, they receive a session for the attacker's account, and data they enter there may be exposed to the attacker. Separately, phone verification codes share an unnamespaced identifier with codes from other flows, so wrong-phone attempts can repeatedly delete another user's pending code and block their sign-in or recovery. The fix rejects phoneNumber in sign-up and sign-in requests, drops unverified numbers from user creation and social profiles, and uses a phone-specific identifier for verification codes.

How do I fix this?

Upgrade the better-auth library to the patch version. On 1.7.16, also clear previously saved unverified phone numbers (for example, set phoneNumber to NULL where phoneNumberVerified is not true).

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you use the phone number plugin. The shared verification code issue affects versions from 1.2.6 when no custom verifyOTP function is set.

Versions

0.4.12 - 1.7.15

Fixed in 1.7.16

Background info

better-auth is vulnerable to Improper Authentication in versions 0.4.12 - 1.7.15.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea