Skip to content
OpenAdvisories
High · 7.5 CVE-2025-22867 BIT-golang-2025-22867EUVD-2025-3035GHSA-664g-9vm2-r26fGO-2025-3428

Arbitrary code execution during build on darwin in cmd/go

Published Feb 6, 2025 · Updated Feb 6, 2025 · Assigned by Go

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 products

VendorProductAffectedFixed
Go toolchain cmd/go 1.24.0-rc.2 – < 1.24.0-rc.3 1.24.0-rc.3

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
SLES 15 SP6 go1.24 1.24rc3-150000.1.6.1 SUSE-SU-2025:0431-1
SLES 15 SP6 govulncheck-vulndb 0.0.20250207T224745-150000.1.32.1 SUSE-SU-2025:0429-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed go1.24 1.24rc3-1.1 openSUSE-SU-2025:14735-1
openSUSE Tumbleweed govulncheck-vulndb 0.0.20250207T224745-1.1 openSUSE-SU-2025:14754-1
openSUSE Leap 15.6 go1.24 1.24rc3-150000.1.6.1 SUSE-SU-2025:0431-1
openSUSE Leap 15.6 govulncheck-vulndb 0.0.20250207T224745-150000.1.32.1 SUSE-SU-2025:0429-1

Affected packages

EcosystemPackageAffectedFixedRecord
Go toolchain >= 1.24.0-rc.2, < 1.24.0-rc.3 1.24.0-rc.3 GO-2025-3428

Advisories 5

References