{"id":"GO-2024-2825","summary":"Arbitrary code execution during build on Darwin in cmd/go","details":"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.","aliases":["BIT-golang-2024-24787","CVE-2024-24787"],"modified":"2026-02-04T02:31:37.758576Z","published":"2024-05-08T15:17:04Z","related":["CGA-5gf2-fvqf-g4jv"],"database_specific":{"url":"https://pkg.go.dev/vuln/GO-2024-2825","review_status":"REVIEWED"},"references":[{"type":"REPORT","url":"https://go.dev/issue/67119"},{"type":"FIX","url":"https://go.dev/cl/583815"},{"type":"WEB","url":"https://groups.google.com/g/golang-announce/c/wkkO4P9stm0"}],"affected":[{"package":{"name":"toolchain","ecosystem":"Go","purl":"pkg:golang/toolchain"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.21.10"},{"introduced":"1.22.0-0"},{"fixed":"1.22.3"}]}],"ecosystem_specific":{"imports":[{"path":"cmd/go","goos":["darwin"]}]},"database_specific":{"source":"https://vuln.go.dev/ID/GO-2024-2825.json"}}],"schema_version":"1.7.3","credits":[{"name":"Juho Forsén (Mattermost)"}]}