Code injectionin Go toolchain cmd/go.
No public exploit found; not on exploited lists.
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).
- Upgrade cmd/go to 1.19.10, 1.20.5 or later, whichever matches your release line.
- Upgrade toolchain (Go) to 1.19.10, 1.20.5 or later, whichever matches your release line.
Affected and fixed versions
From the CVE record, NVD and package advisories. When no source has versions yet, this table says "not confirmed" instead of guessing.
From first report to first attacks
- 5 Apr 2023CVE ID reserved by Go.
- 8 Jun 2023Published in the CVE List.
- 13 Feb 2025CVE record last updated.
Attack code anyone can find
Exploit maturity: No public exploit found. CISA assessment (SSVC): exploitation none.
Listed so defenders can judge how urgent this is and test systems they are authorised to test. Patchminder does not host exploit code; links open the source page. Labels for GitHub repositories come from their public details and are never a promise about the code. Run anything only in an isolated lab.
Report a link
Nothing on this page links to exploit code right now. To report anything else, write to the contact point in the legal notice.
Other cmd/go vulnerabilities
Same weakness: Code injection
- go.dev
- go.dev
- groups.google.com
- pkg.go.dev
- lists.fedoraproject.org
- lists.fedoraproject.org
- security.gentoo.org
- security.netapp.com
Patchminder. CVE-2023-29402: Code injection in Go toolchain cmd/go. https://patchminder.com/cve/cve-2023-29402/ (accessed 5 December 2026).