Vulnerability DatabaseGHSA-hwq2-v29r-p69r

GHSA-hwq2-v29r-p69r: 
Better Auth vulnerability analysis and mitigation

Am I affected?

You are affected if you use better-auth 1.4.0 or later with all of these:

  • user.changeEmail.enabled is turned on.
  • emailVerification.sendVerificationEmail is configured.
  • A new user can register an address after its previous owner moves to another one.

Summary

An email change link recorded the old and new addresses, but not the user who asked for the change. If someone else registered the old address while the link was still valid, opening the link acted on that person's account.

Impact

A user who controls the addresses involved can take over an account that later registers their released old address, using a link issued for their own account. They get a session for that account, and its email changes to an address they control. The attack needs the victim to register the released address while one of the attacker's links is still valid.

Patches

Upgrade better-auth to 1.7.16, or to 1.8.0-beta.5 on the beta line. Email verification and change links now work only for the account they were issued to. Opening a change link no longer signs the user in, and it marks the new address verified only if the current one was verified.

Workarounds

Turn off user-initiated email changes until you upgrade. A lower emailVerification.expiresIn shortens the window but does not stop the attack.

Technical details

The change link carried the old and new addresses. Without a session, Better Auth looked up the account that owned the old address at that moment, created a session for it, and changed its email. The link now carries the requesting user's ID and is rejected for any other account.


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