CVE-2024-24787

MEDIUM6.4EPSS 3.2%

Arbitrary code execution during build on Darwin in cmd/go

Published: 5/8/2024Modified: 2/4/2026

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.

Affected packages (2)

CVSS scores

SourceVersionSeverityVector
osvCVSS 3.1MEDIUM6.4CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H

References (7)