Skip to content

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

MediumCVSS 6.4 EPSS 0.76%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: no · technical impact: total
Technology
Debian

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.

Upgrade path

3 packages: 2 fixed.

PackageAffectedFixed inStatus
cmd/go(Go) < 1.21.10; >= 1.22.0-0, < 1.22.3 1.21.10, 1.22.3 Fixed
toolchain(Go) < 1.21.10; >= 1.22.0-0, < 1.22.3 1.21.10, 1.22.3 Fixed
golang go = 1.21.0; = 1.22 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
toolchain(Go) < 1.21.10 1.21.10
toolchain(Go) >= 1.22.0-0, < 1.22.3 1.22.3
cmd/go(Go) < 1.21.10 1.21.10
cmd/go(Go) >= 1.22.0-0, < 1.22.3 1.22.3
golang go = 1.21.0 No fix listed
golang go = 1.22 No fix listed

References