{"id":"CVE-2023-29405","summary":"Improper sanitization of LDFLAGS with embedded spaces 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. 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.","aliases":["BIT-golang-2023-29405","GO-2023-1842"],"modified":"2026-05-18T05:57:04.307449355Z","published":"2023-06-08T20:19:19.267Z","related":["ALSA-2023:3922","ALSA-2023:3923","CGA-7fqw-2mm9-gcw3","SUSE-SU-2023:2525-1","SUSE-SU-2023:2526-1","openSUSE-SU-2024:12987-1","openSUSE-SU-2024:12988-1"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/29xxx/CVE-2023-29405.json","cna_assigner":"Go","unresolved_ranges":[{"source":"AFFECTED_FIELD","extracted_events":[{"fixed":"1.19.10"},{"introduced":"1.20.0-0"},{"fixed":"1.20.5"},{"fixed":"1.19.10"},{"introduced":"1.20.0-0"},{"fixed":"1.20.5"}]}]},"references":[{"type":"WEB","url":"https://go.dev/cl/501224"},{"type":"WEB","url":"https://go.dev/issue/60306"},{"type":"WEB","url":"https://groups.google.com/g/golang-announce/c/q5135a9d924/m/j0ZoAJOHAwAJ"},{"type":"WEB","url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NZ2O6YCO2IZMZJELQGZYR2WAUNEDLYV6/"},{"type":"WEB","url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XBS3IIK6ADV24C5ULQU55QLT2UE762ZX/"},{"type":"WEB","url":"https://pkg.go.dev"},{"type":"WEB","url":"https://pkg.go.dev/vuln/GO-2023-1842"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/29xxx/CVE-2023-29405.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-29405"},{"type":"ADVISORY","url":"https://security.gentoo.org/glsa/202311-09"},{"type":"ADVISORY","url":"https://security.netapp.com/advisory/ntap-20241206-0003/"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/golang/go","events":[{"introduced":"0"},{"fixed":"7fe60b5df764f5a16a2c40e4412b5ed60f709192"},{"fixed":"e827d41c0a2ea392c117a790cdfed0022e419424"}],"database_specific":{"source":"CPE_FIELD","extracted_events":[{"introduced":"0"},{"fixed":"1.19.10"},{"introduced":"1.20.0"},{"fixed":"1.20.5"}],"cpe":"cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*"}}],"versions":["go1.20.4","go1.19.9","go1.20.3","go1.19.8","go1.19.7","go1.20.2","go1.20.1","go1.19.6","go1.20","go1.20rc3","go1.19.5","go1.20rc2","go1.20rc1","go1.19.4","go1.19.3","go1.19.2","go1.19.1","go1.19","go1.19rc2","go1.19rc1","go1.19beta1","go1.18beta2","go1.18beta1","go1.17beta1","go1.16beta1","go1.15beta1","go1.14beta1","go1.13beta1","go1.12beta2","go1.12beta1","go1.11beta3","go1.11beta2","go1.11beta1","go1.10rc2","go1.10rc1","go1.10beta2","go1.10beta1","go1.9beta2","go1.9beta1","go1.8beta2","go1.8beta1","go1.7rc4","go1.7rc3","go1.7rc2","go1.7rc1","go1.7beta2","go1.7beta1","go1.6beta2","go1.6beta1","go1.5beta3","go1.5beta2","go1.5beta1","go1.4beta1","go1.3beta2","go1.3beta1","weekly.2012-03-27","weekly","weekly.2012-03-22","weekly.2012-03-13","weekly.2012-03-04","weekly.2012-02-22","weekly.2012-02-14","weekly.2012-02-07","weekly.2012-01-27","weekly.2012-01-20","weekly.2012-01-15","weekly.2011-12-22","weekly.2011-12-14","weekly.2011-12-06","weekly.2011-12-02","weekly.2011-12-01","weekly.2011-11-18","weekly.2011-11-09","weekly.2011-11-08","weekly.2011-11-02","weekly.2011-11-01","weekly.2011-10-26","weekly.2011-10-25","weekly.2011-10-18","weekly.2011-10-06","weekly.2011-09-21","weekly.2011-09-16","weekly.2011-08-17","weekly.2011-09-07","weekly.2011-09-01","weekly.2011-08-10","weekly.2011-07-07","weekly.2011-07-29","weekly.2011-07-19","weekly.2011-06-09","weekly.2011-06-23","weekly.2011-06-16","weekly.2011-06-02","weekly.2011-05-22","weekly.2011-04-27","weekly.2011-04-13","weekly.2011-04-04","weekly.2011-03-28","weekly.2011-03-15","weekly.2011-03-07.1","release.r56","weekly.2011-03-07","weekly.2011-02-24","weekly.2011-02-15","weekly.2011-02-01.1","weekly.2011-02-01","weekly.2011-01-20","weekly.2011-01-19","weekly.2011-01-12","weekly.2011-01-06","weekly.2010-12-22","weekly.2010-12-15.1","weekly.2010-12-15","weekly.2010-12-08","weekly.2010-12-02","weekly.2010-11-23","weekly.2010-11-10","weekly.2010-11-02","weekly.2010-10-27","weekly.2010-10-20","weekly.2010-10-13.1","weekly.2010-10-13","weekly.2010-09-29","weekly.2010-09-22","weekly.2010-09-15","weekly.2010-09-06","weekly.2010-08-25","weekly.2010-08-11","weekly.2010-08-04","weekly.2010-07-29","weekly.2010-07-14","weekly.2010-07-01","weekly.2010-06-21","weekly.2010-06-09","weekly.2010-05-27","weekly.2010-05-04","weekly.2010-04-27","weekly.2010-04-13","weekly.2010-03-30","weekly.2010-03-22","weekly.2010-03-15","weekly.2010-03-04","weekly.2010-02-23","weekly.2010-02-17","weekly.2010-02-04","weekly.2010-01-27","weekly.2010-01-13","weekly.2010-01-05","weekly.2009-12-22","weekly.2009-12-09","weekly.2009-12-07","weekly.2009-11-17","weekly.2009-11-12","weekly.2009-11-10.1","weekly.2009-11-10","weekly.2009-11-06"],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-29405.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"}]}