Go CLI cgo newline bug generates unexpected code
CVE-2023-29402 Published on June 8, 2023
Code injection via go command with cgo in cmd/go
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).
Vulnerability Analysis
CVE-2023-29402 is exploitable with network access, and does not require authorization privileges or user interaction. This vulnerability is considered to have a low attack complexity. The potential impact of an exploit of this vulnerability is considered to be critical as this vulnerability has a high impact to the confidentiality, integrity and availability of this component.
Products Associated with CVE-2023-29402
You can be notified by email with stack.watch whenever vulnerabilities like CVE-2023-29402 are published in these products:
Affected Versions
Go toolchain cmd/go:- Before 1.19.10 is affected.
- Version 1.20.0-0 and below 1.20.5 is affected.
Exploit Probability
EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.