Skip to main content

CVE-2024-56734 — Vulnerability in better-auth — CVE Details

HIGH

Better Auth has an Open Redirect Vulnerability in Verify Email Endpoint

Published December 30, 2024Updated February 4, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.55%). Schedule for your next planned update.

Does your project use an affected better-auth version?

Paste your package-lock.json to check it for CVE-2024-56734 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my package-lock.json

Summary

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:

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

Advisory Timeline

  • First published December 30, 2024 (697 days ago).
  • Last revised February 4, 2026 — 400 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

npm
Update better-auth to 1.1.6 or later
npm install better-auth@1.1.6

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: npm (1).

PackageFixed In
better-auth npm · Affected: All versions1.1.6

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 10.0 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
—
Confidentiality
—
Integrity
—
Availability
—

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

Frequently Asked Questions

What is CVE-2024-56734?
Better Auth has an Open Redirect Vulnerability in Verify Email Endpoint. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 10.0/10).
How do I check if my project is affected by CVE-2024-56734?
CVE-2024-56734 affects better-auth. It has a 0.6% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-56734 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
10.0

Maximum impact if exploited, often with little effort or access required.

EPSS Score (30-day exploit probability)
0.55%
EPSS percentile: 39.9

This is a below-median EPSS score — only 39.9% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.

Also Known As

GHSA-8jhw-6pjj-8723

Related CVEs

  • CVE-2026-110862
    CRITICAL

    better-auth: OAuth state can be used as a Magic Link to sign in as another user

  • CVE-2026-53512
    CRITICAL

    Better Auth: OAuth refresh-token replay via missing client authentication on oidc-provider and mcp plugins

  • CVE-2026-83816
    HIGH

    CodeWhale: exec_shell parallel-readonly classifier auto-approves fd/rg/git grep exec flags enabling silent RCE

  • CVE-2025-71401
    HIGH

    Better Auth affected by external request basePath modification DoS

  • CVE-2026-83817
    HIGH

    CodeWhale: Automation auto_approve defaults to true, bypassing the task-path hardening fix for silent recurring agent execution

  • CVE-2026-67336
    HIGH

    Better Auth has insecure cryptographic defaults in oidcProvider: alg=none advertised and plain PKCE accepted by default

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my package-lock.json