Bugzilla – Bug 1227338
VUL-0: CVE-2023-24531: go,go1.21,go1.22: command go env does not sanitize values and can execute its output as a shell script
Last modified: 2024-07-03 11:28:34 UTC
Command go env is documented as outputting a shell script containing the Go environment. However, go env doesn't sanitize values, so executing its output as a shell script can cause various bad behaviors, including executing arbitrary commands or inserting new environment variables. This issue is relatively minor because, in general, if an attacker can set arbitrary environment variables on a system, they have better attack vectors than making "go env" print them out. References: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2023-24531 https://www.cve.org/CVERecord?id=CVE-2023-24531 https://go.dev/cl/488375 https://go.dev/cl/493535 https://go.dev/issue/58508 https://groups.google.com/g/golang-dev/c/ixHOFpSbajE/m/8EjlbKVWAwAJ https://pkg.go.dev/vuln/GO-2024-2962