GO-2024-2825

    Dashboard / Vulnerabilities / GO-2024-2825

    GO-2024-2825

    Published: 8 May 2024Last Modified: 4 Feb 2026

    Summary: Arbitrary code execution during build on Darwin in cmd/go

    Details: 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.

    Affected packages

    Package

    Name: toolchain

    Purl: pkg:golang/toolchain

    Affected ranges

    Type: SEMVER

    Events:

    Introduced- 0
    Fixed -1.21.10

    Affected versions

    Common Vulnerability Scoring System

    Attack Vector
    Network
    Adjacent
    Local
    Physical
    Privileges Required
    None
    Low
    High
    User Interaction
    None
    Required
    Scope
    Unchanged
    Changed
    Confidentiality
    None
    Low
    High
    Integrity
    None
    Low
    High
    Availability
    None
    Low
    High
    GO-2024-2825 | CVE-DB