CVE-2023-29402
Code injection via go command with cgo in cmd/go
Reported by go · Published June 8, 2023
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).
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| toolchain | Go Modules | 1.20.5, 1.19.10 |
| cmd/go | Go Modules | 1.20.5, 1.19.10 |
| golang | Amazon Linux | 1.20.5-1.amzn2023.0.2, 1.18.9-1.amzn2.0.6 |
| golang-shared | Amazon Linux | 1.20.5-1.amzn2023.0.2, 1.18.9-1.amzn2.0.6 |
| kubeflow-katib | Wolfi | 0.19.0-r40, 0.19.0-r31 |
| golang-src | Amazon Linux | 1.20.5-1.amzn2023.0.2, 1.18.9-1.amzn2.0.6 |
| falco | Wolfi | 0.37.1-r0 |
| kind | Chainguard | 0.21.0-r0 |
| go | Alpine | 1.20.5-r0 |
| golang-misc | Amazon Linux | 1.20.5-1.amzn2023.0.2, 1.18.9-1.amzn2.0.6 |
| golang-tests | Amazon Linux | 1.20.5-1.amzn2023.0.2, 1.18.9-1.amzn2.0.6 |
| golang-docs | Amazon Linux | 1.20.5-1.amzn2023.0.2, 1.18.9-1.amzn2.0.6 |
10 more packages have a fixed version. See every fix in Lookup.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Go toolchain | cmd/go | 0, 1.20.0-0 |
| amazon:2023 | golang | 0 |
| amazon:2 | golang-shared | 0 |
| wolfi | kubeflow-katib | 0, 0 |
| amazon:2023 | golang-src | 0 |
| wolfi | falco | 0 |
| chainguard | kind | 0 |
| alpine | go | 0 |
| amazon:2 | golang-misc | 0 |
| amazon:2023 | golang-tests | 0 |
| amazon:2023 | golang-docs | 0 |
| amazon:2 | golang | 0 |
| amazon:2023 | golang-bin | 0 |
| amazon:2 | golang-race | 0 |
| amazon:2 | golang-tests | 0 |
| chainguard | policy-controller | 0 |
| amazon:2 | golang-bin | 0 |
| amazon:2023 | golang-misc | 0 |
| Go toolchain | cmd/go | 1.20.0-0, 0 |
| amazon:2023 | golang-shared | 0 |
…and 6 more
Timeline
- Jun 6, 2023 CVE Published
- Jun 9, 2023 EPSS Score (30 in total, the first dated here)
- Feb 8, 2024 PoC Published
- Feb 17, 2026 Security Advisory (10 in total, the first dated here)
- Nov 22, 2026 Distribution Patch (6 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2023-29402
vulnetix vdb fixes CVE-2023-29402
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2023-29402/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart