CVE-2022-41716

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

State
Published
Severity
6.3 Medium
Published
Nov 2, 2022
Updated
Oct 30, 2024
Reserved
Sep 28, 2022

Read the record on cve.org

Description

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

Scores

CVSSScoreVectorSource
3.16.3 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:LCISA-ADP

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
syscallGo standard library
  • before 1.18.8Affected
  • 1.19.0-0 to before 1.19.3Affected
os/execGo standard library
  • before 1.18.8Affected
  • 1.19.0-0 to before 1.19.3Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.