Skip to content

Go

Arbitrary code execution during build on Darwin in cmd/go

CVE-2024-24787Published 8 May 2024, 15:31 UTC

Real-world risk

0.4/ 10Low

Routine

PreliminaryFrom the CVSS vector only · confidence low

CVSS

6.4

scored by CISA, CVSS 3.1

In plain words

No plain-language summary yet. The original description is below.

Original description (from 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.

Am I affected?

ProductAffected versions (from the sources)Fixed in
GoUbiquitous= 1.21.0; = 1.22—
cmd/goNiche< 1.21.10; >= 1.22.0-0, < 1.22.31.21.10, 1.22.3

What to do

Update to a fixed version: 1.21.10, 1.22.3.

Why this score

FactorValueEvidence×
ImpactFull compromiseCode execution or full control of the system or applicationFrom the CVSS vector1.00
Attacker positionLocalMust already run code or have a shell on the machineFrom the CVSS vector0.50
Privileges neededHighAdmin or equivalentFrom the CVSS vector0.20
Victim interactionNoneNothingFrom the CVSS vector1.00
ConfigurationDefaultOut-of-the-box installs are vulnerableFrom the CVSS vector1.00
ReliabilityHardNarrow race, needs an extra info leak, needs a man-in-the-middle position, or must be chained with another bugFrom the CVSS vector0.45

Threat level T3: Public proof of concept (× 0.95)

A qualifying GitHub proof of concept, an unverified Exploit-DB entry, CISA's SSVC says PoC, or a reference tagged as an exploit

  • Public proof of concept on GitHub

EPSS 0.8% chance of exploitation in 30 days (percentile 57), as of 2026-12-05.

The arithmetic
  1. Prerequisites multiplied together0.045
  2. Threat T3: Public proof of concept0.950
  3. 10 × impact 1 × prerequisites 0.045 × threat 0.950.428
  4. Rounded to one decimal between 0.1 and 100.4

How the score works

Exploitation and evidence timeline

  1. 8 May 2024 Published
  2. 3 Dec 2026 Public proof of concept on GitHub first seen
  3. 3 Dec 2026 Risk 0.4 (cvss fallback)

Weakness

No weakness type given.

References

Get alerts for Go

Free email or text alerts when a vulnerability in Go reaches risk 8 or higher. Nothing else.