Improper sanitization of LDFLAGS with embedded spaces in go command with cgo in cmd/go
No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 2%. Fixed in 1.19.10 and 1.20.5.
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.
Affected
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| Go toolchain | <1.19.10, >=1.20.0-0 <1.20.5 | 1.19.10, 1.20.5 |
Timeline
Every event on this vulnerability
Embed
A live severity badge for an advisory, README or ticket