Every CVE Search/ Get API key

CVE-2022-41716

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

7.5 HighFix available

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

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
High
Availability
None

Exploit likelihood

1.03%Up 0.1 points since Nov 3, 2022
90%50%10%1%

What each source reports

NVD Score used 7.5

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

Record
CVE-2022-41716
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
CVSS 3.1
6.3 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
Updated
2026-11-02
CVE List 6.3

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

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

Record
CVE-2022-41716
CVSS 3.1
6.3 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
Updated
2026-11-02
EUVDEUVD-2022-44892 6.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".

Record
EUVD-2022-44892
CVSS 3.1
6.3 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
Updated
2026-11-03
GitHub AdvisoriesGHSA-mh68-qf2j-8c5g 7.5

Due to unsanitized NUL values, attackers may be able to maliciously set environment variables on...

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

Record
GHSA-mh68-qf2j-8c5g
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Weakness
CWE-74, CWE-158
Updated
2026-11-02
OSVAZL-79026 7.5

CVE-2022-41716 affecting package golang 1.25.7-1

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

Record
AZL-79026
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Updated
2026-11-02
OSVAZL-98883 7.5

CVE-2022-41716 affecting package golang 1.27.1-1

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

Record
AZL-98883
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Updated
2026-11-02
Show 13 moreShow less
OSVBELL-CVE-2022-41716 7.5

CVE-2022-41716 does not affect BellSoft software

Record
BELL-CVE-2022-41716
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Updated
2026-11-02
OSV 6.3

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

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

Record
CVE-2022-41716
CVSS 3.1
6.3 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
Updated
2026-11-02
OSVDEBIAN-CVE-2022-41716 7.5

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

Record
DEBIAN-CVE-2022-41716
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Updated
2026-11-03
OSVOESA-2022-2115 7.5

golang security update

The Go Programming Language.

Security Fix(es):

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".(CVE-2022-41716)

Record
OESA-2022-2115
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Updated
2026-11-02
OSVUBUNTU-CVE-2022-41716 6.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".

Record
UBUNTU-CVE-2022-41716
CVSS 3.1
6.3 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Updated
2026-11-02
OSVBIT-golang-2022-41716 No score

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

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

Record
BIT-golang-2022-41716
Updated
2026-11-02
OSVGO-2022-1095 No score

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

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

Record
GO-2022-1095
Updated
2026-11-02
OSVMGASA-2022-0444 No score

Updated golang packages fix security vulnerability

