{"id":"CVE-2024-56734","aliases":["CVE-2024-56734","GHSA-8jhw-6pjj-8723"],"related":["CVE-2025-27143"],"kind":"vulnerability","state":"published","title":"Better Auth has an Open Redirect Vulnerability in Verify Email Endpoint","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"## Summary\nAn **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.\n\n## Affected Versions\n- All versions prior to **v1.1.6**.\n\n## Impact\nAttackers could craft malicious email verification links that exploit the redirect functionality to send users to untrusted domains. This can result in:\n\n- **Phishing attacks** – Users may unknowingly enter sensitive information on fake login pages.\n- **Reputation damage** – Trust issues for applications using Better Auth.\n\n## Vulnerability Details\nThe 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.\n\n**Example Exploit:**\n```\nhttps://example.com/auth/verify-email?token=abcd1234&callbackURL=https://malicious-site.com\n```\n\n## Patches\nUpgrade 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.\n\n## Workarounds\nYou can also use hooks to pre-check URLs in your auth instance to prevent this without upgrading:\n\n```ts\nconst auth = betterAuth({\n    hooks: {\n         before: (ctx) => {\n            if (ctx.path === \"/verify-email\") {\n               const callbackURL = ctx.query.callbackURL; // Check if this is a trusted callback URL or not\n            }\n         }\n    }\n})\n```","format":"markdown","source":"ghsa"},{"lang":"es","text":"Better Auth es una librería de autenticación para TypeScript. Se ha identificado una vulnerabilidad de redirección abierta en el endpoint de verificación de correo electrónico de todas las versiones de Better Auth anteriores a la v1.1.6, lo que potencialmente permite a los atacantes redirigir a los usuarios a sitios web maliciosos. Este problema afecta a los usuarios que dependen de los enlaces de verificación de correo electrónico generados por la librería. El endpoint de devolución de llamada de verificación de correo electrónico acepta un parámetro `callbackURL`. A diferencia de otros métodos de verificación, la verificación de correo electrónico solo utiliza JWT para verificar y redirigir sin la validación adecuada del dominio de destino. El verificador de origen se omite en este escenario porque solo verifica las solicitudes `POST`. Un atacante puede manipular este parámetro para redirigir a los usuarios a URL arbitrarias controladas por el atacante. La versión 1.1.6 contiene un parche para el problema.","source":"nvd"}],"published":"2024-12-30T16:48:58.184Z","modified":"2026-06-17T08:12:51.960Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","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","score":7.9,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","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","score":7.9,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","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","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"}],"cwes":["CWE-601"],"affected":[{"ranges":[{"version":"< 1.1.5","status":"affected"}],"vendor":"better-auth","product":"better-auth","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.1.6"}],"ecosystem":"npm","package":"better-auth","purl":"pkg:npm/better-auth","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"1.1.6"}],"vendor":"better-auth","product":"better_auth","cpe":"cpe:2.3:a:better-auth:better_auth:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/better-auth/better-auth/security/advisories/GHSA-8jhw-6pjj-8723","tags":["exploit","mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/better-auth/better-auth/commit/deb3d73aea90d0468d92723f4511542b593e522f","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-56734","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/better-auth/better-auth","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-12-30T17:36:35.899Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-56734","url":"https://www.cve.org/CVERecord?id=CVE-2024-56734","licence":"CVE Terms of Use","modified":"2024-12-30T17:36:51.332Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-8jhw-6pjj-8723","url":"https://github.com/advisories/GHSA-8jhw-6pjj-8723","licence":"CC-BY-4.0","modified":"2026-02-04T04:29:32.607Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-56734","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-56734","licence":"Public domain","modified":"2026-06-17T08:12:51.960Z"}],"updatedAt":"2026-11-25T22:58:50.585Z","epss":{"score":0.00387,"percentile":0.34942,"date":"2026-12-01T12:00:22.000Z"}}