Advisory

GO-2025-3428

Also known as: BIT-golang-2025-22867, CVE-2025-22867

Summary

Arbitrary code execution during build on darwin in cmd/go

Details

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.

Severity

Not rated by the source.

Dates

Published
2025-02-06 16:54 UTC
Modified
2025-02-08 08:11 UTC

Affected packages and fixes

toolchain

Go · All systems

Affected

  • introduced 1.24.0-rc.2, fixed 1.24.0-rc.3 (semver)

Fixed versions

1.24.0-rc.3

Fix

The export has no generic command for this ecosystem.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: Go Vulnerability Database · CC BY 4.0

Sources & licences