CyberAlerts is shutting down on June 30th, 2025. Thank you for your support!

CVE-2024-24787: 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.

Classification

CVE ID: CVE-2024-24787

Affected Products

Vendor: Go toolchain

Product: cmd/go

Exploit Prediction Scoring System (EPSS)

EPSS Score: 0.04% (probability of being exploited)

EPSS Percentile: 12.91% (scored less or equal to compared to others)

EPSS Date: 2025-03-14 (when was this score calculated)

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

Timeline