CVE-2026-41427
mediumpriority · track · 26OT risk · elevatedEPSS 0.002 · 11 %ileEUUSEPSS · scored 2026-10-27
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.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · medium–high · 4.9–7.1
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (9)
Products and version ranges known to be affected.
- better-auth better-auth/oauth-provider= 1.4.8nvdUScpe:2.3:a:better-auth:better-auth\/oauth-provider:*:*:*:*:*:*:*:*
- better-auth better-auth/oauth-provider1.4.9 → 1.6.5nvdUScpe:2.3:a:better-auth:better-auth\/oauth-provider:*:*:*:*:*:*:*:*
- better-auth better-auth/oauth-provider= 1.7.0nvdUScpe:2.3:a:better-auth:better-auth\/oauth-provider:*:*:*:*:*:*:*:*
- npm @better-auth/oauth-provider1.7.0-beta.0 → 1.7.0-beta.1osvUSpkg:npm/%40better-auth/oauth-provider
advisories (1)
Vendor and ecosystem advisories describing this.
- GHSA-xr8f-h2gw-9xh6OAuth 2.1 Provider: Unprivileged users can register OAuth clients2026-04-16ghsa · osvUS
### Am I affected? You're affected if all of the following are true: - Using @better-auth/oauth-provider at version specified below - You configured clientPrivileges in the plugin options expecting it to gate who can create OAuth clients - The /oauth2/create-client or /admin/oauth2/create-client endpoints are reachable by authenticated users you don't fully trust If clientPrivileges is not configured, this bug has no security consequence for your deployment --- ### Summary 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. Non-create operations (read, list, update, delete, rotate) enforced the hook correctly. Only the create path was missing the check. ### Impact - Unauthorized registration of OAuth clients by any authenticated user, under deployments that expected clientPrivileges to block them. - Attacker-controlled redirect_uris on those clients enable phishing flows that present as registered first-party applications. - If the SERVER_ONLY admin creation endpoint is also exposed to low-privilege users (a separate deployment misconfiguration), additional sensitive fields including `skip_consent` become writable. ### Patches Fixed in `@better-auth/oauth-provider@1.6.5` Both create endpoints now call the clientPrivileges hook with action "create" before persisting the client record. ### Workarounds If you cannot upgrade immediately: - Block the /oauth2/create-client and /admin/oauth2/create-client routes at your reverse proxy or middleware layer for any user who should not be able to register clients. - Do not expose the admin creation endpoint (it is SERVER_ONLY by design and should not be reachable by end-user sessions).
also known as (2)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (5)
External citations — patches, advisories, analysis.
- https://access.redhat.com/security/cve/cve-2026-41427cnnvd
- https://github.com/better-auth/better-auth/releasesPatchcnnvd
- https://nvd.nist.gov/vuln/detail/CVE-2026-41427cnnvd
- https://github.com/better-auth/better-auth/security/advisories/GHSA-xr8f-h2gw-9xh6enisa_euvd
- https://github.com/better-auth/better-auth/security/advisories/GHSA-xr8f-h2gw-9xh6MitigationVendor Advisorynvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan