Incorrect Authorization Affecting better-auth package, versions <1.6.11


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.28% (20th 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 Incorrect Authorization vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-BETTERAUTH-17889816
  • published8 Jul 2026
  • disclosed7 Jul 2026
  • creditsubhan umer

Introduced: 7 Jul 2026

CVE-2026-53512  (opens in a new tab)
CWE-306  (opens in a new tab)
CWE-863  (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 Incorrect Authorization in the refresh_token grant process of the legacy oidcProvider and mcp plugins, where confidential clients are not required to authenticate using their client_secret. An attacker can gain unauthorized access to user resources and impersonate confidential clients by obtaining a valid refresh_token and the associated public client_id. This allows indefinite minting of access tokens and refresh tokens until the chain is revoked or expires.

** Note:** This is only exploitable if the application uses either the oidcProvider or mcp plugins with at least one confidential OAuth client registered and does not enforce PKCE for all clients.

Workaround

This vulnerability can be mitigated by migrating to @better-auth/oauth-provider, forcing all clients to public with PKCE, restricting token endpoints to known client IPs at the network layer, performing out-of-band refresh-token rotation, or narrowing the CORS allowlist for the affected endpoints.

CVSS Base Scores

version 4.0
version 3.1