ADVISORIES

Go Vulnerability Database

GO-2022-0475

Arbitrary code execution in go command with cgo in cmd/go and cmd/cgo

Details

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

EcosystemPackageAffected versions
Gotoolchain
All versions before 1.14.12 (fixed in 1.14.12)
From 1.15.0-0 before 1.15.5 (fixed in 1.15.5)

References