CVE-2022-41716

published 2 Nov 2022 · updated 12 Nov 2026

Unsanitized NUL in environment variables on Windows in syscall and os/exec

6.3MediumCVSS 6.3EPSS 1%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 1%. Fixed in 1.18.8 and 1.19.3.

Due to unsanitized NUL values, attackers may be able to maliciously set environment variables on Windows. In 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".

Affected

Vendors, products and packages with version ranges

VendorProductVersionsFixed
Go standard library<1.18.8, >=1.19.0-0 <1.19.31.18.8, 1.19.3

Timeline

Every event on this vulnerability

Embed

A live severity badge for an advisory, README or ticket

CVE-2022-41716 severity on Zeptric[![CVE-2022-41716](https://zeptric.io/badge/cve/CVE-2022-41716.svg)](https://zeptric.io/cve/CVE-2022-41716)