6.4Medium

CVE-2024-24787Arbitrary code execution during build on Darwin in cmd/go

Go toolchain cmd/go; golang go Published: (2 years ago)

Description

On Darwin, building a Go module which contains CGO can trigger arbitrary code execution when using the Apple version of ld, due to usage of the -lto_library flag in a "#cgo LDFLAGS" directive.

Data: CVE.org, NVD, CISA KEV, FIRST EPSS, Ubuntu. Published as the sources state it, in English.

Affected products and versions

VendorProductVersions
Go toolchain cmd/go < 1.21.10, 1.22.0-0 – < 1.22.3
golang go 1.21.0, 1.22

References and patches