一、 漏洞 CVE-2025-27143 基础信息
漏洞信息
                                        # Beter Auth 存在通过 Scheme-Less Callback 参数进行的开放式重定向漏洞

## 漏洞概述
Better Auth 是一个用于 TypeScript 的身份验证和授权库。在 1.1.21 之前版本中存在开放重定向漏洞,这是由于 `callbackURL` 参数在邮件验证端点和其他接受回调 URL 的端点中没有正确验证导致的。

## 影响版本
- 版本低于 1.1.21

## 漏洞细节
- 服务器阻止了完整的 URL,但错误地允许了无方案的 URL。
- 浏览器将这些无方案的 URL 解释为完整的 URL,导致意料之外的重定向。
- 攻击者可以通过构建恶意验证链接,诱使用户点击,从而在用户成功验证邮件时自动重定向到攻击者的网站。

## 影响
- 攻击者可以利用此漏洞进行钓鱼攻击、恶意软件传播或窃取敏感的身份验证令牌。
- 这个 CVE 是对 GHSA-8jhw-6pjj-8723/CVE-2024-56734 修复的绕过漏洞。

## 修复版本
- 1.1.21 版本包含了修复补丁。
                                        
提示
尽管我们采用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。
神龙会尽力确保数据准确,但也请结合实际情况进行甄别与判断。
神龙祝您一切顺利!
漏洞标题
Beter Auth has an Open Redirect via Scheme-Less Callback Parameter
来源:美国国家漏洞数据库 NVD
漏洞描述信息
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.
来源:美国国家漏洞数据库 NVD
CVSS信息
N/A
来源:美国国家漏洞数据库 NVD
漏洞类别
指向未可信站点的URL重定向(开放重定向)
来源:美国国家漏洞数据库 NVD
漏洞标题
Better Auth 输入验证错误漏洞
来源:中国国家信息安全漏洞库 CNNVD
漏洞描述信息
Better Auth是Better Auth开源的一个 TypeScript 最全面的身份验证框架。 Better Auth 1.1.21之前版本存在输入验证错误漏洞,该漏洞源于电子邮件验证端点和任何其他接受回调url的端点中对callbackURL参数验证不当。
来源:中国国家信息安全漏洞库 CNNVD
CVSS信息
N/A
来源:中国国家信息安全漏洞库 CNNVD
漏洞类别
输入验证错误
来源:中国国家信息安全漏洞库 CNNVD
二、漏洞 CVE-2025-27143 的公开POC
# POC 描述 源链接 神龙链接
三、漏洞 CVE-2025-27143 的情报信息
  • 标题: Release v1.1.21 · better-auth/better-auth · GitHub -- 🔗来源链接

    标签: x_refsource_MISC

  • 标题: Open Redirect via Scheme-Less Callback Parameter · Advisory · better-auth/better-auth · GitHub -- 🔗来源链接

    标签: x_refsource_CONFIRM

  • 标题: Security Advisory: Open Redirect Vulnerability in Verify Email Endpoint · Advisory · better-auth/better-auth · GitHub -- 🔗来源链接

    标签: x_refsource_MISC

  • 标题: fix(origin-check): prevent URLs with double slashes from being trusted · better-auth/better-auth@24659ae · GitHub -- 🔗来源链接

    标签: x_refsource_MISC

  • 标题: fix(origin-check): add tests for callback URLs with malicious patterns · better-auth/better-auth@b381cac · GitHub -- 🔗来源链接

    标签: x_refsource_MISC

  • https://nvd.nist.gov/vuln/detail/CVE-2025-27143