| CVE | CVE-2026-130354 (GHSA-8mmg-4qpv-p7x5) |
| 组件 | phpMyFAQ — Controller/Frontend/WebAuthnController.php::prepare() (4.1) |
| 受影响版本 | 4.1.0 – 4.1.11 |
| 修复版本 | 4.1.12(真正的厂商修复——本实验的修复侧) |
| CWE | CWE-284(不当访问控制)、CWE-287(不当认证) |
| 影响 | 未认证的访客可在策略为“手动审批 + 电子邮件域名白名单”的站点上获得可直接使用的已注册账户——注册用户能看到或做的一切(受限 FAQ/分类、自动加入群组、发帖)均无需任何审批即可访问 |
| 向量 | 网络,未认证——POST /api/webauthn/prepare |
| 触发条件 | 一个请求,以任意电子邮件作为 username,并携带匿名签发的 webauthn CSRF 令牌;账户以 active 状态存储,且 auth_source=webauthn |
常规注册路径(/api/register)创建账户时将其设为
blocked,强制执行 spam.manualActivation,并应用
security.domainWhiteListForRegistrations。而 WebAuthn 注册路径
完全不做这些:
// Controller/Frontend/WebAuthnController.php (4.1.x, ~L106)
if (!$userExists) {
$this->user->createUser($username);
$this->user->setStatus(status: 'active'); // ← the flaw
$this->user->setAuthSource(AuthenticationSourceType::AUTH_WEB_AUTH_N->value);
$this->user->setUserData(['display_name' => $username, 'email' => $username]);
}
这是 GHSA-w22q-m2fm-x9f4(CVE-2026-27836)的不完整修复残留:4.0 的修复将状态切换为 blocked;4.1 的移植添加了 config/CSRF/captcha 门控,但保留了 active。本实验室运行的是真实的 phpMyFAQ 4.1.11 与 4.1.12(真实的厂商差异),两侧均启用了 WebAuthn 并设置了白名单。
prepare() 是一个公共 API 路由,其唯一的注册门控是 security.enableRegistration。对于新用户名,它会以 active 状态创建账户,将电子邮件设置为调用者选择的用户名(从不检查所有权),并完全跳过 RegistrationHelper::isDomainAllowed() 和 spam.manualActivation。随后的 passkey 仪式是正常的 WebAuthn;策略违规在账户创建时就已经发生。
| 服务 | 镜像 | 角色 |
|---|---|---|
pmf-vuln | cve-2026-130354:vuln | phpMyFAQ 4.1.11(上游标签)+ MariaDB |
pmf-fixed | cve-2026-130354:fixed | phpMyFAQ 4.1.12 — 厂商修复 |
pmf-db-vuln / pmf-db-fixed | mariadb:10.11 | 各侧数据库 |
poc | cve-2026-130354-poc:local | 仅使用标准库的 Python 驱动 |
两侧获得完全相同的策略:启用 WebAuthn、启用注册、开启 manualActivation、白名单为 corp.example、为确定性而禁用 captcha(这是一个独立的门控——公告指出攻击者只需添加该字段即可)。安装通过产品自身的 setup 控制器驱动。一个仅用于实验室的 check-user.php 会报告存储的 account_status/auth_source 以供验证。
./run-lab.sh build # composer install at tags 4.1.11 / 4.1.12
./run-lab.sh up # cve130354lab network: two app+db stacks
./run-lab.sh sweep # check / exploit / probe / mitigation on both sides
./run-lab.sh down
poc/poc.py(仅使用标准库):
evil.example 用户名 POST 到 /api/webauthn/prepare → 读取
存储的状态。退出码 1 表示存在漏洞,0 表示安全,3 表示无 worker,2 表示无法连接。/api/register 对相同地址的处理进行对比。| 运行 | pmf-vuln (4.1.11) | pmf-fixed (4.1.12) |
|---|---|---|
check | 账户 active,认证 webauthn | 被拒绝 — 无账户 |
exploit 对比 | webauthn:active · 常规:blocked/not-found | 两者均被拒绝 |
probe webauthn 外部/内部 | active / active | 被拒绝 |
probe 常规 外部/内部 | held / held | 被拒绝 |
捕获的运行记录:evidence/check-*-run.txt、evidence/exploit-*-run.txt、
evidence/probe-*-run.txt、evidence/mitigation-*-run.txt、
evidence/versions.txt、evidence/0day-sweep.txt。
cve130354lab 网络上。端点 × 电子邮件矩阵即为表面扫描
(evidence/0day-sweep.txt):4.1.12 拒绝所有形式的绕过,
同时通过两条路径执行相同的策略。未发现第二种绕过
形式。
README.md this write-up
run-lab.sh environment driver (build / up / sweep / down)
Makefile convenience targets
poc/poc.py the PoC (check / exploit / probe / mitigation)
poc/Dockerfile runner image (python:3.12-alpine)
lab/lab.Dockerfile multi-stage build (phpMyFAQ 4.1.11 / 4.1.12)
lab/entrypoint.sh db wait -> setup-controller install -> config -> apache
lab/lab-config.php the identical policy on both sides
lab/check-user.php lab-only status verification endpoint
evidence/ captured runs of every mode on both sides
TRACKING.md excluded (working record)