脆弱性の一覧へ戻る
編集部の見出し:Go 1.27.4・1.26.11:#cgo LDFLAGS の検証を回避してビルド時にコードが動く
NVD の情報
Building a malicious package that uses cgo could bypass "#cgo LDFLAGS" validation and cause unexpected code execution at build time, or cause the go command to panic, via crafted quoting in "//go:cgo_ldflag" directives. When "cmd/cgo" generates "_cgo_gotypes.go", it quotes each "#cgo LDFLAGS" argument with strconv.Quote in a "//go:cgo_ldflag" directive, but "cmd/compile" and "cmd/go" parsed those directives by splitting on raw quote characters without handling backslash escapes or unquoting the string. This mismatch allowed disallowed linker flags or unvalidated linker search paths to be smuggled past the go command's flag checks and passed to the external linker. In addition, deduplicating LDFLAGS in the go command could panic with an out-of-bounds slice index when a prefix of the flag list matched near the end of the slice. "cmd/compile" and "cmd/go" now properly handle backslash-escaped quotes and unquote "//go:cgo_*" pragma strings with strconv.Unquote, and the slice bounds check in processCgoOutputs has been fixed.
- 公開日
- 2026-11-11
- 最終更新(NVD)
- 2026-11-17
- NVD の状態
- Awaiting Analysis
- 脆弱性の種類
- CWE-88
深刻度(CVSS)
- 8.8 HighCVSS 3.1/副/評価:134c704f-9b21-4f2e-91b3-4a467353bcc0
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
悪用の状況
CISA KEV には掲載されていません(掲載されていないことは、悪用されていないことの証明ではありません)。
EPSS:今後30日に悪用される推定確率 0.57%(全体の上位 52.2%、評価日 2026-11-18)
解消方法
- 解消方法の情報なし
「NVD の条件から推定」は、NVD が影響ありとする版の上限から読み取ったもので、修正版とは限りません。「解消方法の情報なし」は、修正が無いという意味ではありません。必ずベンダーの公告で確認してください。
編集部の記載(レポート掲載時)
レポートの編集部がベンダー公告などから転記した内容です。検証済みの値ではないため、必ず出典で確認してください。
2026-11-11 のレポートGo 1.27.4・1.26.11:#cgo LDFLAGS の検証を回避してビルド時にコードが動く
第14版:11/11 05:19 UTC に NVD へ掲載(点数なし)。
参照(NVD)
NVD から取得:2026-11-18T14:40:21.598Z/EPSS 評価日:2026-11-18
This product uses the NVD API but is not endorsed or certified by the NVD.
悪用の確認情報は CISA Known Exploited Vulnerabilities Catalog(NVD 経由で取得)によります。EPSS は FIRST(www.first.org/epss)によります。