@better-auth/kysely-adapter is vulnerable to Race Condition (TOCTOU)
59
CVE Score
Medium
Race Condition (TOCTOU)
The Kysely adapter's guarded delete and update paths select matching row IDs under the caller supplied guard condition, then write to those IDs without re-checking the guard. A concurrent write to the same row between the select and the write can change which rows still match the guard, so the write runs against the now stale IDs and bypasses the condition it was meant to enforce. The fix re-applies the guard to the final delete and update query so it is checked again against the row's current state.
Upgrade the @better-auth/kysely-adapter library to the patch version.
You are affected if you are using a version that falls within the vulnerable range and concurrent requests can modify the same guarded record through the Kysely adapter.
0.0.1 - 1.7.6
Fixed in 1.7.7@better-auth/kysely-adapter is vulnerable to Race Condition (TOCTOU) in versions 0.0.1 - 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.