PT-2024-20560 · Go+2 · Go+2
Juho Forsén
·
Published
2023-12-12
·
Updated
2025-09-29
·
CVE-2024-24787
CVSS v3.1
6.4
Medium
| Vector | AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H |
Name of the Vulnerable Software and Affected Versions
Go versions prior to 1.21.10 and 1.22.3
Description
The issue allows for arbitrary code execution when building a Go module that contains CGO on Darwin, due to the usage of the -lto library flag in a "#cgo LDFLAGS" directive with the Apple version of ld.
Recommendations
For Go versions prior to 1.21.10, upgrade to version 1.21.10 or later to patch the vulnerability.
For Go versions prior to 1.22.3, upgrade to version 1.22.3 or later to patch the vulnerability.
As a temporary workaround, consider avoiding the use of the -lto library flag in the "#cgo LDFLAGS" directive until a patch is applied.
Exploit
Fix
Found an issue in the description? Have something to add? Feel free to write us 👾
Related Identifiers
Affected Products
Alt Linux
Go
Suse