CVE-2026-67335

better-auth before 1.6.2 OAuth State Validation Bypass

Published Aug 1, 2026 CVSS 4.0 · 6 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

The vulnerability in better‑auth before version 1.6.2 allows an attacker to bypass OAuth state parameter validation when cookie‑backed state storage is used without PKCE. This bypass lets an adversary forge the state value and supply an attacker‑controlled authorization code, thereby creating authenticated sessions that the victim believes belong to themselves. The attacker can also persistently link their own external identity to the victim’s profile, enabling ongoing impersonation or account takeover. The weakness is classified as CWE‑287 (Improper Authentication).

Affected Systems

The affected product is better‑auth (OAuth‑Provider) for Node.js. All releases prior to 1.6.2 are impacted, and the issue is specific to deployments that use cookie‑backed state without PKCE enabled.

Risk and Exploitability

The CVSS score of 6 indicates a medium severity for this flaw. EPSS data is not available and the vulnerability is not listed in the CISA KEV catalog. The likely attack vector is remote, requiring the attacker to craft or modify an OAuth request to the target server. By forging the state parameter during the authorization code flow, the attacker can redirect a legitimate authorization grant to themselves, resulting in unauthorized session creation or cross‑account linking. No special privileges or local access are needed beyond ability to influence the OAuth request.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade better‑auth to version 1.6.2 or later, which includes proper OAuth state validation.
  • If an upgrade is not immediately possible, enable PKCE for all OAuth flows to mitigate the state validation bypass.
  • Once PKCE is in place, implement strict checks that the state value received in the callback matches a nonce stored for the session, ensuring the value is not forged or reused.

Generated by OpenCVE AI on August 2, 2026 at 03:13 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Better-auth better Auth
Vendors & Products Better-auth better Auth
Type Values Removed Values Added
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.
Title better-auth before 1.6.2 OAuth State Validation Bypass
First Time appeared Better-auth
Better-auth better-auth\/oauth-provider
Weaknesses CWE-287
CPEs cpe:2.3:a:better-auth:better-auth\/oauth-provider:*:*:*:*:*:node.js:*:*
Vendors & Products Better-auth
Better-auth better-auth\/oauth-provider
References
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N'}

cvssV4_0

{'score': 6, 'vector': 'CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Aug 3, 2026, 3:38 PM
Reserved
Jul 29, 2026, 1:07 PM
Status
Deferred
Published
Aug 1, 2026, 1:17 PM
Modified
Sep 8, 2026, 8:34 PM