Go toolchainのcmd/goとcmd/linkに脆弱性、細工した.sysoファイルで任意のリンカーフラグを注入されるおそれ
Summary
2026年11月11日に公表された、Go toolchainの脆弱性です。細工した.sysoファイルを含むパッケージをビルドすると、検証されないまま外部リンカーにフラグを渡され、任意のコードを実行されるおそれがあります。影響を受けるのは1.26.11より前、および1.27.0以降1.27.4より前のcmd/go、cmd/link、Go toolchainで、1.26.11または1.27.4への更新で修正できます。
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
2026年11月11日に公表された、Go toolchainの脆弱性です。細工した.sysoファイルを含むパッケージをビルドすると、検証されないまま外部リンカーにフラグを渡され、任意のコードを実行されるおそれがあります。影響を受けるのは1.26.11より前、および1.27.0以降1.27.4より前のcmd/go、cmd/link、Go toolchainで、1.26.11または1.27.4への更新で修正できます。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| Go toolchaincmd/go |
< 1.26.11→ 1.26.11 ≥ 1.27.0-0, < 1.27.4→ 1.27.4 |
1.26.11 1.27.4 |
| Go toolchaincmd/link |
< 1.26.11→ 1.26.11 ≥ 1.27.0-0, < 1.27.4→ 1.27.4 |
1.26.11 1.27.4 |
| Gotoolchain |
< 1.26.11→ 1.26.11 ≥ 1.27.0-0, < 1.27.4→ 1.27.4 |
1.26.11 1.27.4 |
Fix status by distribution
Records published by each distribution for this CVE. Fixed versions differ by release; check each link.
- Alpine Linux ALPINE-CVE-2026-97040 go Fix available
- BellSoft Alpaquita BELL-CVE-2026-97040 go Fix available
- Debian DEBIAN-CVE-2026-97040 golang-1.27, golang-1.26 Fix available
- Ubuntu UBUNTU-CVE-2026-97040 golang-1.27, golang-1.26, golang-1.25 +14 more No fixed version in this record
Original description The description as published by the source.
Building a package containing a crafted ".syso" file could bypass cgo flag validation and inject arbitrary linker flags when linking.
When loading ".syso" entries from a package archive, the linker only checked for recognized host object headers (ELF, Mach-O, PE, and XCOFF) before falling through to Go object parsing. A ".syso" file beginning with a "go object" header was parsed as a Go compiler object, allowing untrusted cgo metadata directives (such as "cgo_ldflag" or "cgo_dynamic_linker") embedded in the ".syso" file to be passed to the external linker without validation. Additionally, ".syso" filenames longer than 16 bytes lost their ".syso" extension when truncated in archive headers, and unrecognized ".syso" formats forced external linking in pure-Go builds.
The linker now rejects ".syso" files that are not recognized host object formats, and "cmd/go" and "cmd/pack" preserve the ".syso" suffix when truncating long archive member names.
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- patch go.dev
- report go.dev
- web groups.google.com
- web security@golang.org
- web nvd.nist.gov
- web github.com