{"id":"CVE-2026-134313","aliases":["GHSA-48c2-w96j-mv3m"],"title":"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","originalDescription":"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":7.6,"vector":"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","label":"high"},"exploitation":{"kev":null,"epss":{"score":0.00267,"percentile":0.11735},"exploitDb":null},"affected":[{"ecosystem":"vendor","name":"better-auth","range":">=0, <1.7.16","fixed":"1.7.16"},{"ecosystem":"vendor","name":"better-auth","range":">=1.8.0-beta.0, <1.8.0-beta.5","fixed":"1.8.0-beta.5"},{"ecosystem":"vendor","name":"drizzle-adapter","range":">=1.5.0-beta.9, <1.7.16","fixed":"1.7.16"},{"ecosystem":"vendor","name":"drizzle-adapter","range":">=1.8.0-beta.0, <1.8.0-beta.5","fixed":"1.8.0-beta.5"},{"ecosystem":"vendor","name":"kysely-adapter","range":">=1.5.0-beta.9, <1.7.16","fixed":"1.7.16"},{"ecosystem":"vendor","name":"kysely-adapter","range":">=1.8.0-beta.0, <1.8.0-beta.5","fixed":"1.8.0-beta.5"}],"references":[{"url":"https://github.com/better-auth/better-auth/security/advisories/GHSA-48c2-w96j-mv3m","type":"vendor-advisory"},{"url":"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","type":"third-party-advisory"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/134xxx/CVE-2026-134313.json","type":"advisory"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-134313","type":"advisory"}],"sources":[{"name":"nvd","at":"2026-11-23T16:29:20.213Z","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-134313","license":"NVD terms of use","firstSeenAt":"2026-11-21T17:43:05.317Z"},{"name":"osv","at":"2026-11-23T18:15:17.441Z","url":"https://osv.dev/vulnerability/CVE-2026-134313","license":"CC-BY 4.0","firstSeenAt":"2026-11-21T18:16:31.930Z"},{"name":"cvelistV5","at":"2026-11-24T07:26:55.087Z","url":"https://www.cve.org/CVERecord?id=CVE-2026-134313","license":"CVE Terms of Use","firstSeenAt":"2026-11-21T17:07:33.774Z"}],"firstSeenAt":"2026-11-21T17:07:33.774Z","publishedAt":"2026-11-21T16:34:55.987Z","modifiedAt":"2026-11-23T16:17:31.260Z"}