CVE-2023-29404

    Dashboard / Vulnerabilities / CVE-2023-29404

    CVE-2023-29404

    Published: 8 Jun 2023Last Modified: 12 Aug 2026

    Summary: Improper handling of non-optional LDFLAGS in go command with cgo in cmd/go

    Details: The go command may execute arbitrary code at build time when using cgo. This may occur when running "go get" on a malicious module, or when running any other command which builds untrusted code. This is can by triggered by linker flags, specified via a "#cgo LDFLAGS" directive. The arguments for a number of flags which are non-optional are incorrectly considered optional, allowing disallowed flags to be smuggled through the LDFLAGS sanitization. This affects usage of both the gc and gccgo compilers.

    Affected packages

    Package

    Name:

    Purl:

    Affected ranges

    Type: GIT

    Events:

    Affected versions

    go1.20.4
    go1.20.3
    go1.20.2
    go1.20.1
    go1.20

    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
    CVE-2023-29404 | CVE-DB