Go の cmd/go に脆弱性 悪意あるパッケージのビルドで任意のコードを実行されるおそれ
Summary
悪意のあるパッケージをビルドすると、リンク時に任意のコードを実行されたり、任意のリンカーフラグを注入されたりするおそれがあります。影響を受けるのは、Go ツールチェーンの cmd/go で、1.26.11 より前の 1.26 系と、1.27.0 以降 1.27.4 より前の版です。修正版の 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.
悪意のあるパッケージをビルドすると、リンク時に任意のコードを実行されたり、任意のリンカーフラグを注入されたりするおそれがあります。影響を受けるのは、Go ツールチェーンの cmd/go で、1.26.11 より前の 1.26 系と、1.27.0 以降 1.27.4 より前の版です。修正版の 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 |
| 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 |
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-97038 go Fix available
- BellSoft Alpaquita BELL-CVE-2026-97038 go Fix available
- Debian DEBIAN-CVE-2026-97038 golang-1.27, golang-1.26 Fix available
- Ubuntu UBUNTU-CVE-2026-97038 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 malicious package containing ".syso" files or cgo linker inputs could inject arbitrary linker flags or execute arbitrary code at link time.
Linker input files—including ".syso" files, direct object or library inputs in "#cgo LDFLAGS", and libraries in "-L" directories—were passed to the external linker without validating their format or checking for embedded linker options. Across platforms, this allowed executing GNU ld implicit linker scripts disguised as libraries or ".syso" files (or loaded via "-l:" or "-l" containing path separators), injecting unallowlisted linker flags via PE/COFF ".drectve" sections on Windows or Mach-O "LC_LINKER_OPTION" load commands on Darwin, or invoking LTO plugins via GCC or LLVM LTO intermediate representation sections in ELF, PE/COFF, or Mach-O objects.
The go command now verifies that ".syso" files, direct linker inputs, and libraries in "-L" directories are valid binary objects or archives that do not contain unallowlisted ".drectve" directives, "LC_LINKER_OPTION" load commands, or LTO IR sections, and disallows "-l:" and ":", "=", or path separators in "-l" flags.
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- patch go.dev
- report go.dev
- web groups.google.com
- web pkg.go.dev
- web nvd.nist.gov
- web github.com