Advisory Published
Updated

CVE-2024-24787: Arbitrary code execution during build on Darwin in cmd/go

First published: Wed May 08 2024(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 -lto_library flag in a "#cgo LDFLAGS" directive.

Credit: security@golang.org

Affected SoftwareAffected VersionHow 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-2024-24787?

    CVE-2024-24787 is classified as a high severity vulnerability due to its potential to allow arbitrary code execution.

  • How do I fix CVE-2024-24787?

    To mitigate CVE-2024-24787, it is recommended to update to a patched version of the Go programming language provided by Google.

  • Who is affected by CVE-2024-24787?

    CVE-2024-24787 affects users building Go modules that utilize CGO on Darwin systems.

  • What conditions trigger CVE-2024-24787?

    CVE-2024-24787 is triggered by the use of the -lto_library flag in a '#cgo LDFLAGS' directive during the build process.

  • Can CVE-2024-24787 be exploited remotely?

    CVE-2024-24787 requires local access to exploit, hence it is not considered a remote vulnerability.

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.
© 2025 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203