Skip to content

fix(security): build with Go 1.27.3 to distrust compromised eMudhra intermediates - #56

Merged
AlliotTech merged 1 commit into
mainfrom
security/go-1.27.3-emudhra
Oct 22, 2026
Merged

AlliotTech merged 1 commit into
mainfrom
security/go-1.27.3-emudhra

Conversation

@AlliotTech

Copy link
Copy Markdown
Owner

背景

eMudhra 8 个中级 CA 私钥因密钥生成缺陷可被从证书反推(CVE-2026-111943),持有者可签发任意域名的有效证书做中间人。Go 在 10-19 发布 1.27.3 / 1.26.10,在 crypto/x509 内置这 8 个中级 CA 公钥的 SPKI 拉黑(distrustedSPKIHashes),二进制必须用新版 Go 重编才生效。

openalist 作为客户端连接 80 个网盘上游 API,旧版 Go 不查吊销、不强制 CT,存在被伪造证书劫持的风险。

改动

  • go.mod: go 1.27.1 → go 1.27.3(CI / release / release_docker 工作流都用 go-version-file: go.mod,自动跟随)
  • Dockerfile: 构建镜像 golang:1.27.1-alpine3.24 → golang:1.27.3-alpine3.24(digest 已按 Docker Hub 实际值更新)
  • go.sum: 补齐缺失的哈希(纯加法,无依赖版本变更)

仓库内无自带 CA 证书包、无自定义 RootCAs,纯工具链问题,无需改代码。运行时镜像 alpine:3.24 的 ca-certificates 在构建时 apk upgrade 即会拿到已修复的 20261020-r0。

验证

  • 完整二进制用 Go 1.27.3 编译通过,alist version 显示 Go Version: go1.27.3 linux/amd64,readonly 模式(CI 默认)构建通过
  • 用披露站点的真实证书链(chains.zip)做离线验证,同一程序分别用两个工具链跑:
    • Go 1.27.1:伪造链 ACCEPTED(emSign 路径与 Sectigo AAA cross-sign 路径均信任)
    • Go 1.27.3:伪造链 REJECTED(x509: no valid chains built,两条路径均拒绝)
    • 中级 CA(EM DV TLS CA - G3B)的 SPKI 哈希 ebed6475… 确认落在 Go 1.27.3 的拉黑表内

后续

合并后建议发一个后端补丁版(如 v3.45.31),让用户拿到重编后的二进制与 Docker 镜像。是否发版由你定。

…ntermediates

CVE-2026-111943: private keys of eight eMudhra intermediate CAs were
recoverable from the certificates, allowing impersonation of any site.
Go 1.27.3 / 1.26.10 reject chains containing those intermediates in
crypto/x509 (SPKI blocklist), so binaries must be rebuilt with it.

- go.mod: go 1.27.1 -> 1.27.3 (CI/release workflows follow go.mod via
  go-version-file, Dockerfile.ci binaries come from CI)
- Dockerfile: builder image golang:1.27.1-alpine3.24 -> 1.27.3-alpine3.24
  (digest-pinned)
- go.sum: fill in missing hashes (additive only, no version changes)
@AlliotTech
AlliotTech merged commit f440f91 into main Oct 22, 2026
6 checks passed
@AlliotTech
AlliotTech deleted the security/go-1.27.3-emudhra branch October 22, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant