Code executionin Go toolchain cmd/go.
No public exploit found; not on exploited lists.
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.
- 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.
- 6 Jan 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-29404: Code execution in Go toolchain cmd/go. https://patchminder.com/cve/cve-2023-29404/ (accessed 5 December 2026).