{"schema_version":"1.7.3","id":"BIT-golang-2024-24787","published":"2024-05-14T07:18:33.392Z","modified":"2026-01-28T03:27:20.135510Z","aliases":["CVE-2024-24787","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.","affected":[{"package":{"name":"golang","ecosystem":"Bitnami","purl":"pkg:bitnami/golang"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.21.10"},{"introduced":"1.22.0-0"},{"fixed":"1.22.3"}]}],"database_specific":{"source":"https://github.com/bitnami/vulndb/tree/main/data/golang/BIT-golang-2024-24787.json"},"severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H"}]}],"references":[{"type":"WEB","url":"https://go.dev/cl/583815"},{"type":"WEB","url":"https://go.dev/issue/67119"},{"type":"WEB","url":"https://groups.google.com/g/golang-announce/c/wkkO4P9stm0"},{"type":"WEB","url":"https://pkg.go.dev/vuln/GO-2024-2825"},{"type":"WEB","url":"http://www.openwall.com/lists/oss-security/2024/05/08/3"},{"type":"WEB","url":"https://security.netapp.com/advisory/ntap-20240531-0006/"},{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-24787"}],"database_specific":{"cpes":["cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*"],"severity":"Medium"}}