Intel

AIKIDO-2026-32209

better-auth is vulnerable to Improper Input Validation

Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Jun 19, 2026
June 19, 2026

59

CVE Score

Medium

Improper Input Validation

Are you affected? Scan for Free

TL;DR

The experimental oauthPopup plugin merges caller-supplied additionalData into OAuth state without stripping reserved internal keys such as callbackURL and codeVerifier. An attacker who can influence the popup start request can inject those fields and tamper with the OAuth flow. Before the fix, reserved keys from additionalData were accepted into server-side OAuth state. The fix filters INTERNAL_STATE_KEYS so only custom application data is stored.

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 have enabled the experimental oauthPopup plugin.

Versions

1.6.17 - 1.6.18

Fixed in 1.6.19

Background info

better-auth is vulnerable to Improper Input Validation in versions 1.6.17 - 1.6.18.

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