CVE-2024-24787

Arbitrary code execution during build on Darwin in cmd/go

State
Published
Severity
6.4 Medium
Published
May 8, 2024
Updated
Feb 13, 2025
Reserved
Jan 30, 2024

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.16.4 MediumCVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:HCISA-ADP

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
cmd/goGo toolchain
  • before 1.21.10Affected
  • 1.22.0-0 to before 1.22.3Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.