VDB
KO
HIGH 7.1

GHSA-vp58-j275-797x

Better Auth allows bypassing the trustedOrigins Protection which leads to ATO

Quick fix

GHSA-vp58-j275-797x — better-auth: upgrade to the fixed version with the command below.

npm install better-auth@1.1.21

Details

### Summary

A bypass was discovered in the trustedOrigins validation logic—affecting both absolute URL entries and wildcard domain patterns. This flaw allows an attacker to construct a malicious callbackURL that passes origin checks and triggers an open redirect.

Because redirect endpoints include sensitive tokens (such as password-reset tokens), this vulnerability can enable one-click account takeover if a victim clicks a crafted link.

Are you affected?

Enter the version of the package you're using.

Affected packages

npm / better-auth
Introduced in: 0 Fixed in: 1.1.21
Fix npm install better-auth@1.1.21

References