better-auth is vulnerable to Improper Authentication
74
CVE Score
High
Improper Authentication
better-auth's OAuth Proxy plugin encrypts the sign-in profile, OAuth state, and the proxy's own state package all under the same key derived from the shared Better Auth secret. Anyone who can start a social sign-in can get the proxy to decrypt a payload they crafted themselves, including a fake profile for another user's verified email address, and the proxy accepts it as genuine. This lets someone without an account sign in as that user and link a provider of their choice to the account, without any action from the victim. The fix derives a distinct key per purpose (profile, proxy state package, proxy state cookie, generic OAuth state) so a payload encrypted for one purpose cannot be decrypted as another.
Upgrade the better-auth library to the patch version.
You are affected if you are using a version that falls within the vulnerable range and you use the OAuth Proxy plugin without a dedicated secret distinct from your global Better Auth secret, store sign-in state in a cookie, and have implicit account linking enabled (the default).
1.5.0 - 1.7.6
Fixed in 1.7.7better-auth is vulnerable to Improper Authentication in versions 1.5.0 - 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.