p PatchFirst

CVE-2026-134313

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

CVSS 7.6 · High · EPSS 0.3% · Fix available

Compare with your installed version

Affected products and known fixed versions are public information. Compare them with your installed version.

Assess your server’s risks

The free check gives you a rating and a risk summary by technology stack, without signing up. It does not answer whether this particular vulnerability affects you.

Monitoring matches public information against your servers’ software. Detailed findings for your servers include the order of updates.

curl -fsSL https://patchfirst.dev/check.sh | sh
Check your server for free →

Channels carry general technology news; monitoring reports new findings on your servers in your dashboard, through browser notifications, in Telegram or via a webhook.

This page contains facts from public vulnerability sources. Check the original advisory before updating.

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.

Published
Updated

Affected products and versions

  • kysely-adapter

    Versions
    • ≥ 1.5.0-beta.9, < 1.7.16: Affected (semver)
    • 1.7.16: Not affected (semver)

    Update to 1.7.16

  • kysely-adapter

    Versions
    • ≥ 1.8.0-beta.0, < 1.8.0-beta.5: Affected (semver)
    • 1.8.0-beta.5: Not affected (semver)

    Update to 1.8.0-beta.5

  • drizzle-adapter

    Versions
    • ≥ 1.5.0-beta.9, < 1.7.16: Affected (semver)
    • 1.7.16: Not affected (semver)

    Update to 1.7.16

  • drizzle-adapter

    Versions
    • ≥ 1.8.0-beta.0, < 1.8.0-beta.5: Affected (semver)
    • 1.8.0-beta.5: Not affected (semver)

    Update to 1.8.0-beta.5

  • better-auth

    Versions
    • ≥ 0, < 1.7.16: Affected (semver)
    • 1.7.16: Not affected (semver)

    Update to 1.7.16

  • better-auth

    Versions
    • ≥ 1.8.0-beta.0, < 1.8.0-beta.5: Affected (semver)
    • 1.8.0-beta.5: Not affected (semver)

    Update to 1.8.0-beta.5

Original sources

Check your server →