GO-2022-0475
Arbitrary code execution in go command with cgo in cmd/go and cmd/cgo
At a glance
- Published
- Updated
- CVE
- CVE-2020-28366
- Aliases
- BIT-golang-2020-28366
Description
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 unquoted symbol name in a linked object file.
Affected packages
| Package | Versions |
|---|---|
| Go · toolchain | introduced 0, fixed 1.14.12, introduced 1.15.0-0, fixed 1.15.5 |
References
- https://go.dev/cl/269658 FIX
- https://go.googlesource.com/go/+/062e0e5ce6df339dc26732438ad771f73dbf2292 FIX
- https://go.dev/issue/42559 REPORT
- https://groups.google.com/g/golang-announce/c/NpBGTTmKzpM WEB
Sources
| Source | Licence |
|---|---|
| OSV.dev | CC-BY 4.0 — Go Vulnerability Database |