Vulnerability DatabaseGHSA-c85h-5mrr-mgx4

GHSA-c85h-5mrr-mgx4: 
Better Auth vulnerability analysis and mitigation

Am I affected?

You are affected if you use the organization plugin from better-auth 1.5.5 or later, and a role other than the creator role can create invitations. With the default roles, organization admins can. You are not affected if only the creator role (owner by default) can create invitations.

Summary

The organization plugin stops members who are not owners from inviting someone as an owner. A role value with extra whitespace passed this check, so an admin could invite an account they control as an owner.

Impact

An organization admin, or another non-creator role that can invite, can create a real owner account in the same organization. That owner can delete the organization and remove the original owners. The escalation stays inside an organization where the attacker can already invite members.

Patches

Upgrade better-auth to 1.7.16, or to 1.8.0-beta.5 on the beta line. Role lists are now trimmed and split on commas wherever they are stored or compared, and invitations with an empty role are rejected.

Workarounds

Remove the invite permission from every role except the creator role, or reject invitation roles with leading or trailing whitespace before they reach Better Auth. Audit existing invitations and memberships for role values that change when trimmed. Do not trim them in place: trimming admin, owner makes that member a real owner. Review owners invited by such members.

Technical details

The creator role check compared the raw role string, while later checks split and trimmed it. A value such as " owner" passed the first check and became owner when the invitation was accepted.


Source: NVD

Related Better Auth vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-g95c-wqvr-8c3jMEDIUM6.8
  • Better Auth logoBetter Auth
  • better-auth
NoYesNov 03, 2026
GHSA-hwq2-v29r-p69rMEDIUM6.4
  • Better Auth logoBetter Auth
  • better-auth
NoYesNov 03, 2026
GHSA-c85h-5mrr-mgx4MEDIUM4.9
  • Better Auth logoBetter Auth
  • better-auth
NoYesNov 03, 2026
GHSA-fvxx-76fc-893xMEDIUM4.2
  • JavaScript logoJavaScript
  • @better-auth/passkey
NoYesNov 03, 2026
GHSA-gv75-j3v8-3crmLOW3.1
  • JavaScript logoJavaScript
  • @better-auth/passkey
NoYesNov 03, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management