CVE-2025-22867
JSON

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 packageVersionsReported by
cmd/gofrom 1.24.0-rc.2 before 1.24.0-rc.3CVE List
toolchain (Go)from 1.24.0-rc.2 before 1.24.0-rc.3Go Vulnerability Database
golang (Bitnami)from 1.24.0-rc.2 before 1.24.0-rc.3Bitnami Vulnerability Database

All scores

CISA-ADP7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Bitnami Vulnerability Databasehigh rating

Classification

CWE-77

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

SourceRecordLicence
CVE ListCVE-2025-22867 changed 2025-02-06CVE Terms of Use
Go Vulnerability DatabaseGO-2025-3428 changed 2025-02-08CC-BY-4.0
NVDCVE-2025-22867 changed 2026-06-17Public domain
Bitnami Vulnerability DatabaseBIT-GOLANG-2025-22867 changed 2025-02-08Apache-2.0