# CVE-2025-22867: Arbitrary code execution during build on darwin in cmd/go

- Severity: High 7.5 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.63%, higher than 51% of CVEs (2026-12-01)
- Published: 2025-02-06T16:54:38.000Z
- Modified: 2026-06-17T08:50:39.083Z
- Also known as: GO-2025-3428, BIT-GOLANG-2025-22867
- Weaknesses: CWE-77
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: Go

## 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.

(As written by CVE List.)

## Affected

- cmd/go: from 1.24.0-rc.2 before 1.24.0-rc.3
- toolchain (Go): from 1.24.0-rc.2 before 1.24.0-rc.3
- golang (Bitnami): from 1.24.0-rc.2 before 1.24.0-rc.3

## Every score

- CISA-ADP: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- Bitnami Vulnerability Database: rating High

## References

- <https://go.dev/cl/646996> (fix, web)
- <https://go.dev/issue/71476> (report, web)
- <https://groups.google.com/g/golang-dev/c/TYzikTgHK6Y> (web)
- <https://pkg.go.dev/vuln/GO-2025-3428> (web)

## Sources

- CVE List: [CVE-2025-22867](https://www.cve.org/CVERecord?id=CVE-2025-22867), CVE Terms of Use, modified 2025-02-06
- Go Vulnerability Database: [GO-2025-3428](https://pkg.go.dev/vuln/GO-2025-3428), CC-BY-4.0, modified 2025-02-08
- NVD: [CVE-2025-22867](https://nvd.nist.gov/vuln/detail/CVE-2025-22867), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-GOLANG-2025-22867](https://osv.dev/vulnerability/BIT-GOLANG-2025-22867), Apache-2.0, modified 2025-02-08

---

Page: https://cve.day/CVE-2025-22867 · Whole record: https://cve.day/CVE-2025-22867.json · Rebuilt by cve.day 2026-11-25T22:58:53.882Z
