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?
What to do
Update to a fixed version: 1.21.10, 1.22.3.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | Full compromiseCode execution or full control of the system or application | From the CVSS vector | 1.00 |
| Attacker position | LocalMust already run code or have a shell on the machine | From the CVSS vector | 0.50 |
| Privileges needed | HighAdmin or equivalent | From the CVSS vector | 0.20 |
| Victim interaction | NoneNothing | From the CVSS vector | 1.00 |
| Configuration | DefaultOut-of-the-box installs are vulnerable | From the CVSS vector | 1.00 |
| Reliability | HardNarrow race, needs an extra info leak, needs a man-in-the-middle position, or must be chained with another bug | From the CVSS vector | 0.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
- Prerequisites multiplied together0.045
- Threat T3: Public proof of concept0.950
- 10 × impact 1 × prerequisites 0.045 × threat 0.950.428
- Rounded to one decimal between 0.1 and 100.4
Exploitation and evidence timeline
- 8 May 2024 Published
- 3 Dec 2026 Public proof of concept on GitHub first seen
- 3 Dec 2026 Risk 0.4 (cvss fallback)
Weakness
No weakness type given.
References
- https://go.dev/issue/67119x-transferred
- https://go.dev/cl/583815x-transferred
- https://groups.google.com/g/golang-announce/c/wkkO4P9stm0x-transferred
- https://pkg.go.dev/vuln/GO-2024-2825x-transferred
- https://security.netapp.com/advisory/ntap-20240531-0006/x-transferred
- http://www.openwall.com/lists/oss-security/2024/05/08/3x-transferred
- CVE-2024-24787 on CVE.org