CVE-2020-28367
mediumpriority · track · 31EPSS 0.024 · 84 %ileEUUSEPSS · scored 2026-10-27
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.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · medium–high · 5.1–7.5
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (8)
Products and version ranges known to be affected.
advisories (2)
Vendor and ecosystem advisories describing this.
- BIT-golang-2020-28367Arbitrary code execution via the go command with cgo in cmd/go2024-03-06vendor · osvUS
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.
- GO-2022-0476Arbitrary code execution via the go command with cgo in cmd/go2022-07-28vendor · osvUS
The go command may execute arbitrary code at build time when cgo is in use. This may occur when running go get on a malicious package, or any other command that builds untrusted code. This can be caused by malicious gcc flags specified via a cgo directive.
also known as (5)
Other names and identifiers for this entity.
- CNNVD-202011-1428cnnvd
- EUVD-2020-20826enisa_euvd
- GHSA-827f-m9xx-4cfwenisa_euvd
- BIT-golang-2020-28367osv
- GO-2022-0476osv
sources
Which sources assert this record, and when.
references (44)
External citations — patches, advisories, analysis.
- https://github.com/golang/go/issues/42556cnnvd
- https://go.dev/cl/267277cnnvd
- https://go.dev/issue/42556cnnvd
- https://go.googlesource.com/go/+/da7aa86917811a571e6634b45a457f918b8e6561cnnvd
- https://groups.google.com/g/golang-announce/c/NpBGTTmKzpMcnnvd
- https://lists.apache.org/thread.html/rd02e75766cd333a0df417588460f5e4477060633000bfe94955851fd@%3Cissues.trafficcontrol.apache.org%3Ecnnvd
- https://lists.debian.org/debian-lts-announce/2020/11/msg00038.htmlcnnvd
- https://lists.debian.org/debian-lts-announce/2023/04/msg00021.htmlcnnvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan