SecurityContext

CVE-2026-134313: Better Auth - Session Hijacking via Race Condition

  • Cve: CVE-2026-134313
  • Name: Better Auth - Session Hijacking via Race Condition
  • 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.
  • Impact: Under concurrent load, a user can receive another user's session and act as that user, leading to account takeover.
  • Remediation: Upgrade to version 1.7.16 or 1.8.0-beta.5 (or later).
  • Vulnerability type: race_condition
  • Vulnerability impact: privilege_escalation
  • Requirements: Exploitation requires concurrent load and MySQL or MariaDB serial IDs.
  • Labels source: securitycontext
  • Severity: medium
  • Cvss score: 6.8
  • Cvss vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N
  • Epss score: 0.00353
  • Epss percentile: 0.29308
  • Assignee: [email protected]
  • Published at: 2026-11-21T17:16:52Z
  • Age in days: 3
  • Modified at: 2026-11-23T16:17:31Z
  • Patch available: yes
  • References total: 2
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-134313
  • Nvd status: received
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
  • Not known: requirement type, hackerone

Cwe

IdName
CWE-362Concurrent Execution using Shared Resource with Improper Synchronization

References

UrlSourceTags
https://github.com/better-auth/better-auth/security/advisories/GHSA-48c2-w96j-mv3mnvd
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-idsnvd

Products

ProductAffectedPlatform boundSourcesUrl
better-auth:better_auth>= 1.8.0-beta.0, < 1.8.0-beta.5; < 1.7.16nocna/v1/products/better-auth/better_auth

Projects

RepositoryLink kindsIndexedUrl
better-auth/better-authsecurity_advisoryyes/v1/repositories/better-auth/better-auth

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Remote: yes
  • Authentication required: yes
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts