High

Better Auth has an Open Redirect Vulnerability in Verify Email Endpoint

  • Disclosed: 30.12.2024
  • Updated: 11.10.2026 10:22

Summary

An open redirect vulnerability has been identified in the verify email endpoint of Better Auth, potentially allowing attackers to redirect users to malicious websites. This issue affects users relying on email verification links generated by the library.

Affected Versions

  • All versions prior to v1.1.6.

Impact

Attackers could craft malicious email verification links that exploit the redirect functionality to send users to untrusted domains. This can result in:

  • Phishing attacks – Users may unknowingly enter sensitive information on fake login pages.
  • Reputation damage – Trust issues for applications using Better Auth.

Vulnerability Details

The verify email callback endpoint accepts a callbackURL parameter. Unlike other verification methods, email verification only uses JWT to verify and redirect without proper validation of the target domain. The origin checker is bypassed in this scenario because it only checks for POST requests. An attacker can manipulate this parameter to redirect users to arbitrary URLs controlled by the attacker.

Example Exploit:

https://example.com/auth/verify-email?token=abcd1234&callbackURL=https://malicious-site.com

Patches

Upgrade to Better Auth v1.1.6 or later. This version enforces domain validation for callbackURL for /verify-email path and for all other GET endpoints.

Workarounds

You can also use hooks to pre-check URLs in your auth instance to prevent this without upgrading:

ts
const auth = betterAuth({
    hooks: {
         before: (ctx) => {
            if (ctx.path === "/verify-email") {
               const callbackURL = ctx.query.callbackURL; // Check if this is a trusted callback URL or not
            }
         }
    }
})

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
npm package better-auth < 1.1.6 1.1.6

References

CVSS score -
CVSS vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H
Weakness (CWE)
CWE-601
Platform
npm
Package
better-auth
Disclosed
30.12.2024
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-8jhw-6pjj-8723 - CC BY 4.0

Vulnerability history: better-auth

All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (22) in the archive
Total entries
22
First → latest
12.2024 07.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • Critical 2
  • High 14
  • Medium 3
  • Low 3

Disclosures per year

  1. 2024: 1
  2. 2025: 8
  3. 2026: 13
Severity:
  1. High · 8.3 CVE-2026-67327 >= 1.1.3, < 1.6.22, >= 1.7.0-beta.0, < 1.7.0-beta.10 1.6.22, 1.7.0-beta.10
  2. High · 8.1 CVE-2026-53517 >= 1.4.8-beta.7, < 1.6.0 1.6.0
  3. High · 7.7 CVE-2026-67333 < 1.6.13, >= 1.7.0-beta.0, < 1.7.0-beta.4 1.6.13, 1.7.0-beta.4
  4. High · 7.3 CVE-2026-45364 < 1.4.17, >= 1.5.0-beta.1, < 1.5.0-beta.9 1.4.17, 1.5.0-beta.9
  5. Better Auth has an Open Redirect Vulnerability in Verify Email Endpoint this entry
    High CVE-2024-56734 < 1.1.6 1.1.6

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.