Description
The go command may execute arbitrary code at build time when using cgo. This may occur when running "go get" on a malicious module, or when running any other command which builds untrusted code. This is can by triggered by linker flags, specified via a "#cgo LDFLAGS" directive. Flags containing embedded spaces are mishandled, allowing disallowed flags to be smuggled through the LDFLAGS sanitization by including them in the argument of another flag. This only affects usage of the gccgo compiler.
CVSS breakdown
CVSS 3.1
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
Affected products
- Go toolchain / cmd/cgo0 – 1.19.10
- Go toolchain / cmd/cgo1.20.0-0 – 1.20.5
- Go toolchain / cmd/go0 – 1.19.10
- Go toolchain / cmd/go1.20.0-0 – 1.20.5
References
- MISChttps://go.dev/issue/60306
- MISChttps://go.dev/cl/501224
- MISChttps://groups.google.com/g/golang-announce/c/q5135a9d924/m/j0ZoAJOHAwAJ
- MISChttps://pkg.go.dev/vuln/GO-2023-1842
- MAILING_LISThttps://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XBS3IIK6ADV24C5ULQU55QLT2UE762ZX/
- MAILING_LISThttps://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NZ2O6YCO2IZMZJELQGZYR2WAUNEDLYV6/
- MISChttps://security.gentoo.org/glsa/202311-09
Updated 46m ago · 8 sources