CVE-2023-29402

Code injection via go command with cgo in cmd/go

State
Published
Severity
9.8 Critical
Published
Jun 8, 2023
Updated
Feb 13, 2025
Reserved
Apr 5, 2023

Read the record on cve.org

Description

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

Scores

CVSSScoreVectorSource
3.19.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HCISA-ADP

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
cmd/goGo toolchain
  • before 1.19.10Affected
  • 1.20.0-0 to before 1.20.5Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.