All vulnerabilities
GHSA-44jh-23m7-hpcf

@better-auth/drizzle-adapter: Concurrent requests can exceed rate limits on PostgreSQL

@better-auth/drizzle-adapter
CVSS
3.7Low
ExploitationNo known exploitationNot in CISA KEV, which does not prove it is unexploitedCISA KEV
Exploit odds (EPSS)No scoreNo FIRST EPSS score in this snapshot yet
Fixed in1.7.7Also 1.7.0GitHub
Published30 Sep 2026Updated 30 Sep 2026GitHub

What fixes it

  • 1.7.7@better-auth/drizzle-adapter, npmGitHubnpm install @better-auth/drizzle-adapter@1.7.7
  • 1.7.0@better-auth/kysely-adapter, npmGitHubnpm install @better-auth/kysely-adapter@1.7.0
  • 1.7.7better-auth, npmGitHubnpm install better-auth@1.7.7

A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.

Description

Am I affected?

You are affected if you use @better-auth/drizzle-adapter from 1.6.17 through versions before 1.7.7 (including the 1.7.0 prereleases from beta.6 through rc.6) or stable 1.6.x releases of @better-auth/kysely-adapter from 1.6.17 onward, and keep rate-limit records in a PostgreSQL database. This also applies when you use the affected Drizzle adapter bundled with better-auth.

All of these must be true:

  • Rate limiting is enabled.
  • Rate-limit records are stored in the database.
  • The database is PostgreSQL, used through one of the adapter versions above.

You are not affected if you store rate-limit records in memory (the default) or in secondary storage.

Summary

Database-backed rate limiting on PostgreSQL can let a burst of concurrent requests go over the configured maximum. When many requests arrive at the same time, several of them can pass the limit check together. This weakens the rate limit on password sign-in, two-factor verification, one-time codes, password resets, and other rate-limited endpoints.

Impact

An attacker who sends many requests at once can make more attempts than the application allows.

The issue does not bypass password or one-time-code validation. It does not directly compromise an account. The extent of the bypass depends on concurrent database requests, the number of application instances, and the rate-limit window.

Patches

@better-auth/kysely-adapter is fixed in 1.7.0. Upgrade to 1.7.0 or later.

For Drizzle, upgrade better-auth and @better-auth/drizzle-adapter together to 1.7.7. No database schema or public API migration is required.

Workarounds

  • Store rate-limit records in secondary storage.
  • Use a custom rate-limit storage that checks and increments the counter in one atomic step. An atomic step cannot be interrupted by another request.
  • Enforce the intended limit at an upstream layer, such as a reverse proxy or gateway.

In-memory storage also avoids this issue. However, each application instance keeps its own counter, so it may not enforce one shared limit in multi-instance or serverless deployments.

References

Text from GitHub Advisory Database

Affected versions 3

  • @better-auth/drizzle-adapter, npm>= 1.6.17, < 1.7.7GitHub
  • @better-auth/kysely-adapter, npm>= 1.6.17, < 1.7.0GitHub
  • better-auth, npm>= 1.6.17, < 1.7.7GitHub