CVE-2024-24787Go toolchain cmd/go
Medium 6.4
Follow: this CVE · Go toolchain · Go toolchain cmd/go We alert you by email or Slack (account required).
- Priority
- 38
- CVSS 3.1
- 6.4
- EPSS
- 0.5% probability of exploitation in 30 days · percentile 37
- Auth required
- Yes
- Published
- May 8, 2024
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- SSVC (CISA)
- Exploitation: none · Automatable: no · Technical impact: total
- Vector
CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H
What happens
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
- Apply the vendor's security update for cmd/go.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| Go | toolchain |
< 1.21.10 |
1.21.10 |
go get toolchain@v1.21.10 |
| Go | toolchain |
≥ 1.22.0-0 < 1.22.3 |
1.22.3 |
go get toolchain@v1.22.3 |
Per OSV / GitHub Advisories (GO-2024-2825). Check the version in your lockfile before upgrading.
Affected products
- Go toolchain · cmd/go
- golang · go
As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.
Official sources
References
Links published by the sources. Open them with care.