Race Condition Affecting @better-auth/drizzle-adapter package, versions >=1.5.0-beta.9 <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.35% (31st 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 IDSNYK-JS-BETTERAUTHDRIZZLEADAPTER-23050769
  • published30 Nov 2026
  • disclosed21 Nov 2026
  • creditwrufeger

Introduced: 21 Nov 2026

NewCVE-2026-134313  (opens in a new tab)
CWE-362  (opens in a new tab)

How to fix?

Upgrade @better-auth/drizzle-adapter to version 1.7.16, 1.8.0-beta.5 or higher.

Overview

@better-auth/drizzle-adapter is a Drizzle adapter for Better Auth

Affected versions of this package are vulnerable to Race Condition via a race condition in the MySQL/MariaDB serial ID retrieval path, where the inserted row's ID is read back using a separate LAST_INSERT_ID() query that may execute on a different pooled connection. Under concurrent load, a user signing in can receive another user's session token and act as that user, or a sign-up can return another user's record. The attacker cannot choose which account they receive.

References

CVSS Base Scores

version 4.0
version 3.1