{"id":"CVE-2024-24787","aliases":["CVE-2024-24787","GO-2024-2825","BIT-GOLANG-2024-24787"],"related":["CGA-5gf2-fvqf-g4jv"],"kind":"vulnerability","state":"published","title":"Arbitrary code execution during build on Darwin in cmd/go","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"En Darwin, crear un módulo Go que contenga CGO puede desencadenar la ejecución de código arbitrario cuando se usa la versión Apple de ld, debido al uso del indicador -lto_library en una directiva \"#cgo LDFLAGS\".","source":"nvd"}],"published":"2024-05-08T15:17:04.000Z","modified":"2026-06-17T07:14:51.640Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H","score":6.4,"rating":"MEDIUM"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H","score":6.4,"rating":"MEDIUM"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"MEDIUM"}],"cwes":[],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"1.21.10","status":"affected"},{"type":"semver","introduced":"1.22.0-0","fixed":"1.22.3","status":"affected"}],"vendor":"Go toolchain","product":"cmd/go","package":"cmd/go","platforms":["darwin"],"source":"cvelist"},{"ranges":[{"version":"1.21.0","status":"affected"},{"version":"1.22","status":"affected"}],"vendor":"golang","product":"go","cpe":"cpe:2.3:a:golang:go:1.21.0:-:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.21.10"},{"type":"semver","introduced":"1.22.0-0","status":"affected","fixed":"1.22.3"}],"ecosystem":"Go","package":"toolchain","purl":"pkg:golang/toolchain","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.21.10"},{"type":"semver","introduced":"1.22.0-0","status":"affected","fixed":"1.22.3"}],"ecosystem":"Bitnami","package":"golang","purl":"pkg:bitnami/golang","source":"bitnami"}],"references":[{"url":"https://go.dev/issue/67119","tags":["report","web","x-transferred"],"sources":["cvelist","go","nvd","bitnami"]},{"url":"https://go.dev/cl/583815","tags":["fix","web","x-transferred"],"sources":["cvelist","go","nvd","bitnami"]},{"url":"https://groups.google.com/g/golang-announce/c/wkkO4P9stm0","tags":["web","x-transferred"],"sources":["cvelist","go","nvd","bitnami"]},{"url":"https://pkg.go.dev/vuln/GO-2024-2825","tags":["web","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://security.netapp.com/advisory/ntap-20240531-0006/","tags":["web","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"http://www.openwall.com/lists/oss-security/2024/05/08/3","tags":["web","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-24787","tags":["web"],"sources":["bitnami"]}],"credits":["Juho Forsén (Mattermost)"],"assigner":"Go","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2024-06-05T14:49:29.014Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-24787","url":"https://www.cve.org/CVERecord?id=CVE-2024-24787","licence":"CVE Terms of Use","modified":"2025-02-13T17:40:26.439Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2024-2825","url":"https://pkg.go.dev/vuln/GO-2024-2825","licence":"CC-BY-4.0","modified":"2026-02-04T02:31:37.758Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-24787","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-24787","licence":"Public domain","modified":"2026-06-17T07:14:51.640Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-GOLANG-2024-24787","url":"https://osv.dev/vulnerability/BIT-GOLANG-2024-24787","licence":"Apache-2.0","modified":"2026-01-28T03:27:20.135Z"}],"updatedAt":"2026-11-25T22:58:40.094Z","epss":{"score":0.00508,"percentile":0.36633,"date":"2026-11-30T12:00:22.000Z"}}