Description
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.
Affected products and versions
better-auth better-auth1.3.7 – < 1.7.16Fixed in: 1.7.16
better-auth better-auth1.8.0-beta.0 – < 1.8.0-beta.5Fixed in: 1.8.0-beta.5
CVSS vector, explained
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
- Attack vector
- Network (from the internet)
- Attack complexity
- High
- Privileges required
- None (no login)
- User interaction
- Not required
- Scope
- Vulnerable component only
- Confidentiality
- Low impact
- Integrity
- Low impact
- Availability
- None
Weakness type (CWE)
- CWE-307 Improper Restriction of Excessive Authentication Attempts
References
- github.com/better-auth/better-auth/security/advisories/GHSA-2f9c-7xj7-gh55 vendor advisory
- www.vulncheck.com/advisories/better-auth-from-1.3.7-before-1.7.16-email-otp-race-condition
Sources: CVE.org (CNA and CISA ADP), CISA KEV, FIRST EPSS. Always check the vendor's official advisory.