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

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

Advisory Timeline

  • First published December 30, 2024 (651 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, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: npm (1).

PackageEcosystemAffectedFixed In
better-auth
npm
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. 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

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-8jhw-6pjj-8723

Related CVEs

  • CVE-2026-53512
    CRITICAL

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

  • CVE-2025-71401
    HIGH

    Better Auth affected by external request basePath modification DoS

  • CVE-2026-67336
    HIGH

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

  • CVE-2026-107375
    HIGH

    JHipster: SQL Injection in the Parameter of JHipster-Generated Reactive (WebFlux + R2DBC) Applicationssort

  • CVE-2026-107384
    HIGH

    MariaDB Connector/Node.js: SQL injection through object keys in SET expansion (permitSetMultiParamEntries)

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies