Vulnerabilities / CVE-2023-29405

critical

CVE-2023-29405

golang: cmd/cgo: Arbitrary code execution triggered by linker flags

Published Modified CWE 74
In the Trivy database since at least 24 Oct 2026, 07:11 UTCWhen it arrived before that build is not recorded.

Severity by source

NVD9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Red Hat7.5CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Bitnami9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Trivy's own label is CRITICAL. Rated critical by NVD, AlmaLinux, Azure Linux, Bitnami, CBL-Mariner, Oracle, Photon OS, Rocky Linux. Rated lower by Red Hat (high), Amazon (high), Ubuntu (low).

Description

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. Flags containing embedded spaces are mishandled, allowing disallowed flags to be smuggled through the LDFLAGS sanitization by including them in the argument of another flag. This only affects usage of the gccgo compiler.

Affected packages and fixed versions

SourcePackageFixed in
alma 8go-toolset:rhel8::delve, go-toolset:rhel8::go-toolset, go-toolset:rhel8::golang and 6 more1.9.1-1.module_el8.8.0+3471+a62632a0 and 1 more
alma 9go-toolset, golang, golang-bin and 5 more1.19.10-1.el9_2
Azure Linux 3.0golang0:1.20.7-1.azl3
bitnami::Bitnami Vulnerability Databasegolang1.19.10, 1.20.5
CBL-Mariner 2.0golang, msft-golang0:1.21.6-1.cm2 and 1 more
Oracle Linux 8delve, go-toolset, golang and 6 more1.9.1-1.0.1.module+el8.8.0+20964+30a27755 and 2 more
Oracle Linux 9go-toolset, golang, golang-bin and 5 more1.19.10-1.0.1.el9_2
Photon OS 3.0calico, go3.20.2-10.ph3 and 1 more
Photon OS 4.0calico, calico-cni, calico-felix and 4 more3.20.2-14.ph4 and 2 more
Photon OS 5.0calico, calico-cni, calico-felix and 5 more3.25.0-5.ph5 and 3 more
rocky 9go-toolset, golang, golang-bin and 5 more1.19.10-1.el9_2
alpine 3.18go1.20.5-r0
Show all 136 entries from 42 sources
SourcePackageFixed in
alma 8go-toolset:rhel8::delve1.9.1-1.module_el8.8.0+3471+a62632a0
alma 8go-toolset:rhel8::go-toolset1.19.10-1.module_el8.8.0+3571+89db2ae0
alma 8go-toolset:rhel8::golang1.19.10-1.module_el8.8.0+3571+89db2ae0
alma 8go-toolset:rhel8::golang-bin1.19.10-1.module_el8.8.0+3571+89db2ae0
alma 8go-toolset:rhel8::golang-docs1.19.10-1.module_el8.8.0+3571+89db2ae0
alma 8go-toolset:rhel8::golang-misc1.19.10-1.module_el8.8.0+3571+89db2ae0
alma 8go-toolset:rhel8::golang-race1.19.10-1.module_el8.8.0+3571+89db2ae0
alma 8go-toolset:rhel8::golang-src1.19.10-1.module_el8.8.0+3571+89db2ae0
alma 8go-toolset:rhel8::golang-tests1.19.10-1.module_el8.8.0+3571+89db2ae0
alma 9go-toolset1.19.10-1.el9_2
alma 9golang1.19.10-1.el9_2
alma 9golang-bin1.19.10-1.el9_2
alma 9golang-docs1.19.10-1.el9_2
alma 9golang-misc1.19.10-1.el9_2
alma 9golang-race1.19.10-1.el9_2
alma 9golang-src1.19.10-1.el9_2
alma 9golang-tests1.19.10-1.el9_2
Azure Linux 3.0golang0:1.20.7-1.azl3
bitnami::Bitnami Vulnerability Databasegolang1.19.10, 1.20.5
CBL-Mariner 2.0golang0:1.21.6-1.cm2
CBL-Mariner 2.0msft-golang0:1.20.7-1.cm2
Oracle Linux 8delve1.9.1-1.0.1.module+el8.8.0+20964+30a27755
Oracle Linux 8go-toolset1.19.10-1.module+el8.8.0+21109+b7104c00
Oracle Linux 8golang1.19.10-1.0.1.module+el8.8.0+21109+b7104c00
Oracle Linux 8golang-bin1.19.10-1.0.1.module+el8.8.0+21109+b7104c00
Oracle Linux 8golang-docs1.19.10-1.0.1.module+el8.8.0+21109+b7104c00
Oracle Linux 8golang-misc1.19.10-1.0.1.module+el8.8.0+21109+b7104c00
Oracle Linux 8golang-race1.19.10-1.0.1.module+el8.8.0+21109+b7104c00
Oracle Linux 8golang-src1.19.10-1.0.1.module+el8.8.0+21109+b7104c00
Oracle Linux 8golang-tests1.19.10-1.0.1.module+el8.8.0+21109+b7104c00
Oracle Linux 9go-toolset1.19.10-1.0.1.el9_2
Oracle Linux 9golang1.19.10-1.0.1.el9_2
Oracle Linux 9golang-bin1.19.10-1.0.1.el9_2
Oracle Linux 9golang-docs1.19.10-1.0.1.el9_2
Oracle Linux 9golang-misc1.19.10-1.0.1.el9_2
Oracle Linux 9golang-race1.19.10-1.0.1.el9_2
Oracle Linux 9golang-src1.19.10-1.0.1.el9_2
Oracle Linux 9golang-tests1.19.10-1.0.1.el9_2
Photon OS 3.0calico3.20.2-10.ph3
Photon OS 3.0go1.20.5-1.ph3
Photon OS 4.0calico3.20.2-14.ph4
Photon OS 4.0calico-cni3.20.2-14.ph4
Photon OS 4.0calico-felix3.20.2-14.ph4
Photon OS 4.0calico-k8s-policy3.20.2-14.ph4
Photon OS 4.0confd3.20.2-14.ph4
Photon OS 4.0kubernetes-dashboard2.7.0-1.ph4
Photon OS 4.0pmd-ng0.1-2.ph4
Photon OS 5.0calico3.25.0-5.ph5
Photon OS 5.0calico-cni3.25.0-5.ph5
Photon OS 5.0calico-felix3.25.0-5.ph5
Photon OS 5.0calico-k8s-policy3.25.0-5.ph5
Photon OS 5.0confd3.25.0-5.ph5
Photon OS 5.0go1.20.5-1.ph5
Photon OS 5.0kubernetes-dashboard2.7.0-6.ph5
Photon OS 5.0pmd-ng0.1-3.ph5
rocky 9go-toolset1.19.10-1.el9_2
rocky 9golang1.19.10-1.el9_2
rocky 9golang-bin1.19.10-1.el9_2
rocky 9golang-docs1.19.10-1.el9_2
rocky 9golang-misc1.19.10-1.el9_2
rocky 9golang-race1.19.10-1.el9_2
rocky 9golang-src1.19.10-1.el9_2
rocky 9golang-tests1.19.10-1.el9_2
alpine 3.18go1.20.5-r0
alpine 3.19go1.20.5-r0
alpine 3.20go1.20.5-r0
alpine 3.21go1.20.5-r0
alpine 3.22go1.20.5-r0
alpine 3.23go1.20.5-r0
alpine 3.24go1.20.5-r0
alpine edgego1.20.5-r0
amazon linux 1golang1.20.8-1.47.amzn1
amazon linux 1golang-bin1.20.8-1.47.amzn1
amazon linux 1golang-docs1.20.8-1.47.amzn1
amazon linux 1golang-misc1.20.8-1.47.amzn1
amazon linux 1golang-shared1.20.8-1.47.amzn1
amazon linux 1golang-src1.20.8-1.47.amzn1
amazon linux 1golang-tests1.20.8-1.47.amzn1
amazon linux 2golang1.20.5-1.amzn2.0.2
amazon linux 2golang-bin1.20.5-1.amzn2.0.2
amazon linux 2golang-docs1.20.5-1.amzn2.0.2
amazon linux 2golang-misc1.20.5-1.amzn2.0.2
amazon linux 2golang-shared1.20.5-1.amzn2.0.2
amazon linux 2golang-src1.20.5-1.amzn2.0.2
amazon linux 2golang-tests1.20.5-1.amzn2.0.2
amazon linux 2023golang1.20.5-1.amzn2023.0.2
amazon linux 2023golang-bin1.20.5-1.amzn2023.0.2
amazon linux 2023golang-docs1.20.5-1.amzn2023.0.2
amazon linux 2023golang-misc1.20.5-1.amzn2023.0.2
amazon linux 2023golang-shared1.20.5-1.amzn2023.0.2
amazon linux 2023golang-src1.20.5-1.amzn2023.0.2
amazon linux 2023golang-tests1.20.5-1.amzn2023.0.2
chainguardkind0.21.0-r0
chainguardkubeflow-katib0.19.0-r40
chainguardpolicy-controller0.7.0-r4
debian 10golang-1.11no fix listed
debian 11golang-1.15no fix listed
debian 12golang-1.19no fix listed
echogolang-1.19no fix listed
rapidfort amazon linux 2023golang1.20.5-1.amzn2023.0.2
rapidfort amazon linux 2023golang-bin1.20.5-1.amzn2023.0.2
rapidfort amazon linux 2023golang-docs1.20.5-1.amzn2023.0.2
rapidfort amazon linux 2023golang-misc1.20.5-1.amzn2023.0.2
rapidfort amazon linux 2023golang-shared1.20.5-1.amzn2023.0.2
rapidfort amazon linux 2023golang-src1.20.5-1.amzn2023.0.2
rapidfort amazon linux 2023golang-tests1.20.5-1.amzn2023.0.2
rapidfort debian 12golang-1.19no fix listed
rapidfort debian 13golang-1.19no fix listed
rapidfort Oracle Linux 9go-toolset0:1.19.10-1.0.1.el9_2
rapidfort Oracle Linux 9golang0:1.19.10-1.0.1.el9_2
rapidfort Oracle Linux 9golang-bin0:1.19.10-1.0.1.el9_2
rapidfort Oracle Linux 9golang-docs0:1.19.10-1.0.1.el9_2
rapidfort Oracle Linux 9golang-misc0:1.19.10-1.0.1.el9_2
rapidfort Oracle Linux 9golang-race0:1.19.10-1.0.1.el9_2
rapidfort Oracle Linux 9golang-src0:1.19.10-1.0.1.el9_2
rapidfort Oracle Linux 9golang-tests0:1.19.10-1.0.1.el9_2
rapidfort ubuntu 20.04golang-1.170:1.17.13-3ubuntu1.2
rapidfort ubuntu 22.04golang-1.170:1.17.13-3ubuntu1.2
rapidfort ubuntu 24.04golang-1.170:1.17.13-3ubuntu1.2
Red Hatgo-toolset-7-golangno fix listed
Red Hatgolangno fix listed
Red Hatgolang-binno fix listed
Red Hatgolang-docsno fix listed
Red Hatgolang-miscno fix listed
Red Hatgolang-srcno fix listed
Red Hatgolang-testsno fix listed
root.io debian 12rootio-golang-1.19no fix listed
ubuntu 16.04-ESMgolang-1.181.18.1-1ubuntu1~16.04.6+esm1
ubuntu 18.04-ESMgolang-1.181.18.1-1ubuntu1~18.04.4+esm1
ubuntu 20.04golang-1.181.18.1-1ubuntu1~20.04.3
ubuntu 20.04-ESMgolang-1.181.18.1-1ubuntu1~20.04.3
ubuntu 22.04golang-1.171.17.13-3ubuntu1.2
ubuntu 22.04golang-1.181.18.1-1ubuntu1.2
wolfikind0.21.0-r0
wolfikubeflow-katib0.19.0-r40
wolfipolicy-controller0.7.0-r4

References

All 37 references

Vulnerability data compiled from the Trivy vulnerability database (trivy-db, Aqua Security, Apache License 2.0), which aggregates third-party advisories. CVE records are published by The MITRE Corporation under the CVE Terms of Use; CVE is a trademark of MITRE. This product uses data from the NVD API but is not endorsed or certified by the NVD. Severity, titles and advisory data from the GitHub Advisory Database (CC BY 4.0), Red Hat security data (CC BY 4.0) and the other sources linked on each entry. Entries may be summarised or re-formatted; the linked original is the authoritative record.