
6/2/2025

6/2/2025
CVE-2025-22867: Arbitrary code execution during build on darwin in cmd/go
First published: Thu Feb 06 2025(Updated: )
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.
Credit: security@golang.org
Affected Software | Affected Version | How to fix |
---|
Go (Golang) language by Google | | |
Never miss a vulnerability like this again
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
Frequently Asked Questions
What is the severity of CVE-2025-22867?
CVE-2025-22867 is classified as a high severity vulnerability due to its potential for arbitrary code execution.
How do I fix CVE-2025-22867?
To mitigate CVE-2025-22867, avoid building Go modules with CGO using the affected version of Go, and update to a safer version once available.
Who is affected by CVE-2025-22867?
CVE-2025-22867 primarily affects users of the Apple version of ld when building Go modules with CGO in Go version 1.24rc2.
What causes CVE-2025-22867?
CVE-2025-22867 is caused by the misuse of @executable_path, @loader_path, or @rpath special values in a "#cgo LDFLAGS" directive.
Is CVE-2025-22867 specific to certain platforms?
Yes, CVE-2025-22867 is specifically related to the Darwin platform.
- collector/mitre-cve
- source/MITRE
- agent/weakness
- agent/references
- agent/title
- agent/first-publish-date
- agent/type
- agent/description
- agent/guess-ai
- agent/software-canonical-lookup
- agent/softwarecombine
- collector/epss-latest
- source/FIRST
- agent/epss
- collector/nvd-api
- source/NVD
- agent/last-modified-date
- agent/author
- agent/severity
- agent/source
- agent/tags
- agent/event
- vendor/google
- canonical/go (golang) language by google
Contact
SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.coBy using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2025 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203