published 8 May 2024 · updated 16 Nov 2026
Arbitrary code execution during build on Darwin in cmd/go
6.4MediumCVSS 6.4EPSS 1%
No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 1%. Fixed in 1.21.10 and 1.22.3.
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.
Affected
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| Go toolchain | <1.21.10, >=1.22.0-0 <1.22.3 | 1.21.10, 1.22.3 |
Timeline
Every event on this vulnerability
Embed
A live severity badge for an advisory, README or ticket