{"id":"GO-2022-1095","summary":"Unsanitized NUL in environment variables on Windows in syscall and os/exec","details":"Due to unsanitized NUL values, attackers may be able to maliciously set environment variables on Windows.\n\nIn syscall.StartProcess and os/exec.Cmd, invalid environment variable values containing NUL values are not properly checked for. A malicious environment variable value can exploit this behavior to set a value for a different environment variable. For example, the environment variable string \"A=B\\x00C=D\" sets the variables \"A=B\" and \"C=D\".","aliases":["BIT-golang-2022-41716","CVE-2022-41716"],"modified":"2026-02-04T04:25:45.960420Z","published":"2022-11-01T23:55:57Z","related":["CGA-9rv3-jcj4-8wx9"],"database_specific":{"review_status":"REVIEWED","url":"https://pkg.go.dev/vuln/GO-2022-1095"},"references":[{"type":"REPORT","url":"https://go.dev/issue/56284"},{"type":"FIX","url":"https://go.dev/cl/446916"},{"type":"WEB","url":"https://groups.google.com/g/golang-announce/c/mbHY1UY3BaM/m/hSpmRzk-AgAJ"}],"affected":[{"package":{"name":"stdlib","ecosystem":"Go","purl":"pkg:golang/stdlib"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.18.8"},{"introduced":"1.19.0-0"},{"fixed":"1.19.3"}]}],"ecosystem_specific":{"imports":[{"path":"syscall","goos":["windows"],"symbols":["StartProcess"]},{"path":"os/exec","goos":["windows"],"symbols":["Cmd.CombinedOutput","Cmd.Environ","Cmd.Output","Cmd.Run","Cmd.Start","Cmd.environ","dedupEnv","dedupEnvCase"]}]},"database_specific":{"source":"https://vuln.go.dev/ID/GO-2022-1095.json"}}],"schema_version":"1.7.3","credits":[{"name":"RyotaK (https://twitter.com/ryotkak)"}]}