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

CVE-2025-22867: 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 @executable_path, @loader_path, or @rpath special values in a "#cgo LDFLAGS" directive. This issue only affected go1.24rc2.

Classification

CVE ID: CVE-2025-22867

Affected Products

Vendor: Go toolchain

Product: cmd/go

Exploit Prediction Scoring System (EPSS)

EPSS Score: 0.05% (probability of being exploited)

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

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

References

https://go.dev/cl/646996
https://go.dev/issue/71476
https://groups.google.com/g/golang-dev/c/TYzikTgHK6Y
https://pkg.go.dev/vuln/GO-2025-3428

Timeline