CVE-2025-22867

Arbitrary code execution during build on darwin in cmd/go

Published Feb 6, 2025 CVSS 3.1 · 7.5 High EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2025-3035 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.
History
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title Arbitrary code execution during build on darwin in cmd/go
References

Subscriptions

No data.

Weaknesses

Sources

Status
PUBLISHED
Assigner
Go
Published
Updated
Feb 6, 2025, 9:23 PM
Reserved
Jan 8, 2025, 7:11 PM
Status
Deferred
Published
Feb 6, 2025, 6:15 PM
Modified
Jun 17, 2026, 8:50 AM
Severity
Important
Public date
Feb 6, 2025, 5:09 PM