High severity · published Feb 6, 2025
CVE-2025-22867
Arbitrary code execution during build on darwin in cmd/go
7.5
CVSS
0.6%
EPSS
No
On KEV
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.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Confidentiality
None
Integrity
High
Availability
None
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.6% · higher than 51% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
CM
cmd/go · Go toolchain
1.24.0-rc.2 before 1.24.0-rc.3 · source: vendor
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2025-22867
CVE.org
https://www.cve.org/CVERecord?id=CVE-2025-22867
go.dev
https://go.dev/cl/646996
go.dev
https://go.dev/issue/71476
groups.google.com
https://groups.google.com/g/golang-dev/c/TYzikTgHK6Y
pkg.go.dev
https://pkg.go.dev/vuln/GO-2025-3428
More from cmd/go
9.8
CVE-2023-24531
Output of "go env" does not sanitize values in cmd/go
8.8
CVE-2026-27140
Code execution vulnerability in SWIG code generation in cmd/go
8.8
CVE-2024-45340
GOAUTH credential leak in cmd/go
8.6
CVE-2025-4674
Unexpected command execution in untrusted VCS repositories in cmd/go
8.4
CVE-2026-56865
Fix transparency log tile verification bypass in golang.org/x/mod/sumdb/tlog
