Improper Authorization Affecting better-auth package, versions >=1.6.0 <1.6.11


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Social Trends
EPSS
0.14% (4th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Improper Authorization vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-BETTERAUTH-17173857
  • published5 Jun 2026
  • disclosed4 Jun 2026
  • creditQuikturn Security Team

Introduced: 4 Jun 2026

CVE-2026-45337  (opens in a new tab)
CWE-285  (opens in a new tab)

How to fix?

Upgrade better-auth to version 1.6.11 or higher.

Overview

better-auth is a The most comprehensive authentication library for TypeScript.

Affected versions of this package are vulnerable to Improper Authorization in the deviceAuthorization plugin. An attacker can gain unauthorized access to a device or deny legitimate user sign-in by submitting a valid user_code from any authenticated session before the legitimate user completes verification.

Note:

This is only exploitable if the deviceAuthorization plugin is enabled and a third party can observe a pending user code before the legitimate user completes verification.

Workaround

This vulnerability can be mitigated by disabling the plugin if device flow is not used, adding a before hook on POST /device/approve and POST /device/deny to enforce session ownership, or shortening the pending lifetime of device codes via the expiresIn plugin option.

CVSS Base Scores

version 4.0
version 3.1