Fixed unsanitized NUL in environment variables in syscalls, os/exec (go#56327) (bsc#1204941). (CVE-2022-41716)

runtime: lock count" fatal error when cgo is enabled (go#56308)

Record
MGASA-2022-0444
Updated
2026-11-02
OSVopenSUSE-SU-2024:12471-1 No score

go1.18-1.18.8-1.1 on GA media

These are all security issues fixed in the go1.18-1.18.8-1.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2024:12471-1
Updated
2026-11-02
OSVopenSUSE-SU-2024:12472-1 No score

go1.19-1.19.3-1.1 on GA media

These are all security issues fixed in the go1.19-1.19.3-1.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2024:12472-1
Updated
2026-11-02
OSVSUSE-SU-2022:4054-1 No score

Security update for go1.19

This update for go1.19 fixes the following issues:

Update to go 1.19.3 (released 2022-11-01) (bsc#1200441):

Security fixes:

  • CVE-2022-41716: Fixed unsanitized NUL in environment variables in syscalls, os/exec (go#56327) (bsc#1204941).

Bugfixes:

  • runtime: lock count' fatal error when cgo is enabled (go#56308).
  • cmd/compile: libFuzzer instrumentation fakePC overflow on 386 arch (go#56168).
  • internal/fuzz: array literal initialization causes ICE 'unhandled stmt ASOP' while fuzzing (go#56106).
Record
SUSE-SU-2022:4054-1
Updated
2026-11-02
OSVSUSE-SU-2022:4055-1 No score

Security update for go1.18

This update for go1.18 fixes the following issues:

Update to go 1.18.8 (released 2022-11-01) (bsc#1193742):

Security fixes:

  • CVE-2022-41716: Fixed unsanitized NUL in environment variables in syscalls, os/exec (go#56327) (bsc#1204941).

Bugfixes:

  • runtime: lock count' fatal error when cgo is enabled (go#56308).
Record
SUSE-SU-2022:4055-1
Updated
2026-11-02
OSVSUSE-SU-2023:2312-1 No score

Security update for go1.18-openssl

This update for go1.18-openssl fixes the following issues:

  • Add subpackage go1.x-libstd compiled shared object libstd.so (jsc#PED-1962)

    • Main go1.x package included libstd.so in previous versions
    • Split libstd.so into subpackage that can be installed standalone
    • Continues the slimming down of main go1.x package by 40 Mb
    • Experimental and not recommended for general use, Go currently has no ABI
    • Upstream Go has not committed to support buildmode=shared long-term
    • Do not use in packaging, build static single binaries (the default)
    • Upstream Go go1.x binary releases do not include libstd.so
    • go1.x Suggests go1.x-libstd so not installed by default Recommends
    • go1.x-libstd does not Require: go1.x so can install standalone
    • Provides go-libstd unversioned package name
    • Fix build step -buildmode=shared std to omit -linkshared
  • Packaging improvements:

    • go1.x Suggests go1.x-doc so not installed by default Recommends
    • Use Group: Development/Languages/Go instead of Other
  • Improvements to go1.x packaging spec:

    • On Tumbleweed bootstrap with current default gcc13 and gccgo118
    • On SLE-12 aarch64 ppc64le ppc64 remove overrides to bootstrap using go1.x package (%bcond_without gccgo). This is no longer needed on current SLE-12:Update and removing will consolidate the build configurations used.
    • Change source URLs to go.dev as per Go upstream
    • On x86_64 export GOAMD64=v1 as per the current baseline. At this time forgo GOAMD64=v3 option for x86_64_v3 support.
    • On x86_64 %define go_amd64=v1 as current instruction baseline
  • Update to version 1.18.10.1 cut from the go1.18-openssl-fips branch at the revision tagged go1.18.10-1-openssl-fips.

    • Merge branch dev.boringcrypto.go1.18 into go1.18-openssl-fips
    • Merge go1.18.10 into dev.boringcrypto.go1.18
  • go1.18.10 (released 2023-01-10) includes fixes to cgo, the compiler, the linker, and the crypto/x509, net/http, and syscall packages. Refs bsc#1193742 go1.18 release tracking

    • go#57705 misc/cgo: backport needed for dlltool fix
    • go#57426 crypto/x509: Verify on macOS does not return typed errors
    • go#57344 cmd/compile: the loong64 intrinsic for CompareAndSwapUint32 function needs to sign extend its 'old' argument.
    • go#57338 syscall, internal/poll: accept4-to-accept fallback removal broke Go code on Synology DSM 6.2 ARM devices
    • go#57213 os: TestLstat failure on Linux Aarch64
    • go#57211 reflect: sort.SliceStable sorts incorrectly on arm64 with less function created with reflect.MakeFunc and slice of sufficient length
    • go#57057 cmd/go: remove test dependency on gopkg.in service
    • go#57054 cmd/go: TestScript/version_buildvcs_git_gpg (if enabled) fails on linux longtest builders
    • go#57044 cgo: malformed DWARF TagVariable entry
    • go#57028 cmd/cgo: Wrong types in compiler errors with clang 14
    • go#56833 cmd/link/internal/ppc64: too-far trampoline is reused
    • go#56711 net: reenable TestLookupDotsWithRemoteSource and TestLookupGoogleSRV with a different target
    • go#56323 net/http: bad handling of HEAD requests with a body
Record
SUSE-SU-2023:2312-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
golang
Azure Linux:3
through 1.25.7-1 None known
golang
Azure Linux:3
1.27.0 to 1.27.1-1 None known
golang
Bitnami
before 1.18.8, 1.19.0 up to 1.19.3
1.18.81.19.3
golang-1.19
Debian:12
before 1.19.3-1
1.19.3-1
stdlib
Go
before 1.18.8, 1.19.0-0 up to 1.19.3
1.18.81.19.3
golang
Mageia:8
before 1.18.8-1.mga8
1.18.8-1.mga8
golang
openEuler:20.03-LTS-SP1
before 1.15.7-22.oe1
1.15.7-22.oe1
golang
openEuler:20.03-LTS-SP3
before 1.15.7-22.oe1
1.15.7-22.oe1
golang
openEuler:22.03-LTS
before 1.17.3-12.oe2203
1.17.3-12.oe2203
go1.19
SUSE:Linux Enterprise Module for Development Tools 15 SP3
before 1.19.3-150000.1.15.1
1.19.3-150000.1.15.1
Show 38 moreShow less
Affected packages
PackageAffectedFixed
go1.19
SUSE:Linux Enterprise Module for Development Tools 15 SP4
before 1.19.3-150000.1.15.1
1.19.3-150000.1.15.1
go1.19
openSUSE:Leap 15.3
before 1.19.3-150000.1.15.1
1.19.3-150000.1.15.1
go1.19
openSUSE:Leap 15.4
before 1.19.3-150000.1.15.1
1.19.3-150000.1.15.1
go1.18
SUSE:Linux Enterprise Module for Development Tools 15 SP3
before 1.18.8-150000.1.37.1
1.18.8-150000.1.37.1
go1.18
SUSE:Linux Enterprise Module for Development Tools 15 SP4
before 1.18.8-150000.1.37.1
1.18.8-150000.1.37.1
go1.18
openSUSE:Leap 15.3
before 1.18.8-150000.1.37.1
1.18.8-150000.1.37.1
go1.18
openSUSE:Leap 15.4
before 1.18.8-150000.1.37.1
1.18.8-150000.1.37.1
go1.18-openssl
SUSE:Linux Enterprise Module for Development Tools 15 SP4
From an advisory covering 28 CVEs
before 1.18.10.1-150000.1.9.1
1.18.10.1-150000.1.9.1
go1.18-openssl
SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS
From an advisory covering 28 CVEs
before 1.18.10.1-150000.1.9.1
1.18.10.1-150000.1.9.1
go1.18-openssl
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS
From an advisory covering 28 CVEs
before 1.18.10.1-150000.1.9.1
1.18.10.1-150000.1.9.1
go1.18-openssl
SUSE:Linux Enterprise Real Time 15 SP3
From an advisory covering 28 CVEs
before 1.18.10.1-150000.1.9.1
1.18.10.1-150000.1.9.1
go1.18-openssl
SUSE:Linux Enterprise Server 15 SP3-LTSS
From an advisory covering 28 CVEs
before 1.18.10.1-150000.1.9.1
1.18.10.1-150000.1.9.1
go1.18-openssl
SUSE:Linux Enterprise Server for SAP Applications 15 SP3
From an advisory covering 28 CVEs
before 1.18.10.1-150000.1.9.1
1.18.10.1-150000.1.9.1
go1.18-openssl
SUSE:Enterprise Storage 7.1
From an advisory covering 28 CVEs
before 1.18.10.1-150000.1.9.1
1.18.10.1-150000.1.9.1
go1.18-openssl
openSUSE:Leap 15.4
From an advisory covering 28 CVEs
before 1.18.10.1-150000.1.9.1
1.18.10.1-150000.1.9.1
go1.18-openssl
openSUSE:Leap 15.5
From an advisory covering 28 CVEs
before 1.18.10.1-150000.1.9.1
1.18.10.1-150000.1.9.1
golang-1.10
Ubuntu:14.04:LTS
All versions, plus listed versions
1.10.4-2ubuntu1~14.04.1
None known
golang-1.10
Ubuntu:16.04:LTS
All versions, plus listed versions
1.10.4-2ubuntu1~16.04.11.10.4-2ubuntu1~16.04.2
None known
golang-1.6
Ubuntu:16.04:LTS
All versions, plus listed versions
1.6-0ubuntu11.6-0ubuntu21.6-0ubuntu31.6-0ubuntu41.6-0ubuntu5
Show 5 moreShow less
1.6.1-0ubuntu11.6.2-0ubuntu5~16.041.6.2-0ubuntu5~16.04.21.6.2-0ubuntu5~16.04.31.6.2-0ubuntu5~16.04.4
None known
golang-1.13
Ubuntu:Pro:16.04:LTS
All versions, plus listed versions
1.13.8-1ubuntu1~16.04.21.13.8-1ubuntu1~16.04.31.13.8-1ubuntu1~16.04.3+esm21.13.8-1ubuntu1~16.04.3+esm3
None known
golang-1.18
Ubuntu:Pro:16.04:LTS
All versions, plus listed versions
1.18.1-1ubuntu1~16.04.61.18.1-1ubuntu1~16.04.6+esm1
None known
golang-1.10
Ubuntu:18.04:LTS
All versions, plus listed versions
1.10~rc1-11.10~rc1-1ubuntu11.10~rc1-2ubuntu11.10~rc2-1ubuntu11.10-1ubuntu11.10.1-1ubuntu21.10.4-2ubuntu1~18.04.11.10.4-2ubuntu1~18.04.2
None known
golang-1.13
Ubuntu:Pro:18.04:LTS
All versions, plus listed versions
1.13.8-1ubuntu1~18.04.21.13.8-1ubuntu1~18.04.31.13.8-1ubuntu1~18.04.41.13.8-1ubuntu1~18.04.4+esm1
None known
golang-1.16
Ubuntu:Pro:18.04:LTS
All versions, plus listed versions
1.16.2-0ubuntu1~18.04.21.16.2-0ubuntu1~18.04.2+esm1
None known
golang-1.18
Ubuntu:Pro:18.04:LTS
All versions, plus listed versions
1.18.1-1ubuntu1~18.04.31.18.1-1ubuntu1~18.04.41.18.1-1ubuntu1~18.04.4+esm1
None known
golang-1.8
Ubuntu:18.04:LTS
All versions, plus listed versions
1.8.3-2ubuntu11.8.3-2ubuntu1.18.04.1
None known
golang-1.9
Ubuntu:18.04:LTS
All versions, plus listed versions
1.9.1-2ubuntu11.9.2-1ubuntu11.9.2-3ubuntu11.9.3-1ubuntu11.9.4-1ubuntu1
None known
golang-1.13
Ubuntu:20.04:LTS
All versions, plus listed versions
1.13.1-1ubuntu11.13.3-1ubuntu11.13.4-1ubuntu11.13.5-1ubuntu11.13.6-1ubuntu1
Show 5 moreShow less
1.13.6-2ubuntu11.13.7-1ubuntu11.13.8-1ubuntu11.13.8-1ubuntu1.11.13.8-1ubuntu1.2
None known
golang-1.14
Ubuntu:20.04:LTS
All versions, plus listed versions
1.14~beta1-11.14~beta1-21.14~rc1-11.14-11.14.1-1
Show 4 moreShow less
1.14.2-11.14.2-1ubuntu11.14.3-2ubuntu2~20.04.11.14.3-2ubuntu2~20.04.2
None known
golang-1.16
Ubuntu:Pro:20.04:LTS
All versions, plus listed versions
1.16.2-0ubuntu1~20.041.16.2-0ubuntu1~20.04.11.16.2-0ubuntu1~20.04.1+esm1
None known
golang-1.18
Ubuntu:20.04:LTS
All versions, plus listed versions
1.18.1-1ubuntu1~20.04.11.18.1-1ubuntu1~20.04.21.18.1-1ubuntu1~20.04.3
None known
golang-1.20
Ubuntu:20.04:LTS
All versions, plus listed versions
1.20.3-1ubuntu0.1~20.041.20.3-1ubuntu0.1~20.04.1
None known
golang-1.17
Ubuntu:22.04:LTS
All versions, plus listed versions
1.17-1ubuntu21.17.3-1ubuntu11.17.3-1ubuntu21.17.13-3ubuntu11.17.13-3ubuntu1.21.17.13-3ubuntu1.3
None known
golang-1.18
Ubuntu:22.04:LTS
All versions, plus listed versions
1.18~beta1-0ubuntu11.18~beta2-1ubuntu11.18~beta2-1ubuntu21.18~rc1-1ubuntu11.18-1ubuntu1
Show 4 moreShow less
1.18.1-1ubuntu11.18.1-1ubuntu1.11.18.1-1ubuntu1.21.18.1-1ubuntu1.3
None known
golang-1.20
Ubuntu:22.04:LTS
All versions, plus listed versions
1.20.3-1ubuntu0.1~22.041.20.3-1ubuntu0.1~22.04.1
None known
golang-1.13
Ubuntu:Pro:22.04:LTS
All versions, plus listed versions
1.13.8-1ubuntu21.13.8-1ubuntu2.22.04.11.13.8-1ubuntu2.22.04.1+esm11.13.8-1ubuntu2.22.04.2
None known
go1.18
openSUSE:Tumbleweed
before 1.18.8-1.1
1.18.8-1.1
go1.19
openSUSE:Tumbleweed
before 1.19.3-1.1
1.19.3-1.1

History

History
RecordedChangedSources
affected, factsOSV
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2022-41716 is a high vulnerability (CVSS 7.5) in Go Standard Library Os/exec, published November 1, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.03%, the 63rd percentile. Fixed in golang 1.18.8.

References

Show 77 moreShow less
MoveEnter Open