Description
Better Auth is an authentication and authorization library for TypeScript. From 1.6.0 until 1.6.11, the deviceAuthorization plugin treats any authenticated session as the owner of any pending device code because GET /device does not claim the row and POST /device/approve and POST /device/deny short-circuit when userId is unset, allowing an authenticated attacker who learns a valid user_code to bind the polling device to the attacker's account or deny the legitimate flow. This issue is fixed in version 1.6.11.
Published: 2026-07-15
Score: 7.6 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The Better Auth library’s deviceAuthorization plugin contains a flaw that lets a logged‑in user exploit any pending device code. GET /device does not reserve the pending row, while POST /device/approve and POST /device/deny skip ownership checks when the userId is unset. Consequently, any authenticated session can bind a valid user_code to the attacker’s own account or abort the legitimate authorization flow. The impact is unauthorized access or denial of service for legitimate users, stemming from missing authorization checks (CWE‑285) and inadequate identity verification during approval (CWE‑345).

Affected Systems

Better Auth, a TypeScript authentication and authorization library, versions 1.6.0 through 1.6.11 are affected. The vulnerability is present in the deviceAuthorization plugin used by applications that implement OAuth2‑style device authorization flows.

Risk and Exploitability

The CVSS score of 7.6 indicates a high severity vulnerability, while the EPSS score of less than 1% suggests exploitation is currently rare. The flaw is not listed in the CISA KEV catalog, but attackers can still exploit it remotely by accessing the /device, /device/approve, and /device/deny endpoints, provided they obtain a valid, pending user_code and have an authenticated session. Successful exploitation would allow the attacker to bind the code to their account or deny the legitimate flow, yielding unauthorized access or denial of service.

Generated by OpenCVE AI on July 31, 2026 at 03:09 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Better Auth to version 1.6.11 or later to address the vulnerability.
  • Revoke or delete any existing pending device authorization codes to eliminate residual risk.
  • Enforce strict access control on the device endpoints: require that POST /device/approve and POST /device/deny be accompanied by a verified userId and that only users with the appropriate privileges can invoke them.
  • If possible, restrict network access to the device endpoints to trusted IP ranges or internal networks and enable detailed logging to detect anomalous authorization attempts.

Generated by OpenCVE AI on July 31, 2026 at 03:09 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-cq3f-vc6p-68fh Better Auth: Device authorization approve and deny accept any authenticated session while the user code is pending
History

Wed, 15 Jul 2026 22:30:00 +0000

Type Values Removed Values Added
First Time appeared Better-auth
Better-auth better Auth
Vendors & Products Better-auth
Better-auth better Auth

Wed, 15 Jul 2026 18:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Wed, 15 Jul 2026 18:00:00 +0000

Type Values Removed Values Added
Description Better Auth is an authentication and authorization library for TypeScript. From 1.6.0 until 1.6.11, the deviceAuthorization plugin treats any authenticated session as the owner of any pending device code because GET /device does not claim the row and POST /device/approve and POST /device/deny short-circuit when userId is unset, allowing an authenticated attacker who learns a valid user_code to bind the polling device to the attacker's account or deny the legitimate flow. This issue is fixed in version 1.6.11.
Title Better Auth: Device authorization approve and deny accept any authenticated session while the user code is pending
Weaknesses CWE-285
CWE-345
References
Metrics cvssV3_1

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


Subscriptions

Better-auth Better Auth
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-15T18:02:58.506Z

Reserved: 2026-05-11T21:40:08.176Z

Link: CVE-2026-45337

cve-icon Vulnrichment

Updated: 2026-07-15T18:02:48.243Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-31T03:15:04Z

Weaknesses
  • CWE-285

    Improper Authorization

  • CWE-345

    Insufficient Verification of Data Authenticity