CVE-2025-22867

published 6 Feb 2025 · updated 6 Feb 2025

Arbitrary code execution during build on darwin in cmd/go

7.5HighCVSS 7.5EPSS 1%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 1%. Fixed in 1.24.0-rc.3.

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

Vendors, products and packages with version ranges

VendorProductVersionsFixed
Go toolchain>=1.24.0-rc.2 <1.24.0-rc.31.24.0-rc.3

Timeline

Every event on this vulnerability

Embed

A live severity badge for an advisory, README or ticket

CVE-2025-22867 severity on Zeptric[![CVE-2025-22867](https://zeptric.io/badge/cve/CVE-2025-22867.svg)](https://zeptric.io/cve/CVE-2025-22867)