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

Published Feb 6, 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 @executablepath, @loaderpath, or @rpath special values in a "#cgo LDFLAGS" directive. This issue only affected go1.24rc2.

Affected Software

1 affected component
Google Go

Event History

Feb 6, 2025
CVE Published
via MITRE·05:09 PM
Data Sourced
via MITRE·05:09 PM
DescriptionWeakness
Data Sourced
via NVD·06:15 PM
DescriptionSeverity
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

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.

2

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.

3

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.

4

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.

5

Is CVE-2025-22867 specific to certain platforms?

Yes, CVE-2025-22867 is specifically related to the Darwin platform.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By 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.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203