CVE-2022-41716: Due to unsanitized NUL values, attackers may be able to maliciously set environment variables on Windows.
High CVSS 7.5
- CVE id
- CVE-2022-41716
- Published
- Last modified
Affected packages
| Package | Affected versions | Fixed in |
|---|---|---|
| Go Runtimes and servers |
< 1.18.8 >= 1.19.0, < 1.19.3 |
1.18.8, 1.19.3 |
How to fix it
Upgrade Go to the fixed release of the line you run: 1.18.8, 1.19.3.
go version
- Build with the patched Go release (set "toolchain" in go.mod, or the golang image tag) and redeploy: Go programs include the standard library, so they must be rebuilt.
A free AIssue account reads the runtime versions your repositories pin (version files, Dockerfiles, build files) and tells you when one is affected.
Details
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".
References
- CVE-2022-41716 on the NVD
- Advisory: https://nvd.nist.gov/vuln/detail/CVE-2022-41716
- Web: https://go.dev/cl/446916
- Web: https://go.dev/issue/56284
- Web: https://groups.google.com/g/golang-announce/c/mbHY1UY3BaM/m/hSpmRzk-AgAJ
- Web: https://pkg.go.dev/vuln/GO-2022-1095
- Web: https://go.dev/cl/446916
- Web: https://go.dev/issue/56284
- Web: https://groups.google.com/g/golang-announce/c/mbHY1UY3BaM/m/hSpmRzk-AgAJ
- Web: https://pkg.go.dev/vuln/GO-2022-1095
- Web: https://security.netapp.com/advisory/ntap-20230120-0007/
Am I affected?
Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.
About this data
Source: National Vulnerability Database (NVD) (public domain). Severity comes from the advisory's own rating when it has one, else from its CVSS score.