# 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

- Severity: High 7.6 (CVSS:4.0, scored by VulnCheck) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.35%, higher than 30% of CVEs (2026-12-01)
- Published: 2026-11-21T16:34:55.987Z
- Modified: 2026-11-23T16:17:31.260Z
- Weaknesses: CWE-362
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: VulnCheck

## Description

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.

(As written by CVE List.)

## Affected

- better-auth kysely-adapter: from 1.5.0-beta.9 before 1.7.16; from 1.8.0-beta.0 before 1.8.0-beta.5 (not affected: 1.7.16; 1.8.0-beta.5)
- better-auth drizzle-adapter: from 1.5.0-beta.9 before 1.7.16; from 1.8.0-beta.0 before 1.8.0-beta.5 (not affected: 1.7.16; 1.8.0-beta.5)
- better-auth better-auth: before 1.7.16; from 1.8.0-beta.0 before 1.8.0-beta.5 (not affected: 1.7.16; 1.8.0-beta.5)

## Every score

- VulnCheck: 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`
- VulnCheck: 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`

## References

- <https://github.com/better-auth/better-auth/security/advisories/GHSA-48c2-w96j-mv3m> (vendor-advisory)
- <https://www.vulncheck.com/advisories/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> (third-party-advisory)

## Sources

- CVE List: [CVE-2026-134313](https://www.cve.org/CVERecord?id=CVE-2026-134313), CVE Terms of Use, modified 2026-11-23
- NVD: [CVE-2026-134313](https://nvd.nist.gov/vuln/detail/CVE-2026-134313), Public domain, modified 2026-11-23

---

Page: https://cve.day/CVE-2026-134313 · Whole record: https://cve.day/CVE-2026-134313.json · Rebuilt by cve.day 2026-11-25T22:59:52.540Z
