Go の cmd/go に脆弱性、悪意あるパッケージのビルド時に任意のコードを実行されるおそれ
概要
Clang または GCC を使う環境で、悪意のあるパッケージを cgo を使ってビルドすると、ビルド時に想定外のコードが実行されたり、任意のディレクトリにファイルを書き込まれたりするおそれがあります。影響を受けるのは Go の cmd/go(Go ツールチェーン)で、1.26.11 より前の 1.26 系と、1.27.0 以降 1.27.4 より前が対象です。修正版は 1.26.11 と 1.27.4 で、Go を修正版へ更新してください。
AI要約
SecPulse が外部の生成 AI を使って作った要約です。誤りを含むことがあります。重要な判断の前に、下の原文と参照URLを確認してください。
Clang または GCC を使う環境で、悪意のあるパッケージを cgo を使ってビルドすると、ビルド時に想定外のコードが実行されたり、任意のディレクトリにファイルを書き込まれたりするおそれがあります。影響を受けるのは Go の cmd/go(Go ツールチェーン)で、1.26.11 より前の 1.26 系と、1.27.0 以降 1.27.4 より前が対象です。修正版は 1.26.11 と 1.27.4 で、Go を修正版へ更新してください。
影響パッケージ
| パッケージ | 影響を受ける版 → 修正版 | |
|---|---|---|
| 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 |
| Gotoolchain |
1.26.11 未満→ 1.26.11 1.27.0-0 以上 1.27.4 未満→ 1.27.4 |
1.26.11 1.27.4 |
| Bitnamigolang |
1.26.11 未満→ 1.26.11 1.27.0-0 以上 1.27.4 未満→ 1.27.4 |
1.26.11 1.27.4 |
ディストリビューション別の修正状況
各ディストリビューションが公開している、この CVE の記録です。修正版は配布版ごとに違うので、リンク先で確かめてください。
- Alpine Linux ALPINE-CVE-2026-97035 go 修正版あり
- BellSoft Alpaquita BELL-CVE-2026-97035 go 修正版あり
- Debian DEBIAN-CVE-2026-97035 golang-1.27, golang-1.26 修正版あり
- Ubuntu UBUNTU-CVE-2026-97035 golang-1.27, golang-1.26, golang-1.25 ほか 14 件 この記録に修正版の記載なし
原文の説明 取得元が公開している説明をそのまま載せています (多くは英語)。
When using Clang or GCC, building a malicious package that uses cgo could cause unexpected code execution at build time or write files to arbitrary directories via "-gen-" or "-gnat" flags in "#cgo" directives. The "-g*" wildcard in the compiler and linker flag allowlists previously matched Clang's two-argument "-gen-cdb-fragment-path " flag and GCC's two-argument "-gnatO " flag, permitting compilation database fragments and sidecar output files to be written to arbitrary directories and desynchronizing flag argument parsing between the go command and the compiler driver so that subsequent arguments could be passed as unvalidated positional inputs to the linker. "-gen-" and "-gnat" flags are now disallowed in "#cgo" compiler and linker flags.
出典: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
参照URL
- web go.dev
- web go.dev
- web groups.google.com
- web pkg.go.dev
- web nvd.nist.gov
- web github.com