Beter Auth has an Open Redirect via Scheme-Less Callback Parameter
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Spoofing
- Confidentiality · integrity · availability
- None · None · None
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-601.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| better-auth | better-auth | before 1.1.20 | 1.1.20 | Patch available | CNA |
| — | better-auth (npm) | before 1.1.20 | 1.1.20 | Patch available | GHSA-hjpm-7mrm-26w8 |
- better-auth Vendorbetter-auth Affected before 1.1.20 Fixed in 1.1.20 Patch available CNA
- better-auth (npm) Vendor— Affected before 1.1.20 Fixed in 1.1.20 Patch available GHSA-hjpm-7mrm-26w8
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:better-auth:better_auth:*:*:*:*:*:node.js:*:* | before 1.1.21 | Vulnerable | better-auth |
- cpe:2.3:a:better-auth:better_auth:*:*:*:*:*:node.js:*:* Versions before 1.1.21 Vulnerable ·better-auth
Remediation
- Fix · CNA better-auth (better-auth) Fixed in 1.1.20
- Fix · GHSA-hjpm-7mrm-26w8 better-auth (npm) Fixed in 1.1.20 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2025-27143
- 2026-10-03 Alias added: GHSA-hjpm-7mrm-26w8
References
Patch 2
Advisory 2
More better-auth Better Auth vulnerabilities
- TI-2026-38586 Better Auth: OAuth refresh-token replay via missing client authentication on oidc-provider and mcp plugins CVSS 4.0CRITICAL 9.1
- TI-2026-38587 Better Auth: Server-side request forgery via unvalidated OIDC endpoints on @better-auth/sso provider registration CVSS 3.1CRITICAL 9.6
- TI-2026-38591 Better Auth OAuth Provider: Refresh Token Rotation Race Condition Allows Concurrent Replay and Token Family Forking CVSS 3.1HIGH 8.1
- TI-2026-38590 Better Auth: Account takeover via OAuth auto-link to unverified pre-registered email CVSS 3.1HIGH 8.3
- TI-2026-38592 Better Auth OAuth Provider: Race Condition in Authorization Code Exchange Enables Multi-Use Code Redemption CVSS 4.0HIGH 7.6
- TI-2026-38588 Better Auth: Unauthorized invitation acceptance via unverified email match in organization plugin CVSS 3.1HIGH 7.7
Sources
- CVE-2025-27143 · CVE Program
- CVE-2025-27143 · NVD
- FIRST EPSS
- GHSA-hjpm-7mrm-26w8 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences