CVE-2023-29402

Code injection via go command with cgo in cmd/go

Published Jun 8, 2023 CVSS 3.1 · 9.8 Critical EPSS 1.7% KEV · Not listed
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).

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2023-32973 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).
Ubuntu USN Ubuntu USN USN-7061-1 Go vulnerabilities
Ubuntu USN Ubuntu USN USN-7109-1 Go vulnerabilities
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
Go
Published
Updated
Feb 13, 2025, 4:49 PM
Reserved
Apr 5, 2023, 7:36 PM
Status
Modified
Published
Jun 8, 2023, 9:15 PM
Modified
Jun 17, 2026, 5:49 AM
Severity
Moderate
Public date
Jun 8, 2023, 12:00 AM