Skip to content

better-auth

Better Auth before 1.7.16 and 1.8.0-beta.0 before 1.8.0-beta.5 Session Mix-Up via MySQL Serial IDs

CVE-2026-134313Published 21 Nov 2026, 16:34 UTC

Real-world risk

0.8/ 10Low

Routine

If the vulnerable configuration applies to you: 1.8

PreliminaryFrom the CVSS vector only · confidence low

CVSS

7.6

scored by the vendor (CNA), CVSS 4.0

In plain words

No plain-language summary yet. The original description is below.

Original description (from VulnCheck)

Better Auth (better-auth, @better-auth/kysely-adapter, and @better-auth/drizzle-adapter) before 1.7.16 and 1.8.0-beta.0 before 1.8.0-beta.5 contains a race condition with MySQL or MariaDB serial IDs because the inserted row's ID is read via a separate LAST_INSERT_ID() query that may run on a different pooled connection. Under concurrent load, a user signing in can receive another user's session and act as that user.

Am I affected?

ProductAffected versions (from the sources)Fixed in
better-authCommon< 1.7.16; >= 1.8.0-beta.0, < 1.8.0-beta.51.7.16, 1.8.0-beta.5
drizzle-adapterNiche>= 1.5.0-beta.9, < 1.7.16; >= 1.8.0-beta.0, < 1.8.0-beta.51.7.16, 1.8.0-beta.5
kysely-adapterNiche>= 1.5.0-beta.9, < 1.7.16; >= 1.8.0-beta.0, < 1.8.0-beta.51.7.16, 1.8.0-beta.5

What to do

Update to a fixed version: 1.7.16, 1.8.0-beta.5.

Why this score

FactorValueEvidence×
ImpactMajor data exposureReads secrets, credentials, databases, arbitrary filesFrom the CVSS vector0.80
Attacker positionInternetAnyone on the Internet can reach a typical deploymentFrom the CVSS vector1.00
Privileges neededLowA real low-privileged accountFrom the CVSS vector0.60
Victim interactionNoneNothingFrom the CVSS vector1.00
ConfigurationUncommonNeeds a non-default feature that a minority enablesFrom the CVSS vector0.45
ReliabilityHardNarrow race, needs an extra info leak, needs a man-in-the-middle position, or must be chained with another bugFrom the CVSS vector0.45

Threat level T1: Nothing known (× 0.85)

The default for a new disclosure

EPSS 0.4% chance of exploitation in 30 days (percentile 31), as of 2026-12-03.

The arithmetic
  1. Prerequisites multiplied together0.122
  2. Threat T1: Nothing known0.850
  3. 10 × impact 0.8 × prerequisites 0.1215 × threat 0.850.826
  4. Rounded to one decimal between 0.1 and 100.8

How the score works

Exploitation and evidence timeline

  1. 21 Nov 2026 Published
  2. 3 Dec 2026 Risk 0.8 (cvss fallback)

Weakness

CWE-362

References

Get alerts for better-auth

Free email or text alerts when a vulnerability in better-auth reaches risk 8 or higher. Nothing else.