Intel

AIKIDO-2026-358616

better-auth is vulnerable to Improper Authentication

GHSA-r4xp-prcw-77qfPublished Oct 14, 2026
October 14, 2026

74

CVE Score

High

Improper Authentication

Are you affected? Scan for Free

TL;DR

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.

How do I fix this?

Upgrade the better-auth library to the patch version.

Who does this affect?

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).

Versions

1.5.0 - 1.7.6

Fixed in 1.7.7

Background info

better-auth is vulnerable to Improper Authentication in versions 1.5.0 - 1.7.6.

Get secure today,
quickly and for free.

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.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea