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

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). 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
    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

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.