CVEfocus › CVE database › CVE-2024-24787

CVE-2024-24787Arbitrary code execution during build on Darwin in cmd/go

CVSS 6.4 MediumEPSS 0.5% (higher than 37% of CVEs)Published 2024-05-08Updated 2025-02-13Assigner: Go

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.

What to do

Fixed builds are available from Go: see the table below for the fixed version per release.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

1Fixed
13Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 24.04golang-1.21Not affected
vulnerable_code_not_present
Ubuntu 24.04golang-1.22Not affected
vulnerable_code_not_present
Ubuntu 22.04golang-1.17Not affected
vulnerable_code_not_present
Ubuntu 22.04golang-1.18Not affected
vulnerable_code_not_present
Ubuntu 22.04golang-1.20Not affected
vulnerable_code_not_present
Ubuntu 22.04golang-1.21Not affected
vulnerable_code_not_present
Ubuntu 22.04golang-1.22Not affected
vulnerable_code_not_present
Ubuntu 20.04golang-1.13Not affected
vulnerable_code_not_present
Ubuntu 20.04golang-1.14Not affected
vulnerable_code_not_present
Ubuntu 20.04golang-1.18Not affected
vulnerable_code_not_present
Ubuntu 20.04golang-1.20Not affected
vulnerable_code_not_present
Ubuntu 20.04golang-1.21Not affected
vulnerable_code_not_present
Ubuntu 20.04golang-1.22Not affected
vulnerable_code_not_present
Go librarytoolchainFixed1.22.3GO-2024-2825

What the vendor says

As published in the CVE record by Go, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.