{"id":"CVE-2024-24787","state":"PUBLISHED","title":"Arbitrary code execution during build on Darwin in cmd/go","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.","publishedAt":"2024-05-08T15:31:14.530Z","updatedAt":"2025-02-13T17:40:26.439Z","severity":{"score":6.4,"label":"Medium","version":"3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H","source":"CISA-ADP"},"assigner":"Go","products":["Go toolchain cmd/go"],"affected":[{"vendor":"Go toolchain","product":"cmd/go","packageName":"cmd/go","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"1.21.10","versionType":"semver"},{"version":"1.22.0-0","status":"affected","lessThan":"1.22.3","versionType":"semver"}],"collectionURL":"https://pkg.go.dev","platforms":["darwin"]}],"references":["https://go.dev/issue/67119","https://go.dev/cl/583815","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"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:10.607Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/24xxx/CVE-2024-24787.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2024-24787","state":"PUBLISHED","datePublished":"2024-05-08T15:31:14.530Z","dateUpdated":"2025-02-13T17:40:26.439Z","assignerShortName":"Go","assignerOrgId":"1bb62c36-49e3-4200-9d77-64a1400537cc","dateReserved":"2024-01-30T16:05:14.758Z"},"containers":{"cna":{"title":"Arbitrary code execution during build on Darwin in cmd/go","descriptions":[{"lang":"en","value":"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":[{"vendor":"Go toolchain","product":"cmd/go","packageName":"cmd/go","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"1.21.10","versionType":"semver"},{"version":"1.22.0-0","status":"affected","lessThan":"1.22.3","versionType":"semver"}],"collectionURL":"https://pkg.go.dev","platforms":["darwin"]}],"references":[{"url":"https://go.dev/issue/67119"},{"url":"https://go.dev/cl/583815"},{"url":"https://groups.google.com/g/golang-announce/c/wkkO4P9stm0"},{"url":"https://pkg.go.dev/vuln/GO-2024-2825"},{"url":"https://security.netapp.com/advisory/ntap-20240531-0006/"},{"url":"http://www.openwall.com/lists/oss-security/2024/05/08/3"}],"problemTypes":[{"descriptions":[{"lang":"en","description":"CWE 74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')"}]}],"providerMetadata":{"shortName":"Go","orgId":"1bb62c36-49e3-4200-9d77-64a1400537cc","dateUpdated":"2024-06-10T16:10:10.782Z"},"credits":[{"lang":"en","value":"Juho Forsén (Mattermost)"}]},"adp":[{"title":"CISA ADP Vulnrichment","affected":[{"vendor":"golang","product":"go","defaultStatus":"affected","versions":[{"version":"1.21.0","status":"affected"},{"version":"1.22","status":"affected"}],"cpes":["cpe:2.3:a:golang:go:1.21.0:-:*:*:*:*:*:*"]}],"metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":6.4,"attackVector":"LOCAL","baseSeverity":"MEDIUM","vectorString":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H","integrityImpact":"HIGH","userInteraction":"NONE","attackComplexity":"HIGH","availabilityImpact":"HIGH","privilegesRequired":"HIGH","confidentialityImpact":"HIGH"}},{"other":{"type":"ssvc","content":{"timestamp":"2024-06-05T14:49:29.014816Z","id":"CVE-2024-24787","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-06-05T14:54:50.242Z"}},{"title":"CVE Program Container","references":[{"url":"https://go.dev/issue/67119","tags":["x_transferred"]},{"url":"https://go.dev/cl/583815","tags":["x_transferred"]},{"url":"https://groups.google.com/g/golang-announce/c/wkkO4P9stm0","tags":["x_transferred"]},{"url":"https://pkg.go.dev/vuln/GO-2024-2825","tags":["x_transferred"]},{"url":"https://security.netapp.com/advisory/ntap-20240531-0006/","tags":["x_transferred"]},{"url":"http://www.openwall.com/lists/oss-security/2024/05/08/3","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-01T23:28:12.679Z"}}]}}}