GO-2024-2825
Arbitrary code execution during build on Darwin in cmd/go
At a glance
- Published
- Updated
- CVE
- CVE-2024-24787
- Aliases
- BIT-golang-2024-24787
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 packages
| Package | Versions |
|---|---|
| Go · toolchain | introduced 0, fixed 1.21.10, introduced 1.22.0-0, fixed 1.22.3 |
References
- https://go.dev/issue/67119 REPORT
- https://go.dev/cl/583815 FIX
- https://groups.google.com/g/golang-announce/c/wkkO4P9stm0 WEB
Sources
| Source | Licence |
|---|---|
| OSV.dev | CC-BY 4.0 — Go Vulnerability Database |