GO-2022-0476

Arbitrary code execution via the go command with cgo in cmd/go

At a glance

Published
Updated
CVE
CVE-2020-28367
Aliases
BIT-golang-2020-28367

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 gcc flags specified via a cgo directive.

Affected packages

PackageVersions
Go · toolchainintroduced 0, fixed 1.14.12, introduced 1.15.0-0, fixed 1.15.5

References

Sources

SourceLicence
OSV.devCC-BY 4.0 — Go Vulnerability Database