{"id":"CVE-2023-24531","aliases":["AZL-43104","AZL-43110","AZL-52719","AZL-79036","AZL-98667","BELL-CVE-2023-24531","BIT-golang-2023-24531","DEBIAN-CVE-2023-24531","EUVD-2023-28549","GHSA-cwpg-qgc6-jxvq","GO-2024-2962","UBUNTU-CVE-2023-24531","USN-7061-1","USN-7109-1"],"status":"published","title":"Output of \"go env\" does not sanitize values in cmd/go","description":"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 bahaviors, 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.","severity":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"adp","from":"cve"},"epss":{"day":"2026-11-12","score":0.0084,"percentile":0.5835,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"published":"2024-07-02T19:27:52Z","modified":"2026-11-05T05:40:51Z","fixes":[{"ecosystem":"Azure Linux:2","package":"msft-golang","fixed_in":["1.21.0-1"],"sources":["osv"]},{"ecosystem":"Azure Linux:2","package":"golang","fixed_in":["1.21.0-1"],"sources":["osv"]},{"ecosystem":"Azure Linux:3","package":"golang","fixed_in":["1.21.0-1"],"sources":["osv"]},{"ecosystem":"Bitnami","package":"golang","fixed_in":["1.21.0-0"],"sources":["osv"]},{"ecosystem":"Go","package":"toolchain","fixed_in":["1.21.0-0"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:16.04:LTS","package":"golang-1.18","fixed_in":["1.18.1-1ubuntu1~16.04.6+esm1"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:18.04:LTS","package":"golang-1.18","fixed_in":["1.18.1-1ubuntu1~18.04.4+esm1"],"sources":["osv"]},{"ecosystem":"Ubuntu:20.04:LTS","package":"golang-1.18","fixed_in":["1.18.1-1ubuntu1~20.04.3"],"sources":["osv"]},{"ecosystem":"Ubuntu:22.04:LTS","package":"golang-1.17","fixed_in":["1.17.13-3ubuntu1.2"],"sources":["osv"]},{"ecosystem":"Ubuntu:22.04:LTS","package":"golang-1.18","fixed_in":["1.18.1-1ubuntu1.2"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Azure Linux:2","package":"msft-golang","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.21.0-1"}]}]},{"source":"osv","ecosystem":"Azure Linux:2","package":"golang","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.19.0"},{"fixed":"1.21.0-1"}]}]},{"source":"osv","ecosystem":"Azure Linux:3","package":"golang","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.21.0-1"}]}]},{"source":"osv","ecosystem":"Azure Linux:3","package":"golang","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"1.26.10-1"}]}]},{"source":"osv","ecosystem":"Azure Linux:3","package":"golang","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.27.0"},{"last_affected":"1.27.1-1"}]}]},{"source":"osv","ecosystem":"Bitnami","package":"golang","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.21.0-0"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"golang-1.19","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.19.10-1","1.19.10-2","1.19.11-1","1.19.12-1","1.19.12-2","1.19.12-2~bpo11+1","1.19.12-2~bpo12+1","1.19.13-1","1.19.13-1~bpo11+1","1.19.13-1~bpo12+1","1.19.8-2","1.19.9-1"]},{"source":"osv","ecosystem":"Go","package":"toolchain","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.21.0-0"}]}]},{"source":"osv","ecosystem":"Ubuntu:14.04:LTS","package":"golang-1.10","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.10.4-2ubuntu1~14.04.1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"golang-1.18","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.18.1-1ubuntu1~16.04.6+esm1"}]}],"versions":["1.18.1-1ubuntu1~16.04.6"]},{"source":"osv","ecosystem":"Ubuntu:16.04:LTS","package":"golang-1.10","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.10.4-2ubuntu1~16.04.1","1.10.4-2ubuntu1~16.04.2"]},{"source":"osv","ecosystem":"Ubuntu:16.04:LTS","package":"golang-1.6","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.6-0ubuntu1","1.6-0ubuntu2","1.6-0ubuntu3","1.6-0ubuntu4","1.6-0ubuntu5","1.6.1-0ubuntu1","1.6.2-0ubuntu5~16.04","1.6.2-0ubuntu5~16.04.2","1.6.2-0ubuntu5~16.04.3","1.6.2-0ubuntu5~16.04.4"]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"golang-1.13","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.13.8-1ubuntu1~16.04.2","1.13.8-1ubuntu1~16.04.3","1.13.8-1ubuntu1~16.04.3+esm2","1.13.8-1ubuntu1~16.04.3+esm3"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"golang-1.10","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.10~rc1-1","1.10~rc1-1ubuntu1","1.10~rc1-2ubuntu1","1.10~rc2-1ubuntu1","1.10-1ubuntu1","1.10.1-1ubuntu2","1.10.4-2ubuntu1~18.04.1","1.10.4-2ubuntu1~18.04.2"]},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"golang-1.13","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.13.8-1ubuntu1~18.04.2","1.13.8-1ubuntu1~18.04.3","1.13.8-1ubuntu1~18.04.4","1.13.8-1ubuntu1~18.04.4+esm1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"golang-1.16","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.16.2-0ubuntu1~18.04.2","1.16.2-0ubuntu1~18.04.2+esm1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"golang-1.18","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.18.1-1ubuntu1~18.04.4+esm1"}]}],"versions":["1.18.1-1ubuntu1~18.04.3","1.18.1-1ubuntu1~18.04.4"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"golang-1.8","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.8.3-2ubuntu1","1.8.3-2ubuntu1.18.04.1"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"golang-1.9","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.9.1-2ubuntu1","1.9.2-1ubuntu1","1.9.2-3ubuntu1","1.9.3-1ubuntu1","1.9.4-1ubuntu1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"golang-1.18","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.18.1-1ubuntu1~20.04.3"}]}],"versions":["1.18.1-1ubuntu1~20.04.1","1.18.1-1ubuntu1~20.04.2"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"golang-1.13","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.13.1-1ubuntu1","1.13.3-1ubuntu1","1.13.4-1ubuntu1","1.13.5-1ubuntu1","1.13.6-1ubuntu1","1.13.6-2ubuntu1","1.13.7-1ubuntu1","1.13.8-1ubuntu1","1.13.8-1ubuntu1.1","1.13.8-1ubuntu1.2"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"golang-1.14","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.14~beta1-1","1.14~beta1-2","1.14~rc1-1","1.14-1","1.14.1-1","1.14.2-1","1.14.2-1ubuntu1","1.14.3-2ubuntu2~20.04.1","1.14.3-2ubuntu2~20.04.2"]},{"source":"osv","ecosystem":"Ubuntu:Pro:20.04:LTS","package":"golang-1.16","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.16.2-0ubuntu1~20.04","1.16.2-0ubuntu1~20.04.1","1.16.2-0ubuntu1~20.04.1+esm1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"golang-1.20","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.20.3-1ubuntu0.1~20.04","1.20.3-1ubuntu0.1~20.04.1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"golang-1.21","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.21.1-1~ubuntu20.04.1","1.21.1-1~ubuntu20.04.2","1.21.1-1~ubuntu20.04.3"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"golang-1.17","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.17.13-3ubuntu1.2"}]}],"versions":["1.17-1ubuntu2","1.17.3-1ubuntu1","1.17.3-1ubuntu2","1.17.13-3ubuntu1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"golang-1.18","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.18.1-1ubuntu1.2"}]}],"versions":["1.18~beta1-0ubuntu1","1.18~beta2-1ubuntu1","1.18~beta2-1ubuntu2","1.18~rc1-1ubuntu1","1.18-1ubuntu1","1.18.1-1ubuntu1","1.18.1-1ubuntu1.1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"golang-1.20","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.20.3-1ubuntu0.1~22.04","1.20.3-1ubuntu0.1~22.04.1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"golang-1.21","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.21.1-1~ubuntu22.04.1","1.21.1-1~ubuntu22.04.2","1.21.1-1~ubuntu22.04.3","1.21.1-1~ubuntu22.04.4"]},{"source":"osv","ecosystem":"Ubuntu:Pro:22.04:LTS","package":"golang-1.13","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.13.8-1ubuntu2","1.13.8-1ubuntu2.22.04.1","1.13.8-1ubuntu2.22.04.1+esm1","1.13.8-1ubuntu2.22.04.2"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"golang-1.21","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.21.1-1","1.21.3-1","1.21.4-1","1.21.5-1","1.21.6-1","1.21.7-1","1.21.7-2","1.21.8-1","1.21.8-1build1","1.21.9-1","1.21.9-1ubuntu0.1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"golang-1.17","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.17.13-3ubuntu1.2"}]}],"versions":["1.17-1ubuntu2","1.17.3-1ubuntu1","1.17.3-1ubuntu2","1.17.13-3ubuntu1"],"bundled":11},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"golang-1.18","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.18.1-1ubuntu1~16.04.6+esm1"}]}],"versions":["1.18.1-1ubuntu1~16.04.6"],"bundled":25},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"golang-1.18","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.18.1-1ubuntu1~18.04.4+esm1"}]}],"versions":["1.18.1-1ubuntu1~18.04.3","1.18.1-1ubuntu1~18.04.4"],"bundled":25},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"golang-1.18","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.18.1-1ubuntu1~20.04.3"}]}],"versions":["1.18.1-1ubuntu1~20.04.1","1.18.1-1ubuntu1~20.04.2"],"bundled":25},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"golang-1.18","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.18.1-1ubuntu1.2"}]}],"versions":["1.18~beta1-0ubuntu1","1.18~beta2-1ubuntu1","1.18~beta2-1ubuntu2","1.18~rc1-1ubuntu1","1.18-1ubuntu1","1.18.1-1ubuntu1","1.18.1-1ubuntu1.1"],"bundled":25}],"products":[{"vendor":"go toolchain","product":"cmd/go"},{"vendor":"gotoolchain","product":"cmd\\/go"}],"references":[{"url":"https://go.dev/cl/488375","tags":["x_transferred","web","fix","report"]},{"url":"https://go.dev/cl/493535","tags":["x_transferred","web","fix","report"]},{"url":"https://go.dev/issue/58508","tags":["x_transferred","web","report"]},{"url":"https://groups.google.com/g/golang-dev/c/ixHOFpSbajE/m/8EjlbKVWAwAJ","tags":["x_transferred","web","report"]},{"url":"https://pkg.go.dev/vuln/GO-2024-2962","tags":["x_transferred","web","report"]},{"url":"https://security.netapp.com/advisory/ntap-20250328-0005/","tags":["web","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-24531","tags":["web"]},{"url":"https://security.netapp.com/advisory/ntap-20250328-0005"},{"url":"https://github.com/advisories/GHSA-cwpg-qgc6-jxvq"},{"url":"https://docs.bell-sw.com/security/cves/CVE-2023-24531","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2023-24531","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2023-24531","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2023-24531","tags":["report"]},{"url":"https://ubuntu.com/security/notices/USN-7061-1","tags":["advisory"]},{"url":"https://ubuntu.com/security/notices/USN-7109-1","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2023-24538","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2023-29402","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2023-29403","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2023-29404","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2023-29405","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2023-29406","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2023-39318","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2023-39319","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2023-39325","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2024-24785","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2022-41723","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2022-41724","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2022-41725","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2023-24536","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2023-39323","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2023-45288","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2023-45290","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2024-24783","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2024-24784","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2024-24789","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2024-24790","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2024-24791","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2024-34155","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2024-34156","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2024-34158","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2023-24531","title":"Output of \"go env\" does not sanitize values in cmd/go","description":"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 bahaviors, 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.","status":"published","published":"2024-07-02T19:51:48.731Z","modified":"2025-03-28T15:02:59.076Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"adp"}],"updated_at":"2026-11-02T14:35:26.63732Z"}],"euvd":[{"id":"EUVD-2023-28549","description":"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 bahaviors, 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.","status":"published","published":"2024-07-02T19:51:48Z","modified":"2025-03-28T15:02:59Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T20:52:48.15902Z"}],"ghsa":[{"id":"GHSA-cwpg-qgc6-jxvq","title":"Command go env is documented as outputting a shell script containing the Go environment. However,...","description":"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 bahaviors, 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.","status":"published","published":"2024-07-02T21:32:16Z","modified":"2025-03-28T15:31:50Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:00:30.942475Z"}],"nvd":[{"id":"CVE-2023-24531","description":"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 bahaviors, 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.","status":"published","published":"2024-07-02T20:15:05.27Z","modified":"2026-06-17T05:39:28.43Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"secondary"}],"updated_at":"2026-11-02T14:09:17.205287Z"}],"osv":[{"id":"BELL-CVE-2023-24531","title":"CVE-2023-24531 does not affect BellSoft software","status":"withdrawn","published":"2024-07-04T05:58:18.719132Z","modified":"2026-01-26T09:47:34.519843Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:28:17.742221Z"},{"id":"DEBIAN-CVE-2023-24531","description":"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 bahaviors, 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.","status":"published","published":"2024-07-02T20:15:05.27Z","modified":"2026-10-26T18:00:42.160299143Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:45:39.369204Z"},{"id":"UBUNTU-CVE-2023-24531","description":"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 bahaviors, 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.","status":"published","published":"2024-07-02T20:15:00Z","modified":"2026-10-06T23:30:49.123124873Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T16:54:20.198616Z"},{"id":"AZL-43104","title":"CVE-2023-24531 affecting package msft-golang for versions less than 1.21.0-1","description":"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 bahaviors, 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.","status":"published","published":"2024-07-02T20:15:05Z","modified":"2026-04-21T04:30:53.159101Z","updated_at":"2026-11-02T15:28:05.284713Z"},{"id":"AZL-43110","title":"CVE-2023-24531 affecting package golang for versions less than 1.21.0-1","description":"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 bahaviors, 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.","status":"published","published":"2024-07-02T20:15:05Z","modified":"2026-04-21T04:30:53.110648Z","updated_at":"2026-11-02T15:28:05.284713Z"},{"id":"AZL-52719","title":"CVE-2023-24531 affecting package golang for versions less than 1.21.0-1","description":"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 bahaviors, 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.","status":"published","published":"2024-07-02T20:15:05Z","modified":"2026-04-21T04:51:59.68386Z","updated_at":"2026-11-02T15:28:06.595149Z"},{"id":"AZL-79036","title":"CVE-2023-24531 affecting package golang 1.26.10-1","description":"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 bahaviors, 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.","status":"published","published":"2024-07-02T20:15:05Z","modified":"2026-11-05T05:40:51Z","updated_at":"2026-11-05T16:41:24.800038Z"},{"id":"AZL-98667","title":"CVE-2023-24531 affecting package golang 1.27.1-1","description":"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 bahaviors, 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.","status":"published","published":"2024-07-02T20:15:05Z","modified":"2026-09-16T06:39:01Z","updated_at":"2026-11-02T15:28:12.596039Z"},{"id":"BIT-golang-2023-24531","title":"Output of \"go env\" does not sanitize values in cmd/go","description":"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 bahaviors, 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.","status":"published","published":"2024-07-04T07:29:14.949Z","modified":"2025-05-20T10:02:07.006Z","updated_at":"2026-11-02T15:28:30.70064Z"},{"id":"CVE-2023-24531","description":"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 bahaviors, 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.","status":"published","published":"2024-07-02T20:15:05Z","modified":"2026-04-10T04:55:51.443206Z","updated_at":"2026-11-02T15:44:30.709518Z"},{"id":"GO-2024-2962","title":"Output of \"go env\" does not sanitize values in cmd/go","description":"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 bahaviors, including executing arbitrary commands or inserting new environment variables.\n\nThis 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.","status":"published","published":"2024-07-02T19:27:52Z","modified":"2026-02-04T03:51:26.716092Z","updated_at":"2026-11-02T15:47:01.453823Z"},{"id":"USN-7061-1","title":"golang-1.17 vulnerabilities","description":"Hunter Wittenborn discovered that Go incorrectly handled the sanitization\nof environment variables. An attacker could possibly use this issue to run\narbitrary commands. (CVE-2023-24531)\n\nSohom Datta discovered that Go did not properly validate backticks (`) as\nJavascript string delimiters, and did not escape them as expected. An\nattacker could possibly use this issue to inject arbitrary Javascript code\ninto the Go template. (CVE-2023-24538)\n\nJuho Nurminen discovered that Go incorrectly handled certain special\ncharacters in directory or file paths. An attacker could possibly use\nthis issue to inject code into the resulting binaries. (CVE-2023-29402)\n\nVincent Dehors discovered that Go incorrectly handled permission bits.\nAn attacker could possibly use this issue to read or write files with\nelevated privileges. (CVE-2023-29403)\n\nJuho Nurminen discovered that Go incorrectly handled certain crafted\narguments. An attacker could possibly use this issue to execute arbitrary\ncode at build time. (CVE-2023-29405)\n\nIt was discovered that Go incorrectly validated the contents of host\nheaders. A remote attacker could possibly use this issue to inject\nadditional headers or entire requests. (CVE-2023-29406)\n\nTakeshi Kaneko discovered that Go did not properly handle comments and\nspecial tags in the script context of html/template module. An attacker\ncould possibly use this issue to inject Javascript code and perform a\ncross-site scripting attack. (CVE-2023-39318, CVE-2023-39319)\n\nIt was discovered that Go did not limit the number of simultaneously\nexecuting handler goroutines in the net/http module. An attacker could\npossibly use this issue to cause a panic resulting in a denial of service.\n(CVE-2023-39325)\n\nIt was discovered that the Go html/template module did not validate errors\nreturned from MarshalJSON methods. An attacker could possibly use this\nissue to inject arbitrary code into the Go template. (CVE-2024-24785)\n","status":"published","published":"2024-10-10T12:55:01Z","modified":"2026-04-27T17:30:53.50497Z","updated_at":"2026-11-02T16:58:18.876384Z"},{"id":"USN-7109-1","title":"golang-1.18 vulnerabilities","description":"Philippe Antoine discovered that Go incorrectly handled crafted HTTP/2\nstreams. An attacker could possibly use this issue to cause a denial of\nservice. (CVE-2022-41723)\n\nMarten Seemann discovered that Go did not properly manage memory under\ncertain circumstances. An attacker could possibly use this issue to cause\na panic resulting in a denial of service. (CVE-2022-41724)\n\nAmeya Darshan and Jakob Ackermann discovered that Go did not properly\nvalidate the amount of memory and disk files ReadForm can consume. An\nattacker could possibly use this issue to cause a panic resulting in a\ndenial of service. (CVE-2022-41725)\n\nHunter Wittenborn discovered that Go incorrectly handled the sanitization\nof environment variables. An attacker could possibly use this issue to run\narbitrary commands. (CVE-2023-24531)\n\nJakob Ackermann discovered that Go incorrectly handled multipart\nforms. An attacker could possibly use this issue to consume an excessive\namount of resources, resulting in a denial of service. (CVE-2023-24536)\n\nJuho Nurminen discovered that Go incorrectly handled certain special\ncharacters in directory or file paths. An attacker could possibly use\nthis issue to inject code into the resulting binaries. (CVE-2023-29402)\n\nVincent Dehors discovered that Go incorrectly handled permission bits.\nAn attacker could possibly use this issue to read or write files with\nelevated privileges. (CVE-2023-29403)\n\nJuho Nurminen discovered that Go incorrectly handled certain compiler\ndirectives. An attacker could possibly use this issue to execute arbitrary\ncode. (CVE-2023-29404)\n\nJuho Nurminen discovered that Go incorrectly handled certain crafted\narguments. An attacker could possibly use this issue to execute arbitrary\ncode at build time. (CVE-2023-29405)\n\nBartek Nowotarski discovered that Go incorrectly validated the contents of\nhost headers. A remote attacker could possibly use this issue to inject\nadditional headers or entire requests. (CVE-2023-29406)\n\nTakeshi Kaneko discovered that Go did not properly handle comments and\nspecial tags in the script context of html/template module. An attacker\ncould possibly use this issue to inject Javascript code and perform a\ncross-site scripting attack. (CVE-2023-39318, CVE-2023-39319)\n\nIt was discovered that Go did not properly validate the \"//go:cgo_\"\ndirectives during compilation. An attacker could possibly use this issue\nto inject arbitrary code during compile time. (CVE-2023-39323)\n\nIt was discovered that Go did not limit the number of simultaneously\nexecuting handler goroutines in the net/http module. An attacker could\npossibly use this issue to cause a panic resulting in a denial of service.\n(CVE-2023-39325)\n\nBartek Nowotarski was discovered that the Go net/http module did not\nproperly handle the requests when request's headers exceed MaxHeaderBytes.\nAn attacker could possibly use this issue to cause a panic resulting into\na denial of service. (CVE-2023-45288)\n\nBartek Nowotarski discovered that the Go net/http module did not properly\nvalidate the total size of the parsed form when parsing a multipart form.\nAn attacker could possibly use this issue to cause a panic resulting into a\ndenial of service. (CVE-2023-45290)\n\nJohn Howard discovered that the Go crypto/x509 module did not properly\nhandle a certificate chain which contains a certificate with an unknown\npublic key algorithm. An attacker could possibly use this issue to cause\na panic resulting into a denial of service. (CVE-2024-24783)\n\nJuho Nurminen discovered that the Go net/mail module did not properly\nhandle comments within display names in the ParseAddressList function.\nAn attacker could possibly use this issue to cause a panic resulting into\na denial of service. (CVE-2024-24784)\n\nIt was discovered that the Go html/template module did not validate errors\nreturned from MarshalJSON methods. An attacker could possibly use this\nissue to inject arbitrary code into the Go template. (CVE-2024-24785)\n\nYufan You discovered that the Go archive/zip module did not properly\nhandle certain types of invalid zip files differs from the behavior of\nmost zip implementations. An attacker could possibly use this issue to\ncause a panic resulting into a denial of service. (CVE-2024-24789)\n\nEnze Wang and Jianjun Chen discovered that the Go net/netip module did\nnot work as expected for IPv4-mapped IPv6 addresses in various Is methods.\nAn attacker could possibly use this issue to cause a panic resulting into\na denial of service. (CVE-2024-24790)\n\nGeoff Franks discovered that the Go net/http module did not properly\nhandle responses to requests with an \"Expect: 100-continue\" header under\ncertain circumstances. An attacker could possibly use this issue to\ncause a denial of service. (CVE-2024-24791)\n\nIt was discovered that the Go parser module did not properly handle deeply\nnested literal values. An attacker could possibly use this issue to cause\na panic resulting in a denial of service. (CVE-2024-34155)\n\nMd Sakib Anwar discovered that the Go encoding/gob module did not properly\nhandle message decoding under certain circumstances. An attacker could\npossibly use this issue to cause a panic resulting in a denial of service.\n(CVE-2024-34156)\n\nIt was discovered that the Go build module did not properly handle certain\nbuild tag lines with deeply nested expressions. An attacker could possibly\nuse this issue to cause a panic resulting in a denial of service.\n(CVE-2024-34158)\n","status":"published","published":"2024-11-14T13:57:58Z","modified":"2026-06-25T13:32:29.525356949Z","updated_at":"2026-11-02T16:58:18.876384Z"}]}}
