7.5high
Arbitrary code execution during build on darwin in cmd/go
- Severity
- 7.5high CVSS:3.1 by CISA-ADP
- Exploit likelihood
- 0.63% (higher than 51% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Go
- Also known as
- GO-2025-3428BIT-GOLANG-2025-22867
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| cmd/go | from 1.24.0-rc.2 before 1.24.0-rc.3 | CVE List |
| toolchain (Go) | from 1.24.0-rc.2 before 1.24.0-rc.3 | Go Vulnerability Database |
| golang (Bitnami) | from 1.24.0-rc.2 before 1.24.0-rc.3 | Bitnami Vulnerability Database |
All scores
| CISA-ADP | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| Bitnami Vulnerability Database | high rating |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
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.
NVD (es)
En Darwin, la creación de un módulo Go que contiene CGO puede desencadenar la ejecución de código arbitrario al utilizar la versión Apple de ld, debido al uso de los valores especiales @executable_path, @loader_path o @rpath en una directiva "#cgo LDFLAGS". Este problema solo afectó a go1.24rc2.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-22867 changed 2025-02-06 | CVE Terms of Use |
| Go Vulnerability Database | GO-2025-3428 changed 2025-02-08 | CC-BY-4.0 |
| NVD | CVE-2025-22867 changed 2026-06-17 | Public domain |
| Bitnami Vulnerability Database | BIT-GOLANG-2025-22867 changed 2025-02-08 | Apache-2.0 |