What’s Vulnerable › Vulnerabilities
CVE-2020-28367: Arbitrary code execution via the go command with cgo in cmd/go
- Severity: high (CVSS 7.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 2.4% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2020-11-18 · updated 2026-06-17
- Weakness: CWE-94
Description
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.
Affected products
- Go: before 1.14.12; from 1.15 before 1.15.5 — fixed in 1.14.12, 1.15.5
How to fix
Upgrade to a fixed version: Go 1.14.12, 1.15.5. Check the vendor advisory for mitigations.
References
- https://go.dev/cl/267277
- https://go.dev/issue/42556
- https://go.googlesource.com/go/+/da7aa86917811a571e6634b45a457f918b8e6561
- https://groups.google.com/g/golang-announce/c/NpBGTTmKzpM
- https://lists.debian.org/debian-lts-announce/2023/04/msg00021.html
- https://pkg.go.dev/vuln/GO-2022-0476
- https://go.dev/cl/267277
- https://go.dev/issue/42556
- https://go.googlesource.com/go/+/da7aa86917811a571e6634b45a457f918b8e6561
- https://groups.google.com/g/golang-announce/c/NpBGTTmKzpM
- https://lists.debian.org/debian-lts-announce/2023/04/msg00021.html
- https://pkg.go.dev/vuln/GO-2022-0476
Get alerted when CVE-2020-28367 or the next vulnerability affects your stack