Description
Better Auth is an authentication and authorization library for TypeScript. Prior to 1.6.5, the clientPrivileges option documents a create action, but the OAuth client creation endpoints did not invoke the hook before persisting new clients. Deployments that configured clientPrivileges to restrict client registration were not actually restricted — any authenticated user could reach the create endpoints and register an OAuth client with attacker-chosen redirect URIs and metadata. This vulnerability is fixed in 1.6.5.
Published: 2026-04-24
Score: 7.1 High
EPSS: < 1% Very Low
KEV: No
Impact: Unrestricted OAuth client registration by authenticated users
Action: Immediate Patch
AI Analysis

Impact

The vulnerability arises because the clientPrivileges hook—intended to restrict OAuth client creation based on configured permissions—is never invoked before persisting new clients. This issue represents a CWE-863 vulnerability, reflecting an authorization bypass through user-controlled input. Consequently, any authenticated user can call the create endpoints and register a client with attacker‑chosen redirect URLs and metadata. This allows the attacker to craft a malicious OAuth client that can harvest authorization codes, redirect users to phishing sites, or otherwise compromise the integrity of the OAuth flow.

Affected Systems

The affected product is Better Auth, an authentication and authorization library for TypeScript, including its oauth-provider module. All releases prior to 1.6.5 are affected; version 1.6.5 and later contain the fix.

Risk and Exploitability

The CVSS base score is 7.1, indicating medium to high severity, while the EPSS score is less than 1 %, pointing to a low likelihood of exploitation at present. The issue is not listed in the CISA KEV catalog. The flaw can be exploited only by authenticated users who can access the OAuth client registration endpoints, which means that an internal actor or an attacker who has compromised credentials could register malicious clients. Such a client can redirect auth codes to attacker‑controlled endpoints, effectively hijacking user sessions or credential grants. The recommendation is to apply the library update, enforce the clientPrivileges setting, and audit existing client registrations for anomalous redirect URIs.

Generated by OpenCVE AI on April 28, 2026 at 13:34 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the Better Auth library to version 1.6.5 or newer.
  • Confirm that the clientPrivileges configuration is enabled so that OAuth client registrations are subject to the intended permission checks.
  • Audit all existing OAuth client registrations for unexpected redirect URIs and remove or reconfigure any that appear malicious before deploying the update.

Generated by OpenCVE AI on April 28, 2026 at 13:34 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-xr8f-h2gw-9xh6 OAuth 2.1 Provider: Unprivileged users can register OAuth clients
History

Wed, 13 May 2026 19:45:00 +0000

Type Values Removed Values Added
First Time appeared Better-auth better-auth\/oauth-provider
CPEs cpe:2.3:a:better-auth:better-auth\/oauth-provider:*:*:*:*:*:node.js:*:*
cpe:2.3:a:better-auth:better-auth\/oauth-provider:1.4.8:-:*:*:*:node.js:*:*
cpe:2.3:a:better-auth:better-auth\/oauth-provider:1.4.8:beta7:*:*:*:node.js:*:*
cpe:2.3:a:better-auth:better-auth\/oauth-provider:1.7.0:beta0:*:*:*:node.js:*:*
Vendors & Products Better-auth better-auth\/oauth-provider
Metrics cvssV3_1

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


Tue, 28 Apr 2026 09:45:00 +0000

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

Mon, 27 Apr 2026 15:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Fri, 24 Apr 2026 19:45:00 +0000

Type Values Removed Values Added
Description Better Auth is an authentication and authorization library for TypeScript. Prior to 1.6.5, the clientPrivileges option documents a create action, but the OAuth client creation endpoints did not invoke the hook before persisting new clients. Deployments that configured clientPrivileges to restrict client registration were not actually restricted — any authenticated user could reach the create endpoints and register an OAuth client with attacker-chosen redirect URIs and metadata. This vulnerability is fixed in 1.6.5.
Title Better Auth OAuth 2.1 Provider: Unprivileged users can register OAuth clients
Weaknesses CWE-863
References
Metrics cvssV4_0

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


Subscriptions

Better-auth Better-auth\/oauth-provider Better Auth Oauth-provider
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-04-27T13:42:23.885Z

Reserved: 2026-04-20T15:32:33.814Z

Link: CVE-2026-41427

cve-icon Vulnrichment

Updated: 2026-04-27T13:42:19.429Z

cve-icon NVD

Status : Analyzed

Published: 2026-04-24T20:16:27.390

Modified: 2026-05-13T19:36:38.053

Link: CVE-2026-41427

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-04-28T13:45:06Z

Weaknesses