Skip to content
Fencer Vulns
medium 6.4

CVE-2024-24787 json

Arbitrary code execution during build on Darwin in cmd/go

published 2024-05-08 2 y ago modified 2026-06-17 4 mo ago also BIT-golang-2024-24787 , EUVD-2024-22164 , GO-2024-2825

cvss
6.4
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.8%
EPSS 0.8% chance of exploitation in 30 days, percentile 55%
public exploits
0
none known

Summary

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.

Patch / fix

  • bitnami golang 1.21.10, 1.22.3
  • go toolchain 1.21.10, 1.22.3
  • Go toolchain cmd/go 1.21.10, 1.22.3
  • go1.22-openssl SLE Module for Development Tools 15 SP6, openSUSE Leap 15.6 1.22.7.1-150600.13.3.1
  • go1.22-openssl SLE Module for Development Tools 15 SP5, openSUSE Leap 15.5 1.22.7.1-150000.1.3.1
  • go1.21-openssl SLE Module for Development Tools 15 SP6, openSUSE Leap 15.6 1.21.13.1-150600.16.3.1
  • go1.21-openssl SLES for SAP 15 SP4, SLES 15 SP4-LTSS, SLE Module for Development Tools 15 SP5 +3 more 1.21.13.1-150000.1.11.1
  • go1.21 SLES for SAP 15 SP4, SLES 15 SP4-LTSS, SLE Module for Development Tools 15 SP5 +4 more 1.21.10-150000.1.33.1
  • go1.22 SLE Module for Development Tools 15 SP5, openSUSE Leap 15.6, openSUSE Leap 15.5 1.22.3-150000.1.15.1
  • go1.21 SLE Software Development Kit 12 SP5 1.21.10-1.33.1
  • go1.22 SLE Software Development Kit 12 SP5 1.22.3-1.9.1

suse advisories SUSE-SU-2024:3938-1SUSE-SU-2024:3772-1SUSE-SU-2024:3755-1SUSE-SU-2024:3089-1SUSE-SU-2024:1588-1SUSE-SU-2024:1587-1

  • go1.22 openSUSE Tumbleweed 1.22.3-1.1
  • go1.21 openSUSE Tumbleweed 1.21.10-1.1

opensuse advisories openSUSE-SU-2024:13936-1openSUSE-SU-2024:13941-1

  • msft-golang CBL-Mariner 2.0 1.22.3

azure linux advisories AZL-40428

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
total
Assessed
2 y ago

Exploit prediction

0.76% chance of exploitation in the next 30 days, higher than 55% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CISA ADP 3.1 6.4 CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H
CNA 3.1 6.4 CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H
OSV 3.1 6.4 CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H

Affected packages

ecosystem package affected fixed in
bitnami golang
<1.21.10
>=1.22.0-0, <1.22.3
1.21.10
1.22.3
go toolchain
<1.21.10
>=1.22.0-0, <1.22.3
1.21.10
1.22.3

Affected products

  • Go toolchain cmd/go
  • golang go

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.

CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.