CVE-2024-24787

Arbitrary code execution during build on Darwin in cmd/go

Published May 8, 2024 CVSS 3.1 · 6.4 Medium 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 -lto_library flag in a "#cgo LDFLAGS" directive.

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-2024-22164 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 -lto_library flag in a "#cgo LDFLAGS" directive.
History
Type Values Removed Values Added
First Time appeared Golang
Golang go
CPEs cpe:2.3:a:golang:go:1.21.0:-:*:*:*:*:*:*
Vendors & Products Golang
Golang go
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Weaknesses

No weakness.

Sources

Status
PUBLISHED
Assigner
Go
Published
Updated
Feb 13, 2025, 5:40 PM
Reserved
Jan 30, 2024, 4:05 PM
Status
Deferred
Published
May 8, 2024, 4:15 PM
Modified
Jun 17, 2026, 7:14 AM