CVE-2024-56734 Better Auth has an Open Redirect Vulnerability in Verify Email Endpoint

High 7.9 Published Updated

Attackers can redirect users to malicious sites via the verify email endpoint due to missing domain validation, affecting Better Auth users.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-56734?

CVE-2024-56734 is a high-severity vulnerability in better-auth, published on 30 Dec 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Better Auth is an authentication library for TypeScript. An open redirect vulnerability has been identified in the verify email endpoint of all versions of Better Auth prior to v1.1.6, potentially allowing attackers to redirect users to malicious websites. This issue affects users relying on email verification links generated by the library. 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. Version 1.1.6 contains a patch for the issue.

Weakness: CWE-601

Which versions are affected by CVE-2024-56734?

2 open source packages ship an affected version, including better-auth. It affects 1 product.

PackageAffectedFixed in
better-auth npmAll versions1.1.6
better-auth npmAll versions1.1.6

Products include Better-Auth Better Auth.

How do I fix CVE-2024-56734?

Upgrade better-auth to 1.1.6 or later.

Is CVE-2024-56734 being exploited?

There is no known exploitation of CVE-2024-56734 in the wild and no public exploit code.

Sources

Also known as GHSA-8jhw-6pjj-8723.

Is CVE-2024-56734 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free