CVE-2020-28367
HIGH 7.5CVSS 3.1Arbitrary code execution via the go command with cgo in cmd/go
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.
- Published
- 18 Nov 2020
- Last modified
- 17 Jun 2026
- Assigned by
- security@golang.org
- NVD status
- Modified
- Weakness
- CWE-94
- Also known as
- BIT-golang-2020-28367GO-2022-0476
- Sources
- NVDJSONOSV GO-2022-0476JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 5.1 | AV:N/AC:H/Au:N/C:P/I:P/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | golang | gocpe:2.3:a:golang:go:*:*:*:*:*:*:*:* |
< 1.14.12 | 1.14.12 |
| NVD | golang | gocpe:2.3:a:golang:go:*:*:*:*:*:*:*:* |
>= 1.15, < 1.15.5 | 1.15.5 |
| OSV | Go | toolchain | < 1.14.12; >= 1.15.0-0, < 1.15.5 | 1.14.12, 1.15.5 |
References
- https://go.dev/cl/267277 · FIX
- https://go.dev/issue/42556 · REPORT
- https://go.googlesource.com/go/+/da7aa86917811a571e6634b45a457f918b8e6561 · FIX
- https://groups.google.com/g/golang-announce/c/NpBGTTmKzpM · WEB
- https://lists.debian.org/debian-lts-announce/2023/04/msg00021.html
- https://pkg.go.dev/vuln/GO-2022-0476
History
- 25 Nov 2026 20:32 UTC · NVD: first stored (published 18 Nov 2020)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 28 Jul 2022)