Open Redirect Affecting better-auth package, versions <1.1.21


Severity

Recommended
0.0
critical
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Open Redirect vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-BETTERAUTH-8746201
  • published25 Feb 2025
  • disclosed24 Feb 2025
  • creditCastilho

Introduced: 24 Feb 2025

New CVE NOT AVAILABLE CWE-601  (opens in a new tab)

How to fix?

Upgrade better-auth to version 1.1.21 or higher.

Overview

better-auth is a The most comprehensive authentication library for TypeScript.

Affected versions of this package are vulnerable to Open Redirect due to insufficient validation of the callbackURL parameter in the trustedOrigins configuration which allows attackers to exploit this vulnerability by crafting specially formatted URLs that bypass the trustedOrigins protection.

CVSS Scores

version 4.0
version 3.1