Intel

AIKIDO-2026-261025

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

Race Condition (TOCTOU)GHSA-44jh-23m7-hpcf Published 5 days ago

37

Low Risk

This Affects:

JS@better-auth/drizzle-adapter
1.6.17 - 1.7.6
Fixed in 1.7.7
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.

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.

Background info

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

How to fix this

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

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform