Code injection via go command with cgo in cmd/go
Historical advisory saved 24 Oct 2026 13:19:41 UTC. The publisher may have updated it since then. Latest advisory.
osv · GO-2023-1839
PublishedThe 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).
- Source published
- 8 Jun 2023 20:16:16 UTC
- Source modified
- 4 Feb 2026 04:29:49 UTC
- Saved here
- 24 Oct 2026 13:19:41 UTC
- Source terms
- OSV · upstream source license applies
Original source record · Cite this exact observation · Complete original publisher JSON
Source: osv · OSV · upstream source license applies. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.