Improper Neutralization of Null Byte or NUL Character Affecting std/os/exec package, versions <1.18.8>=1.19.0-0 <1.19.3


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.78% (53rd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-GOLANG-STDOSEXEC-14546536
  • published6 Jan 2026
  • disclosed1 Nov 2022
  • creditRyotaK

Introduced: 1 Nov 2022

CVE-2022-41716  (opens in a new tab)
CWE-158  (opens in a new tab)

How to fix?

Upgrade std/os/exec to version 1.18.8, 1.19.3 or higher.

Overview

std/os/exec is a Go standard library package std/os/exec

Affected versions of this package are vulnerable to Improper Neutralization of Null Byte or NUL Character.

Go Vulnerability Report:
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"`.

CVSS Base Scores

version 4.0
version 3.1