CVE-2023-29404
golang: cmd/go: go command may execute arbitrary code at build time when using cgo
Overview
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. 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.
Source: OX vulnerability database
Severity
9.8 · CRITICAL
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness: CWE-94
Affected packages · 1
| Ecosystem | Package | Vulnerable | Fixed in |
|---|---|---|---|
| Bitnami | golang | <1.19.10>=1.20.0, <1.20.5 | 1.19.101.20.5 |
Open a package to see all its vulnerabilities.
Operating systems · 51 fixes
Azure Linux 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 3.0 | golang | 0:1.22.7-2.azl3 |
Oracle Linux 2 releases · 3 packages
| Release | Package | Fixed in |
|---|---|---|
| 8 | golang +6 | 1.19.10-1.0.1.module+el8.8.0+21109+b7104c00 |
| 8 | go-toolset | 1.19.10-1.module+el8.8.0+21109+b7104c00 |
| 8 | delve | 1.9.1-1.0.1.module+el8.8.0+20964+30a27755 |
| 9 | go-toolset +7 | 1.19.10-1.0.1.el9_2 |
Photon OS 2 releases · 4 packages
| Release | Package | Fixed in |
|---|---|---|
| 4.0 | pmd-ng | 0.1-2.ph4 |
| 4.0 | kubernetes-dashboard | 2.7.0-1.ph4 |
| 4.0 | calico +4 | 3.20.2-14.ph4 |
| 5.0 | pmd-ng | 0.1-3.ph5 |
| 5.0 | go | 1.20.5-1.ph5 |
| 5.0 | kubernetes-dashboard | 2.7.0-6.ph5 |
1 more row
Red Hat 4 releases · 5 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| go-toolset-7-golang +3 | wont fix | — | |
| 7 | golang +2 | wont fix | — |
| 7 | go-toolset-1-19 +10 | 0:1.19.10-1.el7_9 | RHSA-2023:3920 |
| 8 (go-toolset:rhel8) | go-toolset +7 | 0:1.19.10-1.module+el8.8.0+19203+782922b7 | RHSA-2023:3922 |
| 8 (go-toolset:rhel8) | delve | 0:1.9.1-1.module+el8.8.0+16778+5fbb74f5 | RHSA-2023:3922 |
| 9 | go-toolset +7 | 0:1.19.10-1.el9_2 | RHSA-2023:3923 |
SUSE Linux Enterprise 2 releases · 2 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 15.4 | go1-19 +2 | 1.19.10-150000.1.34.1 | SUSE-SU-2023:2525-1 |
| 15.4 | go1-20 +2 | 1.20.5-150000.1.14.1 | SUSE-SU-2023:2526-1 |
| 15.5 | go1-19 +2 | 1.19.10-150000.1.34.1 | SUSE-SU-2023:2525-1 |
| 15.5 | go1-20 +2 | 1.20.5-150000.1.14.1 | SUSE-SU-2023:2526-1 |
alma 2 releases · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 8 (go-toolset:rhel8) | go-toolset +7 | 1.19.10-1.module_el8.8.0+3571+89db2ae0 |
| 8 (go-toolset:rhel8) | delve | 1.9.1-1.module_el8.8.0+3471+a62632a0 |
| 9 | go-toolset +7 | 1.19.10-1.el9_2 |
alpine 4 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 3.22 | go | 1.20.5-r0 |
| 3.23 | go | 1.20.5-r0 |
| 3.24 | go | 1.20.5-r0 |
| edge | go | 1.20.5-r0 |
amazon linux 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 2023 | golang +6 | 1.20.5-1.amzn2023.0.2 |
chainguard 1 release · 3 packages
| Release | Package | Fixed in |
|---|---|---|
| kubeflow-katib | 0.19.0-r40 | |
| kind | 0.21.0-r0 | |
| policy-controller | 0.7.0-r4 |
debian 3 releases · 3 packages
| Release | Package | Fixed in |
|---|---|---|
| 10 | golang-1-11 | affected |
| 11 | golang-1-15 | affected |
| 12 | golang-1-19 | affected |
echo 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| golang-1-19 | affected |
openSUSE 1 release · 2 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Tumbleweed | go1-19 +3 | 1.19.10-1.1 | openSUSE-SU-2024:12987-1 |
| Tumbleweed | go1-20 +3 | 1.20.5-1.1 | openSUSE-SU-2024:12988-1 |
rocky 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 9 | go-toolset +7 | 1.19.10-1.el9_2 |
root.io debian 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 12 | rootio-golang-1-19 | affected |
ubuntu 4 releases · 4 packages
| Release | Package | Fixed in |
|---|---|---|
| 18.04-ESM | golang-1-18 | 1.18.1-1ubuntu1~18.04.4+esm1 |
| 20.04 | golang-1-18 | 1.18.1-1ubuntu1~20.04.3 |
| 20.04-ESM | golang-1-14 +1 | affected |
| 20.04-ESM | golang-1-18 | 1.18.1-1ubuntu1~20.04.3 |
| 22.04 | golang-1-20 | affected |
| 22.04 | golang-1-17 | 1.17.13-3ubuntu1.2 |
1 more row
wolfi 1 release · 3 packages
| Release | Package | Fixed in |
|---|---|---|
| kubeflow-katib | 0.19.0-r40 | |
| kind | 0.21.0-r0 | |
| policy-controller | 0.7.0-r4 |
References
- access.redhat.com https://access.redhat.com/errata/RHSA-2023:3923
- access.redhat.com https://access.redhat.com/security/cve/CVE-2023-29404
- bugzilla.redhat.com https://bugzilla.redhat.com/2216965
- bugzilla.redhat.com https://bugzilla.redhat.com/2217562
- bugzilla.redhat.com https://bugzilla.redhat.com/2217565
- bugzilla.redhat.com https://bugzilla.redhat.com/2217569
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=2216965
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=2217562
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=2217565
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=2217569
Show all 35 references
- creativecommons.org https://creativecommons.org/licenses/by/4.0/
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-29402
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-29403
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-29404
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-29405
- errata.almalinux.org https://errata.almalinux.org/9/ALSA-2023-3923.html
- errata.rockylinux.org https://errata.rockylinux.org/RLSA-2023:3923
- github.com https://github.com/golang/go/commit/356a419e2f811b65d227abcea1a346f8dcb154e0 (go1.20.5)
- github.com https://github.com/golang/go/commit/bf3c8ce03e175e870763901a3850bca01381a828 (go1.19.10)
- github.com https://github.com/golang/go/issues/60305
- go.dev https://go.dev/cl/501225
- go.dev https://go.dev/issue/60305
- groups.google.com https://groups.google.com/g/golang-announce/c/q5135a9d924
- groups.google.com https://groups.google.com/g/golang-announce/c/q5135a9d924/m/j0ZoAJOHAwAJ
- linux.oracle.com https://linux.oracle.com/cve/CVE-2023-29404.html
- linux.oracle.com https://linux.oracle.com/errata/ELSA-2023-3923.html
- lists.fedoraproject.org https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NZ2O6YCO2IZMZJELQGZYR2WAUNEDLYV6/
- lists.fedoraproject.org https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XBS3IIK6ADV24C5ULQU55QLT2UE762ZX/
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2023-29404
- pkg.go.dev https://pkg.go.dev/vuln/GO-2023-1841
- security.gentoo.org https://security.gentoo.org/glsa/202311-09
- security.netapp.com https://security.netapp.com/advisory/ntap-20241115-0009/
- ubuntu.com https://ubuntu.com/security/notices/USN-7061-1
- ubuntu.com https://ubuntu.com/security/notices/USN-7109-1
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2023-29404
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.