{"id":"CVE-2023-29402","published":"2023-06-08T20:19:04Z","modified":"2025-02-13T16:49:13Z","title":"Code injection via go command with cgo in cmd/go","vendor":"Go toolchain","product":"cmd/go","tier":"tail","description":{"text":"The go command may generate unexpected code at build time when using cgo. This may result in unexpected behavior when running a go program which uses cgo. This may occur when running an untrusted module which contains directories with newline characters in their names. Modules which are retrieved using the go command, i.e. via \"go get\", are not affected (modules retrieved using GOPATH-mode, i.e. GO111MODULE=off, may be affected).","provenance":"source","from":"CVE.org"},"cvss":{"score":9.8,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CISA ADP Vulnrichment"},"epss":{"score":0.01694,"percentile":0.77707,"provenance":"source"},"cwes":[],"references":[{"url":"https://go.dev/issue/60167","tags":[]},{"url":"https://go.dev/cl/501226","tags":[]},{"url":"https://groups.google.com/g/golang-announce/c/q5135a9d924/m/j0ZoAJOHAwAJ","tags":[]},{"url":"https://pkg.go.dev/vuln/GO-2023-1839","tags":[]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XBS3IIK6ADV24C5ULQU55QLT2UE762ZX/","tags":[]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NZ2O6YCO2IZMZJELQGZYR2WAUNEDLYV6/","tags":[]},{"url":"https://security.gentoo.org/glsa/202311-09","tags":[]},{"url":"https://security.netapp.com/advisory/ntap-20241213-0004/","tags":[]}],"priority":{"score":22.4,"factors":[{"name":"EPSS percentile","points":15.54},{"name":"CVSS severity","points":6.86}]},"vendorSlug":"go-toolchain","affectedVersions":[{"vendor":"Go toolchain","product":"cmd/go","versions":["< 1.19.10",">= 1.20.0-0, < 1.20.5"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"total","timestamp":"2025-01-06T21:13:13.159691Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Go","package":"toolchain","vulnerableRanges":["<1.19.10",">=1.20.0-0, <1.20.5"],"patched":["1.19.10","1.20.5"],"from":["GO-2023-1839"],"provenance":"source"}],"summary":{"text":"The cmd/go component of the Go toolchain can generate unexpected code at build time when cgo is used, which can be triggered by directories with newline characters in their names within an untrusted module. An attacker who supplies such a module can cause unexpected program behavior when it is built and run, though modules retrieved with \"go get\" are not affected, and GOPATH-mode builds (GO111MODULE=off) may be.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T06:40:42Z"},"euvd":{"id":"EUVD-2023-32973","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2021-3115","published":"2021-01-26","fixed":"1.15.7","kev":false},{"cve":"CVE-2021-38297","published":"2021-10-18","fixed":"1.17.2","kev":false},{"cve":"CVE-2022-23773","published":"2022-02-11","fixed":"1.17.7","kev":false,"link":{"from":"CVE-2022-23773","to":"CVE-2023-29402","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Go:toolchain","fromFixed":"1.17.7","toFixed":"1.19.10","daysApart":482}]}},{"cve":"CVE-2023-29402","published":"2023-06-08","fixed":"1.20.5","kev":false},{"cve":"CVE-2023-29404","published":"2023-06-08","fixed":"1.20.5","kev":false},{"cve":"CVE-2023-29405","published":"2023-06-08","fixed":"1.20.5","kev":false},{"cve":"CVE-2023-24531","published":"2024-07-02","fixed":"1.21.0-0","kev":false},{"cve":"CVE-2023-39323","published":"2023-10-05","fixed":"1.21.2","kev":false,"link":{"from":"CVE-2023-29402","to":"CVE-2023-39323","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Go:toolchain","fromFixed":"1.20.5","toFixed":"1.20.9","daysApart":119}]}}],"package":"Go:toolchain"}}