What’s Vulnerable › Vulnerabilities
CVE-2024-24787: Arbitrary code execution during build on Darwin in cmd/go
- Severity: medium (CVSS 6.4 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.8% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2024-05-08 · updated 2026-06-17
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.
Affected products
- Go: 1.21.0, 1.22
References
- http://www.openwall.com/lists/oss-security/2024/05/08/3
- https://go.dev/cl/583815
- https://go.dev/issue/67119
- https://groups.google.com/g/golang-announce/c/wkkO4P9stm0
- https://pkg.go.dev/vuln/GO-2024-2825
- https://security.netapp.com/advisory/ntap-20240531-0006/
- http://www.openwall.com/lists/oss-security/2024/05/08/3
- https://go.dev/cl/583815
- https://go.dev/issue/67119
- https://groups.google.com/g/golang-announce/c/wkkO4P9stm0
- https://pkg.go.dev/vuln/GO-2024-2825
- https://security.netapp.com/advisory/ntap-20240531-0006/
Get alerted when CVE-2024-24787 or the next vulnerability affects your stack