GHSA-44JH-23M7-HPCF
Vulnerability from github – Published: 2026-10-27 15:32 – Updated: 2026-10-27 15:32Am 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 @better-auth/kysely-adapter 1.6.17 through 1.6.31, and keep rate-limit records in a PostgreSQL database.
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 number of extra attempts is limited by the number of concurrent database connections, 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.
The Drizzle fix is merged for the planned @better-auth/drizzle-adapter 1.7.7 release. That package is not available yet. Upgrade better-auth and the installed Drizzle adapter together when 1.7.7 is available. 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.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "@better-auth/drizzle-adapter"
},
"ranges": [
{
"events": [
{
"introduced": "1.6.17"
},
{
"fixed": "1.7.7"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "npm",
"name": "@better-auth/kysely-adapter"
},
"ranges": [
{
"events": [
{
"introduced": "1.6.17"
},
{
"fixed": "1.7.0"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "npm",
"name": "better-auth"
},
"ranges": [
{
"events": [
{
"introduced": "1.6.17"
},
{
"fixed": "1.7.7"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-307",
"CWE-362"
],
"github_reviewed": true,
"github_reviewed_at": "2026-10-27T15:32:25Z",
"nvd_published_at": null,
"severity": "LOW"
},
"details": "## Am I affected?\n\nYou 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 `@better-auth/kysely-adapter` 1.6.17 through 1.6.31, and keep rate-limit records in a PostgreSQL database.\n\nAll of these must be true:\n\n- Rate limiting is enabled.\n- Rate-limit records are stored in the database.\n- The database is PostgreSQL, used through one of the adapter versions above.\n\nYou are not affected if you store rate-limit records in memory (the default) or in secondary storage.\n\n## Summary\n\nDatabase-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.\n\n## Impact\n\nAn attacker who sends many requests at once can make more attempts than the application allows.\n\nThe issue does not bypass password or one-time-code validation. It does not directly compromise an account. The number of extra attempts is limited by the number of concurrent database connections, the number of application instances, and the rate-limit window.\n\n## Patches\n\n`@better-auth/kysely-adapter` is fixed in 1.7.0. Upgrade to 1.7.0 or later.\n\nThe Drizzle fix is merged for the planned `@better-auth/drizzle-adapter` 1.7.7 release. That package is not available yet. Upgrade `better-auth` and the installed Drizzle adapter together when 1.7.7 is available. No database schema or public API migration is required.\n\n## Workarounds\n\n- Store rate-limit records in secondary storage.\n- 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.\n- Enforce the intended limit at an upstream layer, such as a reverse proxy or gateway.\n\nIn-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.",
"id": "GHSA-44jh-23m7-hpcf",
"modified": "2026-10-27T15:32:25Z",
"published": "2026-10-27T15:32:25Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/better-auth/better-auth/security/advisories/GHSA-44jh-23m7-hpcf"
},
{
"type": "WEB",
"url": "https://github.com/better-auth/better-auth/pull/11331"
},
{
"type": "WEB",
"url": "https://github.com/better-auth/better-auth/commit/35d7cd389220f99cfc98ac699e6a42b48313a740"
},
{
"type": "PACKAGE",
"url": "https://github.com/better-auth/better-auth"
},
{
"type": "WEB",
"url": "https://github.com/better-auth/better-auth/releases/tag/v1.7.7"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "@better-auth/drizzle-adapter: Concurrent requests can exceed rate limits on PostgreSQL"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.