Packages / better-auth / Security
Better Auth allows bypassing the trustedOrigins Protection which leads to ATO
Affected releases · better-auth
- 1.x1.0.0 – 1.1.20Fixed in 1.1.21
- 0.8.x and older0.0.1 – 0.8.8No fix, no longer updated
On 1.x, the newest line:
npm install better-auth@1.1.21Affected
1.0.0 – 1.1.20
43 releases
Fixed
1.1.21 – 1.7.12
126 releases, latest
Affected
0.0.1 – 0.8.8
61 releases
Is your project affected?
Paste your package.json, or type the range you declare for better-auth. It is read in your browser and sent nowhere.
What happens
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.