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… (CVE-2026-67335)
better-auth versions before 1.6.2 contain a vulnerability where the OAuth state parameter is not properly validated against the stored nonce when using cookie-backed state storage without PKCE. This flaw allows attackers to forge the state parameter and supply an attacker-controlled authorization code, potentially creating authenticated sessions tied to the attacker's identity or linking attacker accounts to victim profiles. The vulnerability has a CVSS score of 5.3, indicating medium severity.
AI Analysis
Technical Summary
The vulnerability in better-auth prior to version 1.6.2 involves a failure to validate the OAuth state parameter against the stored nonce when cookie-backed state storage is used without PKCE. This improper validation enables attackers to forge the state parameter and supply an attacker-controlled authorization code, which can result in authenticated sessions bound to the attacker’s external identity or persistent linkage of attacker accounts to victim profiles. The issue is categorized under CWE-287 (Improper Authentication) and has a CVSS 3.1 base score of 5.3 (medium severity). There are no known exploits in the wild and no patch links or vendor advisories currently provided.
Potential Impact
An attacker exploiting this vulnerability can bypass proper OAuth state validation, allowing them to create authenticated sessions associated with their own external identity or link attacker-controlled accounts to victim profiles. This compromises the integrity of the authentication process, potentially leading to unauthorized access or account linkage. There is no indication of confidentiality or availability impact, and no known active exploitation.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Since no official patch or fix is referenced, users should monitor for vendor updates and consider implementing PKCE (Proof Key for Code Exchange) if supported, as the vulnerability specifically affects cookie-backed state storage without PKCE. Avoid using vulnerable versions of better-auth until a fix is confirmed.
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… (CVE-2026-67335)
Description
better-auth versions before 1.6.2 contain a vulnerability where the OAuth state parameter is not properly validated against the stored nonce when using cookie-backed state storage without PKCE. This flaw allows attackers to forge the state parameter and supply an attacker-controlled authorization code, potentially creating authenticated sessions tied to the attacker's identity or linking attacker accounts to victim profiles. The vulnerability has a CVSS score of 5.3, indicating medium severity.
CVSS v3.1
Score 5.3medium
Affected software
pkg:github/better-auth/better-authRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in better-auth prior to version 1.6.2 involves a failure to validate the OAuth state parameter against the stored nonce when cookie-backed state storage is used without PKCE. This improper validation enables attackers to forge the state parameter and supply an attacker-controlled authorization code, which can result in authenticated sessions bound to the attacker’s external identity or persistent linkage of attacker accounts to victim profiles. The issue is categorized under CWE-287 (Improper Authentication) and has a CVSS 3.1 base score of 5.3 (medium severity). There are no known exploits in the wild and no patch links or vendor advisories currently provided.
Potential Impact
An attacker exploiting this vulnerability can bypass proper OAuth state validation, allowing them to create authenticated sessions associated with their own external identity or link attacker-controlled accounts to victim profiles. This compromises the integrity of the authentication process, potentially leading to unauthorized access or account linkage. There is no indication of confidentiality or availability impact, and no known active exploitation.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Since no official patch or fix is referenced, users should monitor for vendor updates and consider implementing PKCE (Proof Key for Code Exchange) if supported, as the vulnerability specifically affects cookie-backed state storage without PKCE. Avoid using vulnerable versions of better-auth until a fix is confirmed.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-4hp3-gxv8-7g37
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-67335"]
- Ecosystems
- []
- Database Specific Severity
- MODERATE
- Cvss Version
- 3.1
Threat ID: 6a6e6292bf32cb7a344f5efe
Added to database: 08/01/2026, 21:18:10 UTC
Last enriched: 08/01/2026, 21:20:28 UTC
Last updated: 08/02/2026, 01:04:17 UTC
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.