better-auth before 1.6.2 OAuth State Validation Bypass
better-auth
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| better-auth npm |
|
|
Original description
better-auth versions before 1.6.2 fail to validate the OAuth state parameter against the stored nonce when using cookie-backed state storage without PKCE. Attackers can forge the state parameter and supply an attacker-controlled authorization code to create authenticated sessions bound to the attacker's external identity or persistently link attacker accounts to victim profiles.
From the CVE record · VulnCheck
References
- github.com/better-auth/better-auth/security/advisories/GHSA-wxw3-q3m9-c3jr
- vulncheck.com/advisories/better-auth-before-oauth-state-validation-bypass
- github.com/CVEProject/cvelistV5/tree/main/cves/2026/67xxx/CVE-2026-67335.json
- nvd.nist.gov/vuln/detail/CVE-2026-67335
- github.com/better-auth/better-auth/issues/8897
- github.com/better-auth/better-auth/pull/8949
- github.com/better-auth/better-auth/commit/9deb7936aba7931f2db4b460141f476508f11bfd
- github.com/better-auth/better-auth