{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2023-29405","id":"CVE-2023-29405","title":"Improper sanitization of LDFLAGS with embedded spaces in go command with cgo in cmd/go","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 sanitizatio","descriptionLong":"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.","published":"2023-06-08T20:19:19.267Z","updated":"2026-10-28T02:30:51.957481803Z","reserved":"2023-04-05T19:36:35.043Z","status":"Modified","rejected":false,"assigner":"Go","metric":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"NVD"},"metrics":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"NVD"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"CISA-ADP"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"OSV"}],"rating":"critical","products":["Go toolchain cmd/go","Go toolchain cmd/cgo"],"affectedProducts":[{"vendor":"Go toolchain","product":"cmd/go","defaultStatus":"unaffected","versions":[{"version":"0","lessThan":"1.19.10","status":"affected","versionType":"semver"},{"version":"1.20.0-0","lessThan":"1.20.5","status":"affected","versionType":"semver"}],"platforms":[]},{"vendor":"Go toolchain","product":"cmd/cgo","defaultStatus":"unaffected","versions":[{"version":"0","lessThan":"1.19.10","status":"affected","versionType":"semver"},{"version":"1.20.0-0","lessThan":"1.20.5","status":"affected","versionType":"semver"}],"platforms":[]}],"packages":[{"ecosystem":"Go","name":"toolchain","purl":"pkg:golang/toolchain","ranges":["<1.19.10",">=1.20.0-0 <1.20.5"],"fixed":["1.19.10","1.20.5"],"advisory":"GO-2023-1842"}],"cwes":["CWE-88","CWE-74"],"aliases":["BIT-golang-2023-29405","GO-2023-1842"],"references":[{"url":"https://go.dev/issue/60306","tags":["x_transferred","Issue Tracking","web","report"]},{"url":"https://go.dev/cl/501224","tags":["x_transferred","Patch","web","fix"]},{"url":"https://groups.google.com/g/golang-announce/c/q5135a9d924/m/j0ZoAJOHAwAJ","tags":["x_transferred","Mailing List","Third Party Advisory","web"]},{"url":"https://pkg.go.dev/vuln/GO-2023-1842","tags":["x_transferred","Vendor Advisory","web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XBS3IIK6ADV24C5ULQU55QLT2UE762ZX/","tags":["x_transferred","Mailing List","web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NZ2O6YCO2IZMZJELQGZYR2WAUNEDLYV6/","tags":["x_transferred","web"]},{"url":"https://security.gentoo.org/glsa/202311-09","tags":["x_transferred","advisory"]},{"url":"https://security.netapp.com/advisory/ntap-20241206-0003/","tags":["advisory"]},{"url":"https://pkg.go.dev","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/29xxx/CVE-2023-29405.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-29405","tags":["advisory"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"total"},"epss":0.01714,"epssPercentile":0.7789,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2023-29405","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-29405","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2023-29405","ok":true,"note":"1 package"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2023-29405","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}