VDB

CVE-2023-29404

CVE-2023-29404 PUBLISHED CVSS 9.8 CRITICAL

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

Reported by go · Published June 8, 2023

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
toolchainGo Modules1.20.5, 1.19.10
cmd/goGo Modules1.20.5, 1.19.10
goAlpine1.20.5-r0
golang-testsAmazon Linux1.20.5-1.amzn2023.0.2, 1.20.5-1.amzn2.0.2
falcoChainguard0.37.1-r0
falcoWolfi0.37.1-r0
golangAmazon Linux1.20.5-1.amzn2023.0.2, 1.20.5-1.amzn2.0.2
kindChainguard0.21.0-r0
golang-sharedAmazon Linux1.20.5-1.amzn2023.0.2, 1.20.5-1.amzn2.0.2
kindWolfi0.21.0-r0
golang-miscAmazon Linux1.20.5-1.amzn2023.0.2, 1.20.5-1.amzn2.0.2
kubeflow-katibWolfi0.19.0-r40, 0.19.0-r31

9 more packages have a fixed version. See every fix in Lookup.

Risk scores

CVSS 3.1
9.8
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected products

VendorProductVersions
Go toolchaincmd/go0, 1.20.0-0
alpinego0
amazon:2023golang-tests0
chainguardfalco0
wolfifalco0
amazon:2023golang0
chainguardkind0
amazon:2023golang-shared0
wolfikind0
amazon:2golang-misc0
amazon:2golang-shared0
amazon:2golang-tests0
wolfikubeflow-katib0, 0
amazon:2023golang-src0
amazon:2golang-bin0
chainguardpolicy-controller0
amazon:2023golang-docs0
amazon:2golang-src0
amazon:2023golang-misc0
wolfipolicy-controller0

…and 5 more

Timeline

  • Jun 6, 2023 CVE Published
  • Jun 9, 2023 EPSS Score (30 in total, the first dated here)
  • Feb 8, 2024 PoC Published
  • Feb 17, 2026 Security Advisory (10 in total, the first dated here)
  • Nov 22, 2026 Distribution Patch (6 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2023-29404
vulnetix vdb fixes CVE-2023-29404

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2023-29404/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›