{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2023-29404","id":"CVE-2023-29404","title":"Improper handling of non-optional LDFLAGS 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. The arguments for a number of flags which are non-optional are incorrectly considered optional, allowing disallowed flags","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. 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.","published":"2023-06-08T20:19:17.548Z","updated":"2026-10-28T02:30:28.190664461Z","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"],"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":[]}],"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-1841"}],"cwes":["CWE-94"],"aliases":["BIT-golang-2023-29404","GO-2023-1841"],"references":[{"url":"https://go.dev/issue/60305","tags":["x_transferred","Issue Tracking","web","report"]},{"url":"https://go.dev/cl/501225","tags":["x_transferred","Patch","web","fix"]},{"url":"https://groups.google.com/g/golang-announce/c/q5135a9d924/m/j0ZoAJOHAwAJ","tags":["x_transferred","Mailing List","Release Notes","web"]},{"url":"https://pkg.go.dev/vuln/GO-2023-1841","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-20241115-0009/","tags":["advisory"]},{"url":"https://pkg.go.dev","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/29xxx/CVE-2023-29404.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-29404","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.01822,"epssPercentile":0.79225,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2023-29404","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-29404","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2023-29404","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-29404","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}