Intel

AIKIDO-2026-261025

@better-auth/drizzle-adapter is vulnerable to Race Condition (TOCTOU)

GHSA-44jh-23m7-hpcfPublished Oct 9, 2026
October 9, 2026

37

CVE Score

Low

Race Condition (TOCTOU)

Are you affected? Scan for Free

TL;DR

When rate limits are stored in PostgreSQL, the current count is checked and the incremented value is written in separate steps, so concurrent requests can each read the limit before any of them writes its update. A burst of simultaneous requests against password sign-in, two factor verification, one time codes, or password resets can exceed the configured maximum attempts. The fix includes the guard predicate in the same database operation that writes the new count.

How do I fix this?

Upgrade the @better-auth/drizzle-adapter and/or the better-auth library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you store rate limit records in a PostgreSQL database through the Drizzle adapter with rate limiting enabled.

Versions

1.6.17 - 1.7.6

Fixed in 1.7.7

Background info

@better-auth/drizzle-adapter is vulnerable to Race Condition (TOCTOU) in versions 1.6.17 - 1.7.6.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea