CVE-2025-22867 Arbitrary code execution during build on darwin in cmd/go
HighCVSS 7.5
EPSS 0.63%
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: yes · technical impact: partial
- Technology
- Debian
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.
Upgrade path
2 packages: 2 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| cmd/go(Go) | >= 1.24.0-rc.2, < 1.24.0-rc.3 | 1.24.0-rc.3 | Fixed |
| toolchain(Go) | >= 1.24.0-rc.2, < 1.24.0-rc.3 | 1.24.0-rc.3 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| toolchain(Go) | >= 1.24.0-rc.2, < 1.24.0-rc.3 | 1.24.0-rc.3 |
| cmd/go(Go) | >= 1.24.0-rc.2, < 1.24.0-rc.3 | 1.24.0-rc.3 |
References
- go.dev patch
- go.dev issue-tracking
- groups.google.com
- pkg.go.dev
- Debian Security Tracker CVE-2025-22867 vendor-advisory