cve.bz

CVE-2026-134313 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

7.6 highEPSS 0.4%

High (7.6) in better-auth. EPSS 0.4% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 4.0

7.6 high
CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

CVSS 3.1

6.8 medium
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N
EPSS
0.4% estimated probability of exploitation activity in the next 30 days; 30th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization (Race Condition)
OWASP Top 10
A06:2025 Insecure Design
Published
Assigned by
VulnCheck (CNA)
NVD analysis
Awaiting analysis
Record from
the NVD, synced

Ask an AI about this CVE

Show the promptExplain CVE-2026-134313 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-134313?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-134313?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-134313 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
better-auth kysely-adapterfrom 1.5.0-beta.9 before 1.7.16
better-auth kysely-adapterfrom 1.8.0-beta.0 before 1.8.0-beta.5
better-auth drizzle-adapterfrom 1.5.0-beta.9 before 1.7.16
better-auth drizzle-adapterfrom 1.8.0-beta.0 before 1.8.0-beta.5
better-authbefore 1.7.16
better-authfrom 1.8.0-beta.0 before 1.8.0-beta.5

Attack patterns (CAPEC)

  • CAPEC-26 Leveraging Race Conditions Likelihood: High · Severity: High
  • CAPEC-29 Leveraging Time-of-Check and Time-of-Use (TOCTOU) Race Conditions Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON