
| CVE | CVE-2026-115578 |
| 组件 | go-guerrilla — server.go XCLIENT 命令处理器 |
| 受影响版本 | 1.6.7 及更早版本 |
| 修复版本 | 1.6.7-1 — 提交 f0d0f2c4(GHSA-hghq-53p7-c582) |
| CWE | CWE-129(数组索引验证不当)、CWE-193(差一错误) |
| 影响 | 未经身份验证的 SMTP 客户端发送裸 XCLIENT 动词(不带属性)即可使守护进程崩溃——对任何启用了 XCLIENT 的 go-guerrilla 部署(代理/前端配置)造成拒绝服务 |
| 向量 | 网络——监听端口上的 SMTP 命令 |
| 触发条件 | XCLIENT\r\n,且不带尾随空格或属性 |
XCLIENT 处理器假定在 7 字节动词之后至少有一个分隔字节,并切片 input[8:]:
// vulnerable v1.6.7
case sc.XClientOn && cmdXCLIENT.match(cmd):
if toks := bytes.Split(input[8:], []byte{' '}); len(toks) > 0 { // input may be 7 bytes
对于裸动词 XCLIENT(7 字节),input[8:] 超出范围并会触发 panic。修复方案对该切片进行了保护:
// fixed v1.6.7-1
if len(input) > len(cmdXCLIENT) {
if toks := bytes.Split(input[len(cmdXCLIENT)+1:], []byte{' '}); ...
}
cmdXCLIENT 是 7 字节的字面量 XCLIENT。处理程序硬编码了
input[8:],假定动词后面跟有一个空格。只发送动词的客户端
会产生 7 字节的输入,因此切片表达式会触发 panic,
报出“slice bounds out of range”,导致守护进程崩溃。修复方案在切片前
检查输入长度,并使用 len(cmdXCLIENT)+1 代替
魔法常量。
| 服务 | 镜像 | 角色 |
|---|---|---|
gg-vuln | cve-2026-115578:vuln | go-guerrilla v1.6.7 |
gg-fixed | cve-2026-115578:fixed | go-guerrilla v1.6.7-1(厂商修复) |
poc | cve-2026-115578-poc:local | 仅使用标准库的 Python 驱动 |
两者都在端口 2525 上以 xclient_on=true 运行 guerrillad serve,并使用
默认网关后端。一个 supervisor 会自动重启守护进程,并在 :8081 上暴露
/status(panic 标志 + 日志)和 /restart,因此即使进程
被重新拉起,崩溃仍然可被观察到。
./run-lab.sh build # builds both tags with Go 1.25
./run-lab.sh up # cve115578lab network: gg-vuln / gg-fixed
./run-lab.sh sweep
./run-lab.sh down
poc/poc.py(仅使用标准库)会打开一个 SMTP 会话,发送 EHLO,然后发送裸 XCLIENT 动词:
250 OK 时退出码为 0;3 表示无 worker,2 表示不可达。xclient_on。一个独立的完整链路利用程序位于 exploit/exploit.py:
python3 exploit/exploit.py --host=gg-vuln
# exit 1 on confirmed daemon crash, 0 on a safe target
| 步骤 | gg-vuln (1.6.7) | gg-fixed (1.6.7-1) |
|---|---|---|
裸 XCLIENT | 响应 EOF,panic=True(切片越界) | 250 2.1.0 OK,panic=False |
捕获的运行记录:evidence/check-*-run.txt、evidence/exploit-*-run.txt、
evidence/probe-*-run.txt、evidence/mitigation-*-run.txt、
evidence/exploit-standalone-run.txt、evidence/versions.txt、
evidence/0day-sweep.txt。
cve115578lab
网络上运行有界容器。xclient_on=true),与代理部署中的情况一致。修复版本接受裸 XCLIENT 动词,并返回 250 OK,且不会 panic;
长度检查可防止越界切片。修复后,裸动词不再存在崩溃路径。
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)
exploit/exploit.py standalone full-chain exploit
lab/lab.Dockerfile builds both upstream tags
lab/config.json xclient_on SMTP listener config
lab/supervisor.py auto-restart supervisor + /status
evidence/ captured runs of every mode on both sides
TRACKING.md excluded (working record)