CVE-2025-22867: Arbitrary code execution during build on darwin in cmd/go
Vulnerability summary
CVE-2025-22867 is a high (CVSS 7.5) vulnerability in go toolchain cmd/go. EPSS estimates a 0.65% chance of exploitation in the next 30 days, higher than 50.9% of scored vulnerabilities.
Severe, CVSS 7.5 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 1% (FIRST, 03-11-2026)
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 4 · Related 4Timeline
- 06-02-2025PublishedVulnerability first disclosed.
- 06-02-2025Last modifiedVulnerability information updated.
Description
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 @executable_path, @loader_path, or @rpath special values in a "#cgo LDFLAGS" directive. This issue only affected go1.24rc2.
CVSS metrics
2 scores · 2 sources · 1 version- NVDNIST7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
EPSS trend
Probability
0.65%
Chance of exploitation in the next 30 days
Percentile
51%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.65% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeNo weakness data has been published for this record.
Affected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Go1 product
- toolchain≥ 1.24.0-rc.2, < 1.24.0-rc.3
Go toolchain1 product
- cmd/go≥ 1.24.0-rc.2, < 1.24.0-rc.3
2 vendors · 2 products
References
4 links- go.dev/issue/71476REPORT