{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "1.5.0-beta.9"
                  },
                  {
                    "fixed": "1.7.16"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              },
              {
                "range": [
                  {
                    "introduced": "1.8.0-beta.0"
                  },
                  {
                    "fixed": "1.8.0-beta.5"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              },
              {
                "range": [
                  {
                    "introduced": "0"
                  },
                  {
                    "fixed": "1.7.16"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              }
            ]
          },
          "events": [
            {
              "introduced": "6295dfcd349e0d10a08c251a10d2b3cd7568ebaf"
            },
            {
              "fixed": "93edae16ebae910f57df360d0f43c2dcfa9f8c20"
            },
            {
              "introduced": "be781d5fd26aa4719f5f4fa3ebd767736d4883b1"
            },
            {
              "fixed": "9f1ba5cf4e1fb13357a5b294b18828ef5a1b7c47"
            },
            {
              "introduced": "0"
            },
            {
              "fixed": "93edae16ebae910f57df360d0f43c2dcfa9f8c20"
            }
          ],
          "repo": "https://github.com/better-auth/better-auth",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-48c2-w96j-mv3m"
  ],
  "database_specific": {
    "cna_assigner": "VulnCheck",
    "cwe_ids": [
      "CWE-362"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/134xxx/CVE-2026-134313.json"
  },
  "details": "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.",
  "id": "CVE-2026-134313",
  "modified": "2026-11-21T17:46:01.184858884Z",
  "published": "2026-11-21T16:34:55.987Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/134xxx/CVE-2026-134313.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/better-auth/better-auth/security/advisories/GHSA-48c2-w96j-mv3m"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-134313"
    },
    {
      "type": "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"
    }
  ],
  "schema_version": "1.9.2",
  "severity": [
    {
      "score": "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",
      "type": "CVSS_V4"
    }
  ],
  "summary": "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"
}