Improper Authentication Affecting better-auth package, versions >=0.4.12-beta.7 <1.7.16>=1.8.0-beta.0 <1.8.0-beta.5


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.43% (39th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Improper Authentication vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-BETTERAUTH-23050772
  • published30 Nov 2026
  • disclosed21 Nov 2026
  • creditbytaesu, manus-use, Osama Mahmood, iabdullah215

Introduced: 21 Nov 2026

NewCVE-2026-134322  (opens in a new tab)
CWE-287  (opens in a new tab)

How to fix?

Upgrade better-auth to version 1.7.16, 1.8.0-beta.5 or higher.

Overview

better-auth is a The most comprehensive authentication library for TypeScript.

Affected versions of this package are vulnerable to Improper Authentication in the phone number plugin, where sign-up and other flows save unverified phone numbers to an account, and phone OTP sign-in then selects the account solely by phone number without requiring phoneNumberVerified. An attacker can register an account and attach a victim's phone number to it before the victim does, so that when the victim later signs in with a valid OTP sent to their own phone, the session is issued for the attacker-controlled account, exposing data the victim subsequently enters. A secondary issue causes verification codes from different flows to share a namespace, allowing an attacker who can predict a pending code's record identifier to cancel it and block another user's sign-in or recovery attempt without gaining account access.

References

CVSS Base Scores

version 4.0
version 3.1