Skip to main content

CVE-2026-41427 — Vulnerability in @better-auth/oauth-provider

HIGH

OAuth 2.1 Provider: Unprivileged users can register OAuth clients

Published April 16, 2026Updated May 5, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.38%). Schedule for your next planned update.

Does your project use an affected @better-auth/oauth-provider version?

Paste your package-lock.json to check it for CVE-2026-41427 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my package-lock.json

Summary

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).

Advisory Timeline

  • First published April 16, 2026 (224 days ago).
  • Last revised May 5, 2026 — 19 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

npm
Update @better-auth/oauth-provider to 1.6.5 or later
npm install @better-auth/oauth-provider@1.6.5

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: npm (1).

PackageFixed In
@better-auth/oauth-provider npm · Affected: All versionsRange-based data available
@better-auth/oauth-provider npm · Affected: All versions1.6.5

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-863
    Incorrect AuthorizationMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 8.5 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
—
Confidentiality
—
Integrity
—
Availability
—

CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:H/VA:N/SC:L/SI:H/SA:N

Frequently Asked Questions

What is CVE-2026-41427?
OAuth 2.1 Provider: Unprivileged users can register OAuth clients. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.5/10).
How do I check if my project is affected by CVE-2026-41427?
CVE-2026-41427 affects @better-auth/oauth-provider. It has a 0.4% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-41427 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
8.5

Significant impact if exploited, or exploitable with modest effort.

EPSS Score (30-day exploit probability)
0.38%
EPSS percentile: 24.1

This is a below-median EPSS score — only 24.1% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.

Also Known As

GHSA-xr8f-h2gw-9xh6

Related CVEs

  • CVE-2026-53513
    CRITICAL

    @better-auth/sso provider registration has server-side request forgery via unvalidated OIDC endpoints

  • CVE-2026-67330
    CRITICAL

    @better-auth/scim: account takeover and stale access via SCIM provider-id collision

  • CVE-2026-83816
    HIGH

    CodeWhale: exec_shell parallel-readonly classifier auto-approves fd/rg/git grep exec flags enabling silent RCE

  • CVE-2026-83817
    HIGH

    CodeWhale: Automation auto_approve defaults to true, bypassing the task-path hardening fix for silent recurring agent execution

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my package-lock.json