CVE-2022-41716: Unsanitized NUL in environment variables on Windows in syscall and os/exec

Published Nov 2, 2022
·
Updated

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".

Other sources

Golang Go could allow a remote attacker to bypass security restrictions, caused by improper checking for invalid environment variable values in syscall.StartProcess and os/exec.Cmd. By using a specially-crafted environment variable value, an attacker could exploit this vulnerability to set a value for a different environment variable.

Affected Software

12 affected components
All of the following
Any of the following
Golang Go<1.18.8
Golang Go>=1.19.0<1.19.3
Microsoft Windows
Golang Go<1.18.8
Golang Go>=1.19.0<1.19.3
Microsoft Windows
IBM Data Virtualization on Cloud Pak for Data<=3.0
IBM Watson Query on Cloud Pak for Data<=2.2
IBM Watson Query on Cloud Pak for Data<=2.1
IBM Watson Query on Cloud Pak for Data<=2.0
IBM Data Virtualization on Cloud Pak for Data<=1.8
IBM Data Virtualization on Cloud Pak for Data<=1.7

Event History

Nov 2, 2022
CVE Published
via MITRE·03:28 PM
Data Sourced
via MITRE·03:28 PM
DescriptionWeakness
Data Sourced
via NVD·04:15 PM
RemedyDescriptionSeverityAffected Software
Aug 15, 2025
Data Sourced
via IBM·03:29 PM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the vulnerability ID for this issue?

The vulnerability ID is CVE-2022-41716.

2

What is the severity of CVE-2022-41716?

The severity of CVE-2022-41716 is high with a score of 7.5.

3

How can a remote attacker exploit CVE-2022-41716?

A remote attacker can exploit CVE-2022-41716 by maliciously setting environment variables on Windows.

4

Which versions of Golang Go are affected by CVE-2022-41716?

Versions up to 1.18.8 and versions between 1.19.0 and 1.19.3 of Golang Go are affected by CVE-2022-41716.

5

Are there any patches or fixes available for CVE-2022-41716?

Refer to the references for patches or fixes available for CVE-2022-41716.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203