Brute Force Affecting better-auth package, versions >=1.3.7 <1.7.16>=1.8.0-beta.0 <1.8.0-beta.5


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.34% (29th 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 Brute Force vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-BETTERAUTH-23050766
  • published30 Nov 2026
  • disclosed21 Nov 2026
  • creditebadfd, Anthropic's OSS Scanner

Introduced: 21 Nov 2026

NewCVE-2026-134314  (opens in a new tab)
CWE-307  (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 Brute Force via the emailOTP plugin, through three distinct weaknesses: a race condition in the attempt counter, collision-prone email change code keys, and accent-insensitive email lookups. The attempt counter is read and written in separate steps, so concurrent OTP guesses can each observe the same count, allowing an unauthenticated attacker to exceed allowedAttempts and brute-force an active OTP to sign in or reset a password. Email change codes are keyed on both addresses without binding to the requesting account, so two different address pairs can produce the same key and a code from one account can be consumed by another, allowing a signed-in user to verify an address they do not own. On databases that ignore accents, an email lookup can return an account whose stored address differs only by accented characters, causing password reset to deliver the code to the attacker's requested address rather than the account owner's, allowing an attacker who receives mail at an accent-variant address to reset the victim's password.

Note: The email change code collision requires changeEmail.enabled: true in the plugin (available from 1.5.0); the accented address attack requires a database collation that ignores accents, common on MySQL.

References

CVSS Base Scores

version 4.0
version 3.1