{"id":"CVE-2020-28367","published":"2020-11-18T00:00:00Z","modified":"2024-08-04T16:33:59Z","title":"Arbitrary code execution via the go command with cgo in cmd/go","vendor":"Go toolchain","product":"cmd/go","tier":"tail","description":{"text":"Code injection in the go command with cgo before Go 1.14.12 and Go 1.15.5 allows arbitrary code execution at build time via malicious gcc flags specified via a #cgo directive.","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.02405,"percentile":0.8446,"provenance":"source"},"cwes":[],"references":[{"url":"https://go.dev/cl/267277","tags":[]},{"url":"https://go.googlesource.com/go/+/da7aa86917811a571e6634b45a457f918b8e6561","tags":[]},{"url":"https://go.dev/issue/42556","tags":[]},{"url":"https://groups.google.com/g/golang-announce/c/NpBGTTmKzpM","tags":[]},{"url":"https://pkg.go.dev/vuln/GO-2022-0476","tags":[]},{"url":"https://lists.debian.org/debian-lts-announce/2023/04/msg00021.html","tags":[]}],"priority":{"score":16.9,"factors":[{"name":"EPSS percentile","points":16.89}]},"vendorSlug":"go-toolchain","affectedVersions":[{"vendor":"Go toolchain","product":"cmd/go","versions":["< 1.14.12",">= 1.15.0-0, < 1.15.5"]}],"affected":[{"ecosystem":"Go","package":"toolchain","vulnerableRanges":["<1.14.12",">=1.15.0-0, <1.15.5"],"patched":["1.14.12","1.15.5"],"from":["GO-2022-0476"],"provenance":"source"}],"summary":{"text":"The flaw is a code injection weakness in the cmd/go component of the Go toolchain, where the go command, when building with cgo, can be made to pass unsafe values into gcc. Such flags can be supplied through a #cgo directive, and an attacker who can get a malicious directive into code being built can execute arbitrary code at build time. The provided record does not specify the attack vector, authentication, or user interaction requirements, so those conditions are not stated here.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:32:40Z"},"euvd":{"id":"EUVD-2020-20826","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2018-16873","published":"2018-12-14","fixed":"1.11.3","kev":false},{"cve":"CVE-2018-16874","published":"2018-12-14","fixed":"1.11.3","kev":false,"link":{"from":"CVE-2018-16874","to":"CVE-2020-28367","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Go:toolchain","fromFixed":"1.11.3","toFixed":"1.14.12","daysApart":705}]}},{"cve":"CVE-2020-28366","published":"2020-11-18","fixed":"1.15.5","kev":false},{"cve":"CVE-2020-28367","published":"2020-11-18","fixed":"1.15.5","kev":false},{"cve":"CVE-2021-3115","published":"2021-01-26","fixed":"1.15.7","kev":false},{"cve":"CVE-2021-38297","published":"2021-10-18","fixed":"1.17.2","kev":false},{"cve":"CVE-2022-23773","published":"2022-02-11","fixed":"1.17.7","kev":false}],"package":"Go:toolchain"}}