Better Auth allows bypassing the trustedOrigins Protection which leads to ATO
Affects better-authSource GCVE Database
CVSS 7.1 High : upgrade to 1.1.21 soon.
Data as of 27 Nov 2026, 04:49 UTC
- Patch
- Available – fixed in 1.1.21
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:NWhat to do
Upgrade better-auth to 1.1.21.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| npmbetter-auth | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A patch is available in Better Auth version 1.1.21 that fixes the trustedOrigins validation bypass. Users and administrators should upgrade to version 1.1.21 or later to remediate this vulnerability. No additional mitigation steps are indicated beyond applying the official fix.
Description
A vulnerability in Better Auth prior to version 1.1.21 allows bypassing the trustedOrigins validation logic. This flaw affects both absolute URL entries and wildcard domain patterns, enabling attackers to craft malicious callback URLs that pass origin checks and trigger open redirects. Because redirect endpoints include sensitive tokens such as password-reset tokens, this can lead to one-click account takeover if a victim clicks a crafted link.
References
- github.com/better-auth/better-auth/security/advisories/GHSA-vp58-j275-797x (opens in a new tab)
- github.com/better-auth/better-auth/commit/b381cac7aafd6aa53ef78b6ab771ebfa24643c80 (opens in a new tab)
- github.com/better-auth/better-auth (opens in a new tab)
- github.com/better-auth/better-auth/blob/ddebd0358d74376ea64541512d0167dd4377f182/packages/better-auth/src/api/middlewares/origin-check.ts (opens in a new tab)