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

High 7.5 Published Updated

Attackers can execute arbitrary code during build time by exploiting a code injection flaw in the Go toolchain's cgo component via malicious object files.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2020-28366?

CVE-2020-28366 is a high-severity code injection vulnerability in Fedoraproject Fedora, published on 18 Nov 2020. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official 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.

Weakness: CWE-94

Which versions are affected by CVE-2020-28366?

2 open source packages ship an affected version, including golang and toolchain. It affects 4 products.

PackageAffectedFixed in
golang BitnamiAll versions1.14.12, 1.15.5
toolchain GoAll versions1.14.12, 1.15.5

Products include Fedoraproject Fedora, Golang Go, Netapp Cloud Insights Telegraf Agent, Netapp Trident.

How do I fix CVE-2020-28366?

Upgrade golang to a fixed version for your release line: 1.14.12 or 1.15.5.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2020-28366 being exploited?

There is no known exploitation of CVE-2020-28366 in the wild and no public exploit code.

All Fedoraproject Fedora vulnerabilities

Sources

Also known as AZL-38452, BIT-golang-2020-28366, DEBIAN-CVE-2020-28366, GHSA-mwfg-6wv9-379f, GO-2022-0475, UBUNTU-CVE-2020-28366.

Is CVE-2020-28366 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free