CVE-2023-29402

published 8 Jun 2023 · updated 17 Aug 2026

Code injection via go command with cgo in cmd/go

9.8CriticalCVSS 9.8EPSS 2%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 2%. Fixed in 1.19.10 and 1.20.5.

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).

Affected

Vendors, products and packages with version ranges

VendorProductVersionsFixed
Go toolchain<1.19.10, >=1.20.0-0 <1.20.51.19.10, 1.20.5

Timeline

Every event on this vulnerability

Embed

A live severity badge for an advisory, README or ticket

CVE-2023-29402 severity on Zeptric[![CVE-2023-29402](https://zeptric.io/badge/cve/CVE-2023-29402.svg)](https://zeptric.io/cve/CVE-2023-29402)