@better-auth/drizzle-adapter is vulnerable to Race Condition (TOCTOU)
37
Low Risk
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.
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.
@better-auth/drizzle-adapter is vulnerable to Race Condition (TOCTOU) in versions 1.6.17 - 1.7.6.
Upgrade the @better-auth/drizzle-adapter and/or the better-auth library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.