Arbitrary Code Execution in Go Modules on Darwin by Apple ld
CVE-2025-22867
7.5HIGH
What is CVE-2025-22867?
A vulnerability in the Go programming language on Darwin systems allows for arbitrary code execution when building Go modules using CGO with specific linker flags. This issue arises from the improper handling of paths defined by the @executable_path, @loader_path, and @rpath values within the #cgo LDFLAGS directive. It affects users of Go version 1.24rc2, potentially leading to compromised system security.
Affected Version(s)
cmd/go darwin 1.24.0-rc.2 < 1.24.0-rc.3
References
CVSS V3.1
Score:
7.5
Severity:
HIGH
Confidentiality:
None
Integrity:
High
Availability:
None
Attack Vector:
Network
Attack Complexity:
Low
Privileges Required:
None
User Interaction:
None
Scope:
Unchanged
Timeline
Vulnerability published
Vulnerability Reserved
Credit
Juho Forsén of Mattermost