# CVE-2025-71403: Better Auth trustedOrigins bypass leading to account takeover

Source: https://junglewise.ai/threats/cve-2025-71403-better-auth-trustedorigins-bypass-leading-to-account-takeover  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-01. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2025-71403 · Severity: high · CVSS 7.1 · Published 2026-08-01

Better Auth is a JavaScript authentication library used to manage user login and password reset flows. A flaw in the origin validation logic allows attackers to bypass security checks and redirect users to malicious sites, potentially stealing sensitive tokens used for password reset—enabling one-click account takeover if victims click a crafted link.

Technologies: [better-auth (npm)](https://junglewise.ai/threats/technologies/better-auth). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2025-71403 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2025-71403 being exploited in the wild.

**How severe is CVE-2025-71403?** High severity, with a CVSS score of 7.1, published 1 August 2026.

**Which products and versions are affected?** better-auth (npm) SEMVER:introduced=0,fixed=1.1.21.

**Is there a fix for CVE-2025-71403?** Yes. better-auth (npm): upgrade to 1.1.21 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2025-71403 attacked?** It is attacked over the network.

**Am I affected by CVE-2025-71403?** Check whether you run better-auth (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- better-auth (npm): upgrade to 1.1.21 or later

  ```sh
  npm install better-auth@1.1.21
  ```


## Technical details

The vulnerability is an open redirect (CWE-601) caused by improper validation of the trustedOrigins configuration in Better Auth. The origin-check middleware fails to properly validate both absolute URLs and wildcard domain patterns, allowing an attacker to craft a malicious callbackURL that passes origin checks yet redirects to an attacker-controlled destination. The flaw requires user interaction (victim must click the crafted link) and is network-accessible with no authentication required. Exploitation can lead to token theft and account takeover. The issue is patched in version 1.1.21 and affects all versions up to 1.1.20.

## Affected products

- Better Auth better-auth <=1.1.20

## Identifiers

- CVE-2025-71403
- GHSA-vp58-j275-797x

## Timeline

- 2025-02-24: disclosed
- 2025-02-24: patched: patched in version 1.1.21

## References

- [https://github.com/better-auth/better-auth/security/advisories/GHSA-vp58-j275-797x](https://github.com/better-auth/better-auth/security/advisories/GHSA-vp58-j275-797x)
- [https://github.com/better-auth/better-auth/commit/b381cac7aafd6aa53ef78b6ab771ebfa24643c80](https://github.com/better-auth/better-auth/commit/b381cac7aafd6aa53ef78b6ab771ebfa24643c80)

## Related threats

- [Better Auth authentication bypass in Magic Link and OAuth](https://junglewise.ai/threats/cve-2026-114607-better-auth-is-an-authentication-and-authorization-library-for)
- [Better Auth OAuth Proxy authentication bypass](https://junglewise.ai/threats/cve-2026-110864-better-auth-from-1-5-0-beta-12-before-1-7-7-contains-an)
- [Better Auth authentication bypass via OAuth state reuse](https://junglewise.ai/threats/cve-2026-110862-better-auth-from-1-4-0-beta-18-before-1-7-7-contains-an)
- [@better-auth/drizzle-adapter: Concurrent requests can exceed rate limits on PostgreSQL](https://junglewise.ai/threats/cve-2026-110861-better-auth-better-auth-drizzle-adapter-and-better-auth-from-1-6)
- [better-auth device authorization UI misrepresentation in deviceAuthorization plugin](https://junglewise.ai/threats/cve-2026-109346-better-auth-from-1-3-8-beta-3-before-1-7-0-rc-3-contains-a-ui)
