CVE-2024-56734 Better Auth has an Open Redirect Vulnerability in Verify Email Endpoint
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: no · technical impact: partial
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.
Upgrade path
3 packages: 2 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| better-auth better auth | < 1.1.6 | 1.1.6 | Fixed |
| npm better-auth(npm) | < 1.1.6 | 1.1.6 | Fixed |
| better-auth | = < 1.1.5 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| npm better-auth(npm) | < 1.1.6 | 1.1.6 |
| better-auth | = < 1.1.5 | No fix listed |
| better-auth better auth | < 1.1.6 | 1.1.6 |
References
- https://github.com/better-auth/better-auth/security/advisories/GHSA-8jhw-6pjj-8723 exploit mitigation vendor-advisory
- https://github.com/better-auth/better-auth/commit/deb3d73aea90d0468d92723f4511542b593e522f patch
- nvd.nist.gov third-party-advisory vendor-advisory
- github.com
- github.com product