# CVE-2026-41427: Better Auth OAuth 2.1 Provider: Unprivileged users can register OAuth clients

> Authenticated users can bypass client registration restrictions to register OAuth clients with arbitrary redirect URIs, enabling potential account takeover or phishing.

- **Severity:** High 7.1 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 24 Apr 2026
- **Updated:** 27 Apr 2026
- **Also known as:** GHSA-xr8f-h2gw-9xh6

## What is CVE-2026-41427?

CVE-2026-41427 is a high-severity missing authorization vulnerability in better-auth, published on 24 Apr 2026. Any signed-in user can exploit it over the network, with no action from the victim.

### Official 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.

Weakness: CWE-863 (Incorrect Authorization)

## Which versions are affected by CVE-2026-41427?

4 open source packages ship an affected version, including @better-auth/oauth-provider. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@better-auth/oauth-provider` | npm | From 1.4.8-beta.7 | 1.6.5 |
| `@better-auth/oauth-provider` | npm | From 1.4.8-beta.7 | 1.6.5 |
| `@better-auth/oauth-provider` | npm | From 1.7.0-beta.0 to 1.7.0-beta.1 | None |
| `@better-auth/oauth-provider` | npm | From 1.7.0-beta.0 to 1.7.0-beta.1 | None |

Products: Better-Auth Better-Auth\/Oauth-Provider.

## How do I fix CVE-2026-41427?

Upgrade @better-auth/oauth-provider to 1.6.5 or later.

## Is CVE-2026-41427 being exploited?

There is no known exploitation of CVE-2026-41427 in the wild and no public exploit code.

## Other vulnerabilities in better-auth

- [CVE-2026-53517](https://insights.sbomify.com/CVE-2026-53517/): Better Auth OAuth Provider: Refresh Token Rotation Race Condition Allows Concurrent Replay and Token Family Forking (high 8.1)
- [CVE-2026-53518](https://insights.sbomify.com/CVE-2026-53518/): Better Auth OAuth Provider: Race Condition in Authorization Code Exchange Enables Multi-Use Code Redemption (high 7.6)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-41427 and fix it if it is affected.

What it is: CVE-2026-41427 is a high-severity missing authorization vulnerability in better-auth, published on 24 Apr 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-41427 in the wild and no public exploit code.

Affected packages and fixed versions:
- @better-auth/oauth-provider (npm): affected from 1.4.8-beta.7; fixed in 1.6.5
- @better-auth/oauth-provider (npm): affected from 1.4.8-beta.7; fixed in 1.6.5
- @better-auth/oauth-provider (npm): affected from 1.7.0-beta.0 up to 1.7.0-beta.1; no fix listed
- @better-auth/oauth-provider (npm): affected from 1.7.0-beta.0 up to 1.7.0-beta.1; no fix listed

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-41427/ (Markdown: https://insights.sbomify.com/CVE-2026-41427/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-41427
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-41427
- OSV: https://osv.dev/vulnerability/CVE-2026-41427

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-41427/
Summaries are generated and may contain mistakes; the official description above is the record.
