Beter Auth has an Open Redirect via Scheme-Less Callback Parameter
CVE-2025-27143Published 24 Feb 2025, 22:16 UTC
Real-world risk
2.9/ 10Low
Routine
PreliminaryFrom the CVSS vector only · confidence low
CVSS
6.9
scored by the vendor (CNA), CVSS 4.0
In plain words
No plain-language summary yet. The original description is below.
Original description (from GitHub_M)
Better Auth is an authentication and authorization library for TypeScript. Prior to version 1.1.21, the application is vulnerable to an open redirect due to improper validation of the callbackURL parameter in the email verification endpoint and any other endpoint that accepts callback url. While the server blocks fully qualified URLs, it incorrectly allows scheme-less URLs. This results in the browser interpreting the URL as a fully qualified URL, leading to unintended redirection. An attacker can exploit this flaw by crafting a malicious verification link and tricking users into clicking it. Upon successful email verification, the user will be automatically redirected to the attacker's website, which can be used for phishing, malware distribution, or stealing sensitive authentication tokens. This CVE is a bypass of the fix for GHSA-8jhw-6pjj-8723/CVE-2024-56734. Version 1.1.21 contains an updated patch.
Am I affected?
| Product | Affected versions (from the sources) | Fixed in |
|---|---|---|
| better-authCommon | < 1.1.20 | 1.1.20 |
What to do
Update to a fixed version: 1.1.20.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | MinorReflected XSS, CSRF with low effect, open redirect, minor leak | From the CVSS vector | 0.30 |
| Attacker position | InternetAnyone on the Internet can reach a typical deployment | From the CVSS vector | 1.00 |
| Privileges needed | NoneNo account | From the CVSS vector | 1.00 |
| Victim interaction | NoneNothing | From the CVSS vector | 1.00 |
| Configuration | DefaultOut-of-the-box installs are vulnerable | From the CVSS vector | 1.00 |
| Reliability | ReliableDeterministic: injection, logic bug, path traversal | From the CVSS vector | 1.00 |
Threat level T3: Public proof of concept (× 0.95)
A qualifying GitHub proof of concept, an unverified Exploit-DB entry, CISA's SSVC says PoC, or a reference tagged as an exploit
- CISA SSVC: proof of concept
EPSS 0.4% chance of exploitation in 30 days (percentile 32), as of 2026-12-03.
The arithmetic
- Prerequisites multiplied together1.000
- Threat T3: Public proof of concept0.950
- 10 × impact 0.3 × prerequisites 1 × threat 0.952.850
- Rounded to one decimal between 0.1 and 102.9
Exploitation and evidence timeline
- 24 Feb 2025 Published
- 3 Dec 2026 CISA SSVC: proof of concept first seen
- 3 Dec 2026 Risk 2.9 (cvss fallback)
Weakness
CWE-601
References
- https://github.com/better-auth/better-auth/security/advisories/GHSA-hjpm-7mrm-26w8vendor-advisory
- https://github.com/better-auth/better-auth/security/advisories/GHSA-8jhw-6pjj-8723misc
- https://github.com/better-auth/better-auth/commit/24659aefc35a536b95ea4e5347e52c8803910153misc
- https://github.com/better-auth/better-auth/commit/b381cac7aafd6aa53ef78b6ab771ebfa24643c80misc
- https://github.com/better-auth/better-auth/releases/tag/v1.1.21misc
- CVE-2025-27143 on CVE.org