Skip to content
High 8.8

Go の cmd/go に脆弱性、悪意あるパッケージのビルド時に任意のコードを実行されるおそれ

CVE-2026-97035 First seen on SecPulse

Summary

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 summary

Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.

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 を修正版へ更新してください。

Affected packages

PackageAffected → Fixed
Go toolchaincmd/go
< 1.26.11→ 1.26.11
≥ 1.27.0-0, < 1.27.4→ 1.27.4
Gotoolchain
< 1.26.11→ 1.26.11
≥ 1.27.0-0, < 1.27.4→ 1.27.4
Bitnamigolang
< 1.26.11→ 1.26.11
≥ 1.27.0-0, < 1.27.4→ 1.27.4

Fix status by distribution

Records published by each distribution for this CVE. Fixed versions differ by release; check each link.

Original description The description as published by the source.

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.

Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details