@better-auth/drizzle-adapter is vulnerable to Race Condition (TOCTOU)
37
CVE Score
Low
Race Condition (TOCTOU)
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.
Upgrade the @better-auth/drizzle-adapter and/or the better-auth library to the patch version.
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.
1.6.17 - 1.7.6
Fixed in 1.7.7@better-auth/drizzle-adapter is vulnerable to Race Condition (TOCTOU) in versions 1.6.17 - 1.7.6.
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.
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.