{"schema":"threatline.record/2","record":{"id":"GHSA-44jh-23m7-hpcf","aliases":["GHSA-44jh-23m7-hpcf"],"summary":"@better-auth/drizzle-adapter: Concurrent requests can exceed rate limits on PostgreSQL","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 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`.\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 extent of the bypass depends on concurrent database requests, 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\nFor Drizzle, upgrade `better-auth` and `@better-auth/drizzle-adapter` together to 1.7.7. 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.\n\n## References\n\n- [Drizzle guarded-update fix](https://github.com/better-auth/better-auth/pull/11331)\n","categories":["Unclassified"],"product":"@better-auth/drizzle-adapter","vendor":"","ecosystem":null,"affected_ranges":[{"source":"GitHub Advisory Database","source_url":"https://github.com/better-auth/better-auth/security/advisories/GHSA-44jh-23m7-hpcf","source_modified_at":"2026-09-30T21:35:15Z","fetched_at":"2026-10-24T05:41:33.294140Z","package":{"ecosystem":"npm","name":"@better-auth/drizzle-adapter"},"range":">= 1.6.17, < 1.7.7"},{"source":"GitHub Advisory Database","source_url":"https://github.com/better-auth/better-auth/security/advisories/GHSA-44jh-23m7-hpcf","source_modified_at":"2026-09-30T21:35:15Z","fetched_at":"2026-10-24T05:41:33.294140Z","package":{"ecosystem":"npm","name":"@better-auth/kysely-adapter"},"range":">= 1.6.17, < 1.7.0"},{"source":"GitHub Advisory Database","source_url":"https://github.com/better-auth/better-auth/security/advisories/GHSA-44jh-23m7-hpcf","source_modified_at":"2026-09-30T21:35:15Z","fetched_at":"2026-10-24T05:41:33.294140Z","package":{"ecosystem":"npm","name":"better-auth"},"range":">= 1.6.17, < 1.7.7"}],"fixed_versions":[{"source":"GitHub Advisory Database","source_url":"https://github.com/better-auth/better-auth/security/advisories/GHSA-44jh-23m7-hpcf","source_modified_at":"2026-09-30T21:35:15Z","fetched_at":"2026-10-24T05:41:33.294140Z","package":{"ecosystem":"npm","name":"@better-auth/drizzle-adapter"},"version":"1.7.7"},{"source":"GitHub Advisory Database","source_url":"https://github.com/better-auth/better-auth/security/advisories/GHSA-44jh-23m7-hpcf","source_modified_at":"2026-09-30T21:35:15Z","fetched_at":"2026-10-24T05:41:33.294140Z","package":{"ecosystem":"npm","name":"@better-auth/kysely-adapter"},"version":"1.7.0"},{"source":"GitHub Advisory Database","source_url":"https://github.com/better-auth/better-auth/security/advisories/GHSA-44jh-23m7-hpcf","source_modified_at":"2026-09-30T21:35:15Z","fetched_at":"2026-10-24T05:41:33.294140Z","package":{"ecosystem":"npm","name":"better-auth"},"version":"1.7.7"}],"cvss":3.7,"severity":"Low","kev":{"listed":false},"epss":{"probability":null,"percentile":null,"score_date":null},"published_at":"2026-09-30T21:34:11Z","modified_at":"2026-09-30T21:35:15Z","provenance":[{"source":"GitHub Advisory Database","url":"https://github.com/better-auth/better-auth/security/advisories/GHSA-44jh-23m7-hpcf","fetched_at":"2026-10-24T05:41:33.294140Z","source_modified_at":"2026-09-30T21:35:15Z"}],"sources":["GitHub Advisory Database"],"references":[],"locations":[],"motoko_assessment":{"status":"requires_architecture_review","automatic_remediation":false},"classification":{"method":"product-first software-layer rules","rules_version":"2.1","matched_on":null,"confidence":"unknown","reviewed":false},"change_timestamp":"2026-09-30T21:35:15Z","content_hash":"f40a82c12ccb494e2c7e4c4c94e357da18db6e4a06e6c3b75c55742b9552b2de"}}
